MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / udiv

Method udiv

cranelift/interpreter/src/value.rs:584–596  ·  view source on GitHub ↗
(self, other: Self)

Source from the content-addressed store, hash-verified

582 }
583
584 fn udiv(self, other: Self) -> ValueResult<Self> {
585 if self.is_float() {
586 return binary_match!(/(self, other); [F32, F64]);
587 }
588
589 let denominator = other.clone().into_int_unsigned()?;
590
591 if denominator == 0 {
592 return Err(ValueError::IntegerDivisionByZero);
593 }
594
595 binary_match!(/(&self, &other); [I8, I16, I32, I64, I128]; [u8, u16, u32, u64, u128])
596 }
597
598 fn srem(self, other: Self) -> ValueResult<Self> {
599 let denominator = other.clone().into_int_signed()?;

Callers 1

translate_udivMethod · 0.80

Calls 3

into_int_unsignedMethod · 0.80
is_floatMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected