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

Method xdiv64_u

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

Source from the content-addressed store, hash-verified

2193 }
2194
2195 fn xdiv64_u(&mut self, operands: BinaryOperands<XReg>) -> ControlFlow<Done> {
2196 let a = self.state[operands.src1].get_u64();
2197 let b = self.state[operands.src2].get_u64();
2198 match a.checked_div(b) {
2199 Some(result) => {
2200 self.state[operands.dst].set_u64(result);
2201 ControlFlow::Continue(())
2202 }
2203 None => self.done_trap_kind::<crate::XDiv64U>(Some(TrapKind::DivideByZero)),
2204 }
2205 }
2206
2207 fn xrem32_s(&mut self, operands: BinaryOperands<XReg>) -> ControlFlow<Done> {
2208 let a = self.state[operands.src1].get_i32();

Callers

nothing calls this directly

Calls 3

checked_divMethod · 0.80
get_u64Method · 0.45
set_u64Method · 0.45

Tested by

no test coverage detected