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

Function xload64le_o32

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

Source from the content-addressed store, hash-verified

564
565#[test]
566fn xload64le_o32() {
567 let a = UnsafeCell::new([11u64.to_le(), 22u64.to_le()]);
568 let b = UnsafeCell::new([33u64.to_le(), 44u64.to_le()]);
569 let c = UnsafeCell::new([55u64.to_le(), 66u64.to_le()]);
570 let d = UnsafeCell::new([(-1i64 as u64).to_le(), (i64::MAX as u64).to_le()]);
571
572 for (expected, addr, offset) in [
573 (11, a.get(), 0),
574 (22, a.get(), 8),
575 (33, b.get(), 0),
576 (44, b.get(), 8),
577 (55, c.get(), 0),
578 (66, c.get(), 8),
579 (-1i64 as u64, d.get(), 0),
580 (i64::MAX as u64, d.get(), 8),
581 ] {
582 unsafe {
583 assert_one(
584 [
585 (x(0), Val::from(0x1234567812345678u64)),
586 (x(1), Val::from(addr)),
587 ],
588 XLoad64LeO32 {
589 dst: x(0),
590 addr: AddrO32 { addr: x(1), offset },
591 },
592 x(0),
593 expected,
594 );
595 }
596 }
597}
598
599#[test]
600fn xstore32_le_o32() {

Callers 1

pulley_emitFunction · 0.85

Calls 6

assert_oneFunction · 0.85
fromFunction · 0.85
to_leMethod · 0.80
xFunction · 0.70
newFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected