Prepares arguments for emitting a convert operation with a temporary register.
(
&mut self,
masm: &mut M,
dst_ty: WasmValType,
tmp_reg_class: RegClass,
emit: F,
)
| 521 | /// Prepares arguments for emitting a convert operation with a temporary |
| 522 | /// register. |
| 523 | pub fn convert_op_with_tmp_reg<F, M>( |
| 524 | &mut self, |
| 525 | masm: &mut M, |
| 526 | dst_ty: WasmValType, |
| 527 | tmp_reg_class: RegClass, |
| 528 | emit: F, |
| 529 | ) -> Result<()> |
| 530 | where |
| 531 | F: FnOnce(&mut M, Reg, Reg, Reg, OperandSize) -> Result<()>, |
| 532 | M: MacroAssembler, |
| 533 | { |
| 534 | let tmp_gpr = self.reg_for_class(tmp_reg_class, masm)?; |
| 535 | self.convert_op(masm, dst_ty, |masm, dst, src, dst_size| { |
| 536 | emit(masm, dst, src, tmp_gpr, dst_size) |
| 537 | })?; |
| 538 | self.free_reg(tmp_gpr); |
| 539 | Ok(()) |
| 540 | } |
| 541 | |
| 542 | /// Prepares arguments for emitting an extract lane operation. |
| 543 | pub fn extract_lane_op<F, M>( |
no test coverage detected