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

Method xdiv32_u

pulley/src/interp.rs:2183–2193  ·  view source on GitHub ↗
(&mut self, operands: BinaryOperands<XReg>)

Source from the content-addressed store, hash-verified

2181 }
2182
2183 fn xdiv32_u(&mut self, operands: BinaryOperands<XReg>) -> ControlFlow<Done> {
2184 let a = self.state[operands.src1].get_u32();
2185 let b = self.state[operands.src2].get_u32();
2186 match a.checked_div(b) {
2187 Some(result) => {
2188 self.state[operands.dst].set_u32(result);
2189 ControlFlow::Continue(())
2190 }
2191 None => self.done_trap_kind::<crate::XDiv32U>(Some(TrapKind::DivideByZero)),
2192 }
2193 }
2194
2195 fn xdiv64_u(&mut self, operands: BinaryOperands<XReg>) -> ControlFlow<Done> {
2196 let a = self.state[operands.src1].get_u64();

Callers

nothing calls this directly

Calls 3

checked_divMethod · 0.80
get_u32Method · 0.45
set_u32Method · 0.45

Tested by

no test coverage detected