Prepares arguments for emitting a unary operation. The `emit` function returns the `TypedReg` to put on the value stack.
(&mut self, masm: &mut M, emit: F)
| 337 | /// |
| 338 | /// The `emit` function returns the `TypedReg` to put on the value stack. |
| 339 | pub fn unop<F, M>(&mut self, masm: &mut M, emit: F) -> Result<()> |
| 340 | where |
| 341 | F: FnOnce(&mut M, Reg) -> Result<TypedReg>, |
| 342 | M: MacroAssembler, |
| 343 | { |
| 344 | let typed_reg = self.pop_to_reg(masm, None)?; |
| 345 | let dst = emit(masm, typed_reg.reg)?; |
| 346 | self.stack.push(dst.into()); |
| 347 | |
| 348 | Ok(()) |
| 349 | } |
| 350 | |
| 351 | /// Prepares arguments for emitting a binary operation. |
| 352 | /// |
no test coverage detected