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

Method visit_f64_nearest

winch/codegen/src/visitor.rs:880–896  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

878 }
879
880 fn visit_f64_nearest(&mut self) -> Self::Output {
881 self.masm.float_round(
882 RoundingMode::Nearest,
883 &mut self.env,
884 &mut self.context,
885 OperandSize::S64,
886 |env, cx, masm| {
887 let builtin = env.builtins.nearest_f64::<M::ABI>()?;
888 FnCall::emit::<M>(env, masm, cx, Callee::Builtin(builtin))
889 },
890 )?;
891 let result = self.context.pop_to_reg(self.masm, None)?;
892 self.masm
893 .maybe_canonicalize_nan(writable!(result.into()), OperandSize::S64)?;
894 self.context.stack.push(result.into());
895 Ok(())
896 }
897
898 fn visit_f32_trunc(&mut self) -> Self::Output {
899 self.masm.float_round(

Callers

nothing calls this directly

Calls 5

OkFunction · 0.85
pop_to_regMethod · 0.80
float_roundMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected