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

Method float_round

winch/codegen/src/isa/x64/masm.rs:688–707  ·  view source on GitHub ↗
(
        &mut self,
        mode: RoundingMode,
        env: &mut FuncEnv<Self::Ptr>,
        context: &mut CodeGenContext<Emission>,
        size: OperandSize,
        mut fallback: F,
    )

Source from the content-addressed store, hash-verified

686 }
687
688 fn float_round<
689 F: FnMut(&mut FuncEnv<Self::Ptr>, &mut CodeGenContext<Emission>, &mut Self) -> Result<()>,
690 >(
691 &mut self,
692 mode: RoundingMode,
693 env: &mut FuncEnv<Self::Ptr>,
694 context: &mut CodeGenContext<Emission>,
695 size: OperandSize,
696 mut fallback: F,
697 ) -> Result<()> {
698 if self.flags.has_sse41() {
699 let src = context.pop_to_reg(self, None)?;
700 self.asm
701 .xmm_rounds_rr(src.into(), writable!(src.into()), mode, size);
702 context.stack.push(src.into());
703 Ok(())
704 } else {
705 fallback(env, context, self)
706 }
707 }
708
709 fn float_sqrt(&mut self, dst: WritableReg, src: Reg, size: OperandSize) -> Result<()> {
710 self.asm.sqrt(src, dst, size);

Callers 8

visit_f32_floorMethod · 0.45
visit_f64_floorMethod · 0.45
visit_f32_ceilMethod · 0.45
visit_f64_ceilMethod · 0.45
visit_f32_nearestMethod · 0.45
visit_f64_nearestMethod · 0.45
visit_f32_truncMethod · 0.45
visit_f64_truncMethod · 0.45

Calls 5

OkFunction · 0.85
has_sse41Method · 0.80
pop_to_regMethod · 0.80
xmm_rounds_rrMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected