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

Method visit_f32_nearest

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

Source from the content-addressed store, hash-verified

860 }
861
862 fn visit_f32_nearest(&mut self) -> Self::Output {
863 self.masm.float_round(
864 RoundingMode::Nearest,
865 &mut self.env,
866 &mut self.context,
867 OperandSize::S32,
868 |env, cx, masm| {
869 let builtin = env.builtins.nearest_f32::<M::ABI>()?;
870 FnCall::emit::<M>(env, masm, cx, Callee::Builtin(builtin))
871 },
872 )?;
873 let result = self.context.pop_to_reg(self.masm, None)?;
874 self.masm
875 .maybe_canonicalize_nan(writable!(result.into()), OperandSize::S32)?;
876 self.context.stack.push(result.into());
877 Ok(())
878 }
879
880 fn visit_f64_nearest(&mut self) -> Self::Output {
881 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