use crate::*;
const ALIGNED_ADDR: u64 = 0x3000;
#[test]
fn test_vcmpps_xmm_eq_oq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_lt_os() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x01, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_le_os() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x02, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_unord_q() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x03, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_neq_uq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x04, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_nlt_us() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x05, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_nle_us() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x06, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_ord_q() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x07, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_eq_uq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x08, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_nge_us() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x09, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_ngt_us() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x0a, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_false_oq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x0b, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_neq_oq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x0c, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_ge_os() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x0d, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_gt_os() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x0e, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_true_uq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x0f, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_eq_os() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x10, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_lt_oq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x11, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_le_oq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x12, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_unord_s() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x13, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_neq_us() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x14, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_nlt_uq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x15, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_nle_uq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x16, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_ord_s() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x17, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_eq_us() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x18, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_nge_uq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x19, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_ngt_uq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x1a, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_false_os() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x1b, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_neq_os() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x1c, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_ge_oq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x1d, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_gt_oq() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x1e, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_true_us() {
let mut emu = emu64();
let code = [
0xc5, 0xf8, 0xc2, 0xca, 0x1f, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_ymm_eq_oq() {
let mut emu = emu64();
let code = [
0xc5, 0xfc, 0xc2, 0xca, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_ymm_lt_os() {
let mut emu = emu64();
let code = [
0xc5, 0xfc, 0xc2, 0xca, 0x01, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_ymm_le_os() {
let mut emu = emu64();
let code = [
0xc5, 0xfc, 0xc2, 0xca, 0x02, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_ymm_unord_q() {
let mut emu = emu64();
let code = [
0xc5, 0xfc, 0xc2, 0xca, 0x03, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_ymm_neq_uq() {
let mut emu = emu64();
let code = [
0xc5, 0xfc, 0xc2, 0xca, 0x04, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_ymm_extended_regs() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x34, 0xc2, 0xc2, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_ymm_mem() {
let mut emu = emu64();
let code = [
0xc5, 0xfc, 0xc2, 0x0d, 0x00, 0x40, 0x00, 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_vcmppd_xmm_eq_oq() {
let mut emu = emu64();
let code = [
0xc5, 0xf9, 0xc2, 0xca, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_xmm_lt_os() {
let mut emu = emu64();
let code = [
0xc5, 0xf9, 0xc2, 0xca, 0x01, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_xmm_le_os() {
let mut emu = emu64();
let code = [
0xc5, 0xf9, 0xc2, 0xca, 0x02, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_xmm_unord_q() {
let mut emu = emu64();
let code = [
0xc5, 0xf9, 0xc2, 0xca, 0x03, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_xmm_neq_uq() {
let mut emu = emu64();
let code = [
0xc5, 0xf9, 0xc2, 0xca, 0x04, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_xmm_nlt_us() {
let mut emu = emu64();
let code = [
0xc5, 0xf9, 0xc2, 0xca, 0x05, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_xmm_nle_us() {
let mut emu = emu64();
let code = [
0xc5, 0xf9, 0xc2, 0xca, 0x06, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_xmm_ord_q() {
let mut emu = emu64();
let code = [
0xc5, 0xf9, 0xc2, 0xca, 0x07, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_xmm_ge_os() {
let mut emu = emu64();
let code = [
0xc5, 0xf9, 0xc2, 0xca, 0x0d, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_xmm_gt_os() {
let mut emu = emu64();
let code = [
0xc5, 0xf9, 0xc2, 0xca, 0x0e, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_xmm_true_uq() {
let mut emu = emu64();
let code = [
0xc5, 0xf9, 0xc2, 0xca, 0x0f, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_ymm_eq_oq() {
let mut emu = emu64();
let code = [
0xc5, 0xfd, 0xc2, 0xca, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_ymm_lt_os() {
let mut emu = emu64();
let code = [
0xc5, 0xfd, 0xc2, 0xca, 0x01, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_ymm_le_os() {
let mut emu = emu64();
let code = [
0xc5, 0xfd, 0xc2, 0xca, 0x02, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_ymm_unord_q() {
let mut emu = emu64();
let code = [
0xc5, 0xfd, 0xc2, 0xca, 0x03, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_ymm_neq_uq() {
let mut emu = emu64();
let code = [
0xc5, 0xfd, 0xc2, 0xca, 0x04, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_ymm_extended_regs() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x1d, 0xc2, 0xdd, 0x00, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_ymm_mem() {
let mut emu = emu64();
let code = [
0xc5, 0xfd, 0xc2, 0x0d, 0x00, 0x40, 0x00, 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_vcmppd_xmm_extended_regs() {
let mut emu = emu64();
let code = [
0xc4, 0xc1, 0x01, 0xc2, 0xf0, 0x01, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_xmm_different_regs() {
let mut emu = emu64();
let code = [
0xc5, 0xd8, 0xc2, 0xdd, 0x07, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmpps_ymm_different_regs() {
let mut emu = emu64();
let code = [
0xc5, 0xcc, 0xc2, 0xef, 0x0e, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_xmm_different_regs() {
let mut emu = emu64();
let code = [
0xc5, 0xc9, 0xc2, 0xf2, 0x0c, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}
#[test]
fn test_vcmppd_ymm_different_regs() {
let mut emu = emu64();
let code = [
0xc5, 0xf5, 0xc2, 0xdc, 0x1f, 0xf4, ];
emu.load_code_bytes(&code);
emu.run(None).unwrap();
}