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

Function xstore64_le_o32

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

Source from the content-addressed store, hash-verified

643#[test]
644
645fn xstore64_le_o32() {
646 let a = UnsafeCell::new([0x1234567812345678, 0x1234567812345678, 0x1234567812345678]);
647
648 unsafe {
649 for (val, addr, offset) in [
650 (0x1111111111111111u64, a.get(), 0),
651 (0x2222222222222222, a.get(), 8),
652 (0x3333333333333333, a.get(), 16),
653 ] {
654 assert_one(
655 [(x(0), Val::from(addr)), (x(1), Val::from(val))],
656 XStore64LeO32 {
657 src: x(1),
658 addr: AddrO32 { addr: x(0), offset },
659 },
660 x(1),
661 val,
662 );
663 }
664 }
665
666 let [a, b, c] = a.into_inner();
667
668 let expected = 0x1111111111111111u64;
669 eprintln!("expected(a) = {expected:#018x}");
670 eprintln!("actual(a) = {a:#018x}");
671 assert_eq!(a, expected);
672
673 let expected = 0x2222222222222222u64;
674 eprintln!("expected(b) = {expected:#018x}");
675 eprintln!("actual(b) = {b:#018x}");
676 assert_eq!(b, expected);
677
678 let expected = 0x3333333333333333u64;
679 eprintln!("expected(c) = {expected:#018x}");
680 eprintln!("actual(c) = {c:#018x}");
681 assert_eq!(c, expected);
682}
683
684#[test]
685fn bitcast_int_from_float_32() {

Callers

nothing calls this directly

Calls 6

assert_oneFunction · 0.85
fromFunction · 0.85
xFunction · 0.70
newFunction · 0.50
getMethod · 0.45
into_innerMethod · 0.45

Tested by

no test coverage detected