Lines Matching refs:mem
290 let mem = &mut [0x11, 0x22]; in test_vm_be16() localVariable
292 assert_eq!(vm.execute_program(mem).unwrap(), 0x1122); in test_vm_be16()
304 let mem = &mut [0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88]; in test_vm_be16_high() localVariable
306 assert_eq!(vm.execute_program(mem).unwrap(), 0x1122); in test_vm_be16_high()
318 let mem = &mut [0x11, 0x22, 0x33, 0x44]; in test_vm_be32() localVariable
320 assert_eq!(vm.execute_program(mem).unwrap(), 0x11223344); in test_vm_be32()
332 let mem = &mut [0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88]; in test_vm_be32_high() localVariable
334 assert_eq!(vm.execute_program(mem).unwrap(), 0x11223344); in test_vm_be32_high()
346 let mem = &mut [0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88]; in test_vm_be64() localVariable
348 assert_eq!(vm.execute_program(mem).unwrap(), 0x1122334455667788); in test_vm_be64()
382 let mem = &mut [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08]; in test_vm_call_memfrob() localVariable
385 assert_eq!(vm.execute_program(mem).unwrap(), 0x102292e2f2c0708); in test_vm_call_memfrob()
1641 let mem = &mut [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09]; in test_vm_ldxb_all() localVariable
1643 assert_eq!(vm.execute_program(mem).unwrap(), 0x9876543210); in test_vm_ldxb_all()
1654 let mem = &mut [0xaa, 0xbb, 0x11, 0xcc, 0xdd]; in test_vm_ldxb() localVariable
1656 assert_eq!(vm.execute_program(mem).unwrap(), 0x11); in test_vm_ldxb()
1667 let mem = &mut [ in test_vm_ldxdw() localVariable
1671 assert_eq!(vm.execute_program(mem).unwrap(), 0x8877665544332211); in test_vm_ldxdw()
1721 let mem = &mut [ in test_vm_ldxh_all() localVariable
1726 assert_eq!(vm.execute_program(mem).unwrap(), 0x9876543210); in test_vm_ldxh_all()
1766 let mem = &mut [ in test_vm_ldxh_all2() localVariable
1771 assert_eq!(vm.execute_program(mem).unwrap(), 0x3ff); in test_vm_ldxh_all2()
1782 let mem = &mut [0xaa, 0xbb, 0x11, 0x22, 0xcc, 0xdd]; in test_vm_ldxh() localVariable
1784 assert_eq!(vm.execute_program(mem).unwrap(), 0x2211); in test_vm_ldxh()
1797 let mem = &mut [0xff, 0xff]; in test_vm_ldxh_same_reg() localVariable
1799 assert_eq!(vm.execute_program(mem).unwrap(), 0x1234); in test_vm_ldxh_same_reg()
1839 let mem = &mut [ in test_vm_ldxw_all() localVariable
1845 assert_eq!(vm.execute_program(mem).unwrap(), 0x030f0f); in test_vm_ldxw_all()
1856 let mem = &mut [0xaa, 0xbb, 0x11, 0x22, 0x33, 0x44, 0xcc, 0xdd]; in test_vm_ldxw() localVariable
1858 assert_eq!(vm.execute_program(mem).unwrap(), 0x44332211); in test_vm_ldxw()
1870 let mem = &mut [0x22, 0x11]; in test_vm_le16() localVariable
1872 assert_eq!(vm.execute_program(mem).unwrap(), 0x1122); in test_vm_le16()
1884 let mem = &mut [0x44, 0x33, 0x22, 0x11]; in test_vm_le32() localVariable
1886 assert_eq!(vm.execute_program(mem).unwrap(), 0x11223344); in test_vm_le32()
1898 let mem = &mut [0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11]; in test_vm_le64() localVariable
1900 assert_eq!(vm.execute_program(mem).unwrap(), 0x1122334455667788); in test_vm_le64()
2295 let mem = &mut [0xaa, 0xbb, 0xff, 0xcc, 0xdd]; in test_vm_stb() localVariable
2297 assert_eq!(vm.execute_program(mem).unwrap(), 0x11); in test_vm_stb()
2309 let mem = &mut [ in test_vm_stdw() localVariable
2313 assert_eq!(vm.execute_program(mem).unwrap(), 0x44332211); in test_vm_stdw()
2333 let mem = &mut [ in test_vm_stdw_add_overflow() localVariable
2337 _ = vm.execute_program(mem).unwrap(); in test_vm_stdw_add_overflow()
2349 let mem = &mut [0xaa, 0xbb, 0xff, 0xff, 0xcc, 0xdd]; in test_vm_sth() localVariable
2351 assert_eq!(vm.execute_program(mem).unwrap(), 0x2211); in test_vm_sth()
2402 let mem = &mut [0xaa, 0xbb, 0xff, 0xff, 0xff, 0xff, 0xcc, 0xdd]; in test_vm_stw() localVariable
2404 assert_eq!(vm.execute_program(mem).unwrap(), 0x44332211); in test_vm_stw()
2417 let mem = &mut [0xaa, 0xbb, 0xff, 0xcc, 0xdd]; in test_vm_stxb() localVariable
2419 assert_eq!(vm.execute_program(mem).unwrap(), 0x11); in test_vm_stxb()
2447 let mem = &mut [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]; in test_vm_stxb_all() localVariable
2449 assert_eq!(vm.execute_program(mem).unwrap(), 0xf0f2f3f4f5f6f7f8); in test_vm_stxb_all()
2466 let mem = &mut [0xff, 0xff]; in test_vm_stxb_all2() localVariable
2468 assert_eq!(vm.execute_program(mem).unwrap(), 0xf1f9); in test_vm_stxb_all2()
2498 let mem = &mut [0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; in test_vm_stxb_chain() localVariable
2500 assert_eq!(vm.execute_program(mem).unwrap(), 0x2a); in test_vm_stxb_chain()
2515 let mem = &mut [ in test_vm_stxdw() localVariable
2519 assert_eq!(vm.execute_program(mem).unwrap(), 0x8877665544332211); in test_vm_stxdw()
2532 let mem = &mut [0xaa, 0xbb, 0xff, 0xff, 0xcc, 0xdd]; in test_vm_stxh() localVariable
2534 assert_eq!(vm.execute_program(mem).unwrap(), 0x2211); in test_vm_stxh()
2547 let mem = &mut [0xaa, 0xbb, 0xff, 0xff, 0xff, 0xff, 0xcc, 0xdd]; in test_vm_stxw() localVariable
2549 assert_eq!(vm.execute_program(mem).unwrap(), 0x44332211); in test_vm_stxw()
2572 let mem = &mut [ in test_vm_subnet() localVariable
2580 assert_eq!(vm.execute_program(mem).unwrap(), 0x1); in test_vm_subnet()
2598 let mem = &mut [ in test_vm_tcp_port80_match() localVariable
2609 assert_eq!(vm.execute_program(mem).unwrap(), 0x1); in test_vm_tcp_port80_match()
2614 let mem = &mut [ in test_vm_tcp_port80_nomatch() localVariable
2625 assert_eq!(vm.execute_program(mem).unwrap(), 0x0); in test_vm_tcp_port80_nomatch()
2630 let mem = &mut [ in test_vm_tcp_port80_nomatch_ethertype() localVariable
2641 assert_eq!(vm.execute_program(mem).unwrap(), 0x0); in test_vm_tcp_port80_nomatch_ethertype()
2646 let mem = &mut [ in test_vm_tcp_port80_nomatch_proto() localVariable
2657 assert_eq!(vm.execute_program(mem).unwrap(), 0x0); in test_vm_tcp_port80_nomatch_proto()
2662 let mut mem = TCP_SACK_MATCH.to_vec(); in test_vm_tcp_sack_match() localVariable
2665 assert_eq!(vm.execute_program(mem.as_mut_slice()).unwrap(), 0x1); in test_vm_tcp_sack_match()
2670 let mut mem = TCP_SACK_NOMATCH.to_vec(); in test_vm_tcp_sack_nomatch() localVariable
2673 assert_eq!(vm.execute_program(mem.as_mut_slice()).unwrap(), 0x0); in test_vm_tcp_sack_nomatch()