(&mut self, operands: BinaryOperands<XReg>)
| 2205 | } |
| 2206 | |
| 2207 | fn xrem32_s(&mut self, operands: BinaryOperands<XReg>) -> ControlFlow<Done> { |
| 2208 | let a = self.state[operands.src1].get_i32(); |
| 2209 | let b = self.state[operands.src2].get_i32(); |
| 2210 | let result = if a == i32::MIN && b == -1 { |
| 2211 | Some(0) |
| 2212 | } else { |
| 2213 | a.checked_rem(b) |
| 2214 | }; |
| 2215 | match result { |
| 2216 | Some(result) => { |
| 2217 | self.state[operands.dst].set_i32(result); |
| 2218 | ControlFlow::Continue(()) |
| 2219 | } |
| 2220 | None => self.done_trap_kind::<crate::XRem32S>(Some(TrapKind::DivideByZero)), |
| 2221 | } |
| 2222 | } |
| 2223 | |
| 2224 | fn xrem64_s(&mut self, operands: BinaryOperands<XReg>) -> ControlFlow<Done> { |
| 2225 | let a = self.state[operands.src1].get_i64(); |
nothing calls this directly
no test coverage detected