MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / convert_op_with_tmp_reg

Method convert_op_with_tmp_reg

winch/codegen/src/codegen/context.rs:523–540  ·  view source on GitHub ↗

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,
    )

Source from the content-addressed store, hash-verified

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>(

Callers 5

unsigned_truncateMethod · 0.80

Calls 5

emitFunction · 0.85
OkFunction · 0.85
convert_opMethod · 0.80
free_regMethod · 0.80
reg_for_classMethod · 0.45

Tested by

no test coverage detected