(&mut self, operands: BinaryOperands<XReg>)
| 2143 | } |
| 2144 | |
| 2145 | fn xdiv32_s(&mut self, operands: BinaryOperands<XReg>) -> ControlFlow<Done> { |
| 2146 | let a = self.state[operands.src1].get_i32(); |
| 2147 | let b = self.state[operands.src2].get_i32(); |
| 2148 | match a.checked_div(b) { |
| 2149 | Some(result) => { |
| 2150 | self.state[operands.dst].set_i32(result); |
| 2151 | ControlFlow::Continue(()) |
| 2152 | } |
| 2153 | None => { |
| 2154 | let kind = if b == 0 { |
| 2155 | TrapKind::DivideByZero |
| 2156 | } else { |
| 2157 | TrapKind::IntegerOverflow |
| 2158 | }; |
| 2159 | self.done_trap_kind::<crate::XDiv32S>(Some(kind)) |
| 2160 | } |
| 2161 | } |
| 2162 | } |
| 2163 | |
| 2164 | fn xdiv64_s(&mut self, operands: BinaryOperands<XReg>) -> ControlFlow<Done> { |
| 2165 | let a = self.state[operands.src1].get_i64(); |
nothing calls this directly
no test coverage detected