break;
}
+ case 0xef:
+ {
+ i386_record_modrm (ir);
+ int reg_offset = ir->reg + vex_r * 8;
+ record_full_arch_list_add_reg (ir->regcache,
+ tdep->ymm0_regnum + reg_offset);
+ break;
+ }
+
default:
gdb_printf (gdb_stderr,
_("Process record does not support VEX instruction 0x%02x "
return 0; /* end vzeroupper_test */
}
+int
+vpxor_test ()
+{
+ /* start vpxor_test. */
+ /* Using GDB, load this value onto the register, for ease of testing.
+ ymm0.v2_int128 = {0x0, 0x12345}
+ ymm1.v2_int128 = {0x1f1e1d1c1b1a1918, 0x0}
+ ymm2.v2_int128 = {0x0, 0xbeef}
+ ymm15.v2_int128 = {0x0, 0xcafeface}
+ this way it's easy to confirm we're undoing things correctly. */
+
+ asm volatile ("vpxor %ymm0, %ymm0, %ymm0");
+ asm volatile ("vpxor %xmm0, %xmm1, %xmm0");
+ asm volatile ("vpxor %ymm2, %ymm15, %ymm1");
+ asm volatile ("vpxor %xmm2, %xmm15, %xmm2");
+ asm volatile ("vpxor %ymm2, %ymm1, %ymm15");
+ return 0; /* end vpxor_test */
+}
+
/* This include is used to allocate the dynamic buffer and have
the pointers aligned to a 32-bit boundary, so we can test instructions
that require aligned memory. */
vpunpck_test ();
vpbroadcast_test ();
vzeroupper_test ();
+ vpxor_test ();
return 0; /* end of main */
}
"Register ymm15h changed: 3405707982" \
"Register rip changed: \[^\r\n\]+" ] \
"verify vzeroupper recording"
+
+ gdb_test "record stop" "Process record is stopped.*" \
+ "delete history for vzeroupper_test"
} else {
untested "couldn't run vzeroupper tests"
}
gdb_test "finish" "Run till exit from.*vzeroupper_test.*" \
"leaving vzeroupper"
+
+# Preparation and testing vpxor instructions.
+gdb_test_no_output "set \$ymm0.v2_int128 = {0x0, 0x12345}" "set ymm0 for vpxor"
+gdb_test_no_output "set \$ymm1.v2_int128 = {0x1f1e1d1c1b1a1918, 0x0}" \
+ "set ymm1 for vpxor"
+gdb_test_no_output "set \$ymm2.v2_int128 = {0x0, 0xbeef}" "set ymm2 for vpxor"
+gdb_test_no_output "set \$ymm15.v2_int128 = {0x0, 0xcafeface}" "set ymm15 for vpxor"
+
+if {[record_full_function "vpxor"] == true} {
+ test_one_register "vpxor" "ymm15" "0x0, 0xcafeface"
+ test_one_register "vpxor" "ymm2" "0x0, 0xbeef"
+ test_one_register "vpxor" "ymm1" "0x1f1e1d1c1b1a1918, 0x0"
+ test_one_register "vpxor" "ymm0" "0x0, 0x0" "first"
+ test_one_register "vpxor" "ymm0" "0x0, 0x12345" "second"
+
+ gdb_test "record stop" "Process record is stopped.*" \
+ "delete history for vpxor_test"
+} else {
+ untested "couldn't run vpxor tests"
+}
+gdb_test "finish" "Run till exit from.*vpxor_test.*" \
+ "leaving vpxor"