Index: src/trusted/validator_x86/testdata/64/legacy.tf |
diff --git a/src/trusted/validator_x86/testdata/64/legacy.tf b/src/trusted/validator_x86/testdata/64/legacy.tf |
new file mode 100644 |
index 0000000000000000000000000000000000000000..027cfbbbe93faaf4c8fe6818b8961173cbf71e5e |
--- /dev/null |
+++ b/src/trusted/validator_x86/testdata/64/legacy.tf |
@@ -0,0 +1,101 @@ |
+BITS: 64 |
+OUTCOME: invalid |
+ |
+# Legacy instructions which are invalid in 64-bit mode |
+# nops (90) are used to reconsile disassembler |
+# aaa |
+hex: 37 |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+nc_out: ERROR: Opcode sequence doesn't define a valid x86 instruction |
+ |
+# aad |
+hex: D5 0A |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+nc_out: ERROR: Opcode sequence doesn't define a valid x86 instruction |
+nc_out: [at +1] ERROR: Invalid base register in memory offset |
+ |
+asm: nop; nop; nop; nop; nop |
+hex: 90 90 90 90 90 |
+ |
+# aam |
+hex: D4 0A |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+nc_out: ERROR: Opcode sequence doesn't define a valid x86 instruction |
+nc_out: [at +1] ERROR: Invalid base register in memory offset |
+ |
+asm: nop; nop; nop; nop; nop |
+hex: 90 90 90 90 90 |
+ |
+# aas |
+hex: 3F |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+nc_out: ERROR: Opcode sequence doesn't define a valid x86 instruction |
+ |
+# bound %eax, (%eax) |
+hex: 62 00 |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+nc_out: ERROR: Opcode sequence doesn't define a valid x86 instruction |
+nc_out: [at +1] ERROR: Invalid base register in memory offset |
+ |
+asm: nop; nop; nop; nop; nop |
+hex: 90 90 90 90 90 |
+ |
+# daa |
+hex: 27 |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+nc_out: ERROR: Opcode sequence doesn't define a valid x86 instruction |
+ |
+# das |
+hex: 2F |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+nc_out: ERROR: Opcode sequence doesn't define a valid x86 instruction |
+ |
+# pusha |
+hex: 60 |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+nc_out: ERROR: Opcode sequence doesn't define a valid x86 instruction |
+ |
+ |
+# Some undocumented instructions |
+# icebp |
+hex: F1 |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+ |
+# salc |
+hex: D6 |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+nc_out: ERROR: Opcode sequence doesn't define a valid x86 instruction |
+ |
+ |
+# Instruction below could be valid in 64-bit code and could be not valid |
+# depending on CPUID return values. |
+# lahf |
+asm: lahf |
+hex: 9F |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+ |
+# sahf |
+asm: sahf |
+hex: 9E |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+ |
+ |
+# Legacy instructions which are valid in 64-bit mode |
+# xlat (%ebx,%al) |
+asm: xlat %ds:(%rbx) |
+hex: D7 |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+nc_out: ERROR: Segment memory reference not allowed |
+ |
+ |
+# Nop padding for the next instruction not to cross bundle boundary. |
+asm: nop |
+hex: 90 |
+ |
+ |
+# xlat (%rbx,%al) |
+asm: rex.W xlat %ds:(%rbx) |
+hex: 48 D7 |
+nc_out: ERROR: This instruction has been marked illegal by Native Client |
+nc_out: ERROR: Segment memory reference not allowed |
+ |