use crate::*;
const ALIGNED_ADDR: u64 = 0x3000;
#[test]
fn test_vmaskmovps_load_xmm0_xmm1_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x71, 0x2c, 0x05, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [
0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x80, 0x40, ];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_xmm1_xmm2_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x69, 0x2c, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [
0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0xc0, 0x40, 0x00, 0x00, 0xe0, 0x40, 0x00, 0x00, 0x00, 0x41, ];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_xmm2_xmm3_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x61, 0x2c, 0x15, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [
0x00, 0x00, 0x10, 0x41, 0x00, 0x00, 0x20, 0x41, 0x00, 0x00, 0x30, 0x41, 0x00, 0x00, 0x40, 0x41, ];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_xmm3_xmm4_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x59, 0x2c, 0x1d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [
0x00, 0x00, 0x50, 0x41, 0x00, 0x00, 0x60, 0x41, 0x00, 0x00, 0x70, 0x41, 0x00, 0x00, 0x80, 0x41, ];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_xmm4_xmm5_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x51, 0x2c, 0x25, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [
0x00, 0x00, 0x88, 0x41, 0x00, 0x00, 0x90, 0x41, 0x00, 0x00, 0x98, 0x41, 0x00, 0x00, 0xa0, 0x41, ];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_xmm5_xmm6_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x49, 0x2c, 0x2d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_xmm6_xmm7_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x41, 0x2c, 0x35, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_xmm7_xmm0_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x79, 0x2c, 0x3d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_xmm8_xmm9_mem() {
let mut emu = emu64();
let code = [
0xc4, 0x62, 0x31, 0x2c, 0x05, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40]; emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_xmm9_xmm10_mem() {
let mut emu = emu64();
let code = [
0xc4, 0x62, 0x29, 0x2c, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x40, 0x40]; emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_xmm10_xmm11_mem() {
let mut emu = emu64();
let code = [
0xc4, 0x62, 0x21, 0x2c, 0x15, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x80, 0x40]; emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_xmm15_xmm14_mem() {
let mut emu = emu64();
let code = [
0xc4, 0x62, 0x09, 0x2c, 0x3d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0xa0, 0x40]; emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_ymm0_ymm1_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x75, 0x2c, 0x05, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 32] = [
0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0xa0, 0x40, 0x00, 0x00, 0xc0, 0x40, 0x00, 0x00, 0xe0, 0x40, 0x00, 0x00, 0x00, 0x41, ];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_ymm1_ymm2_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x6d, 0x2c, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 32] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_ymm2_ymm3_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x65, 0x2c, 0x15, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 32] = [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_ymm8_ymm9_mem() {
let mut emu = emu64();
let code = [
0xc4, 0x62, 0x35, 0x2c, 0x05, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 32] = [0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_store_mem_xmm0_xmm1() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x79, 0x2e, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_store_mem_xmm1_xmm2() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x71, 0x2e, 0x15, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_store_mem_xmm2_xmm3() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x69, 0x2e, 0x1d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_store_mem_xmm3_xmm4() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x61, 0x2e, 0x25, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_store_mem_xmm8_xmm9() {
let mut emu = emu64();
let code = [
0xc4, 0x62, 0x39, 0x2e, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_store_mem_ymm0_ymm1() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x7d, 0x2e, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_store_mem_ymm1_ymm2() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x75, 0x2e, 0x15, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_store_mem_ymm8_ymm9() {
let mut emu = emu64();
let code = [
0xc4, 0x62, 0x3d, 0x2e, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_load_xmm0_xmm1_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x71, 0x2d, 0x05, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, ];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_load_xmm1_xmm2_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x69, 0x2d, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, ];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_load_xmm2_xmm3_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x61, 0x2d, 0x15, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x40, ];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_load_xmm8_xmm9_mem() {
let mut emu = emu64();
let code = [
0xc4, 0x62, 0x31, 0x2d, 0x05, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x40, ];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_load_ymm0_ymm1_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x75, 0x2d, 0x05, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 32] = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, ];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_load_ymm1_ymm2_mem() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x6d, 0x2d, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 32] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_load_ymm8_ymm9_mem() {
let mut emu = emu64();
let code = [
0xc4, 0x62, 0x35, 0x2d, 0x05, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 32] = [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_store_mem_xmm0_xmm1() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x79, 0x2f, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_store_mem_xmm1_xmm2() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x71, 0x2f, 0x15, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_store_mem_xmm2_xmm3() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x69, 0x2f, 0x1d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_store_mem_xmm8_xmm9() {
let mut emu = emu64();
let code = [
0xc4, 0x62, 0x39, 0x2f, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_store_mem_ymm0_ymm1() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x7d, 0x2f, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_store_mem_ymm1_ymm2() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x75, 0x2f, 0x15, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_store_mem_ymm8_ymm9() {
let mut emu = emu64();
let code = [
0xc4, 0x62, 0x3d, 0x2f, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovps_load_store_roundtrip() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x71, 0x2c, 0x05, 0x00, 0x40, 0x00, 0x00, 0xc4, 0xe2, 0x71, 0x2e, 0x0d, 0x10, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vmaskmovpd_load_store_roundtrip() {
let mut emu = emu64();
let code = [
0xc4, 0xe2, 0x71, 0x2d, 0x05, 0x00, 0x40, 0x00, 0x00, 0xc4, 0xe2, 0x71, 0x2f, 0x0d, 0x10, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}