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

Method visit_f64_trunc

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

Source from the content-addressed store, hash-verified

914 }
915
916 fn visit_f64_trunc(&mut self) -> Self::Output {
917 self.masm.float_round(
918 RoundingMode::Zero,
919 &mut self.env,
920 &mut self.context,
921 OperandSize::S64,
922 |env, cx, masm| {
923 let builtin = env.builtins.trunc_f64::<M::ABI>()?;
924 FnCall::emit::<M>(env, masm, cx, Callee::Builtin(builtin))
925 },
926 )?;
927 let result = self.context.pop_to_reg(self.masm, None)?;
928 self.masm
929 .maybe_canonicalize_nan(writable!(result.into()), OperandSize::S64)?;
930 self.context.stack.push(result.into());
931 Ok(())
932 }
933
934 fn visit_f32_sqrt(&mut self) -> Self::Output {
935 self.context.unop(self.masm, |masm, reg| {

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