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

Function bitcast_float_from_int_32

pulley/tests/all/interp.rs:741–767  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

739
740#[test]
741fn bitcast_float_from_int_32() {
742 for val in [
743 0.0,
744 1.0,
745 9.87654321,
746 f32::MAX,
747 f32::MIN,
748 f32::NAN,
749 f32::INFINITY,
750 f32::NEG_INFINITY,
751 f32::EPSILON,
752 f32::MIN_POSITIVE,
753 ] {
754 let val = val.to_bits() as u64;
755 unsafe {
756 assert_one(
757 [(x(0), val)],
758 BitcastFloatFromInt32 {
759 dst: f(0),
760 src: x(0),
761 },
762 f(0),
763 val,
764 );
765 }
766 }
767}
768
769#[test]
770fn bitcast_float_from_int_64() {

Callers

nothing calls this directly

Calls 4

assert_oneFunction · 0.85
xFunction · 0.70
fFunction · 0.70
to_bitsMethod · 0.45

Tested by

no test coverage detected