(&mut self, operands: BinaryOperands<XReg>)
| 2162 | } |
| 2163 | |
| 2164 | fn xdiv64_s(&mut self, operands: BinaryOperands<XReg>) -> ControlFlow<Done> { |
| 2165 | let a = self.state[operands.src1].get_i64(); |
| 2166 | let b = self.state[operands.src2].get_i64(); |
| 2167 | match a.checked_div(b) { |
| 2168 | Some(result) => { |
| 2169 | self.state[operands.dst].set_i64(result); |
| 2170 | ControlFlow::Continue(()) |
| 2171 | } |
| 2172 | None => { |
| 2173 | let kind = if b == 0 { |
| 2174 | TrapKind::DivideByZero |
| 2175 | } else { |
| 2176 | TrapKind::IntegerOverflow |
| 2177 | }; |
| 2178 | self.done_trap_kind::<crate::XDiv64S>(Some(kind)) |
| 2179 | } |
| 2180 | } |
| 2181 | } |
| 2182 | |
| 2183 | fn xdiv32_u(&mut self, operands: BinaryOperands<XReg>) -> ControlFlow<Done> { |
| 2184 | let a = self.state[operands.src1].get_u32(); |
nothing calls this directly
no test coverage detected