use crate::*;
const ALIGNED_ADDR: u64 = 0x3000;
#[test]
fn test_vandps_xmm_basic() {
let mut emu = emu64();
let code = [
0xc5, 0xf0, 0x54, 0xc2, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_xmm_same_dest_src1() {
let mut emu = emu64();
let code = [
0xc5, 0xf0, 0x54, 0xca, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_xmm_all_regs() {
let mut emu = emu64();
let code = [
0xc5, 0xd8, 0x54, 0xdd, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_xmm_high_regs() {
let mut emu = emu64();
let code = [
0xc5, 0xc0, 0x54, 0xf2, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_xmm_extended_dest() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x70, 0x54, 0xc2, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_xmm_extended_src1() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x30, 0x54, 0xca, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_xmm_extended_src2() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x68, 0x54, 0xca, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_xmm_all_extended() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x18, 0x54, 0xdd, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_xmm_r14_r15_r8() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x00, 0x54, 0xf0, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_xmm_mem() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0x54, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa,
];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_xmm_mem_extended() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x20, 0x54, 0x15, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_ymm_basic() {
let mut emu = emu64();
let code = [
0xc5, 0xf4, 0x54, 0xc2, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_ymm_same_dest_src1() {
let mut emu = emu64();
let code = [
0xc5, 0xf4, 0x54, 0xca, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_ymm_all_regs() {
let mut emu = emu64();
let code = [
0xc5, 0xdc, 0x54, 0xdd, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_ymm_high_regs() {
let mut emu = emu64();
let code = [
0xc5, 0xc4, 0x54, 0xf2, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_ymm_extended_dest() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x74, 0x54, 0xc2, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_ymm_extended_src1() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x34, 0x54, 0xca, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_ymm_extended_src2() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x6c, 0x54, 0xca, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_ymm_all_extended() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x1c, 0x54, 0xdd, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_ymm_r14_r15_r8() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x04, 0x54, 0xf0, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_ymm_mem() {
let mut emu = emu64();
let code = [
0xc5, 0xfc, 0x54, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 32] = [
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa,
0x55, 0x55, 0x55, 0x55, 0x12, 0x34, 0x56, 0x78,
0xab, 0xcd, 0xef, 0x01, 0x23, 0x45, 0x67, 0x89,
];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vandps_ymm_mem_extended() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x24, 0x54, 0x15, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 32] = [0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_xmm_basic() {
let mut emu = emu64();
let code = [
0xc5, 0xf1, 0x54, 0xc2, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_xmm_same_dest_src1() {
let mut emu = emu64();
let code = [
0xc5, 0xf1, 0x54, 0xca, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_xmm_all_regs() {
let mut emu = emu64();
let code = [
0xc5, 0xd9, 0x54, 0xdd, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_xmm_high_regs() {
let mut emu = emu64();
let code = [
0xc5, 0xc1, 0x54, 0xf2, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_xmm_extended_dest() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x71, 0x54, 0xc2, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_xmm_extended_src1() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x31, 0x54, 0xca, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_xmm_extended_src2() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x69, 0x54, 0xca, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_xmm_all_extended() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x19, 0x54, 0xdd, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_xmm_r14_r15_r8() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x01, 0x54, 0xf0, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_xmm_mem() {
let mut emu = emu64();
let code = [
0xc5, 0xf9, 0x54, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_xmm_mem_extended() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x21, 0x54, 0x15, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 16] = [0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_ymm_basic() {
let mut emu = emu64();
let code = [
0xc5, 0xf5, 0x54, 0xc2, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_ymm_same_dest_src1() {
let mut emu = emu64();
let code = [
0xc5, 0xf5, 0x54, 0xca, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_ymm_all_regs() {
let mut emu = emu64();
let code = [
0xc5, 0xdd, 0x54, 0xdd, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_ymm_high_regs() {
let mut emu = emu64();
let code = [
0xc5, 0xc5, 0x54, 0xf2, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_ymm_extended_dest() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x75, 0x54, 0xc2, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_ymm_extended_src1() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x35, 0x54, 0xca, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_ymm_extended_src2() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x6d, 0x54, 0xca, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_ymm_all_extended() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x1d, 0x54, 0xdd, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_ymm_r14_r15_r8() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x05, 0x54, 0xf0, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_ymm_mem() {
let mut emu = emu64();
let code = [
0xc5, 0xfd, 0x54, 0x0d, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 32] = [
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}
#[test]
fn test_vandpd_ymm_mem_extended() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x25, 0x54, 0x15, 0x00, 0x40, 0x00, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
let test_data: [u8; 32] = [0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa];
emu.maps.write_bytes_slice(ALIGNED_ADDR, &test_data);
emu.run(None).unwrap();
}