Index: src/trusted/validator_x86/testdata/64/stack_regs.tf |
diff --git a/src/trusted/validator_x86/testdata/64/stack_regs.tf b/src/trusted/validator_x86/testdata/64/stack_regs.tf |
new file mode 100644 |
index 0000000000000000000000000000000000000000..88822f72f88b56d81ba1ea5e1884512ba09007a8 |
--- /dev/null |
+++ b/src/trusted/validator_x86/testdata/64/stack_regs.tf |
@@ -0,0 +1,82 @@ |
+BITS: 64 |
+OUTCOME: invalid |
+ |
+# xchg %esp,%ebp |
+asm: xchg %esp,%ebp |
+hex: 87 e5 |
+nc_out: ERROR: Illegal assignment to ESP |
+nc_out: ERROR: Illegal assignment to EBP |
+ |
+asm: nop |
+hex: 90 |
+ |
+ |
+# xchg %rsp,%rbp |
+asm: xchg %rsp,%rbp |
+hex: 48 87 e5 |
+nc_out: ERROR: Illegal change to register RBP |
+nc_out: ERROR: Illegal assignment to RSP |
+ |
+ |
+# lea (%rbp),%esp |
+# add %r15,%rsp |
+asm: lea 0x0(%rbp),%esp |
+hex: 8d 65 00 |
+ |
+asm: add %r15,%rsp |
+hex: 4c 01 fc |
+ |
+ |
+# xor %esp,%ebp |
+# lea (%r15,%rbp,1),%rbp |
+asm: xor %esp,%ebp |
+hex: 31 e5 |
+nc_out: ERROR: Illegal assignment to EBP |
+ |
+asm: lea (%r15,%rbp,1),%rbp |
+hex: 49 8d 2c 2f |
+nc_out: ERROR: Illegal change to register RBP |
+ |
+ |
+# xor %ebp,%esp |
+# lea (%rsp,%r15,1),%rsp |
+asm: xor %ebp,%esp |
+hex: 31 ec |
+ |
+asm: lea (%rsp,%r15,1),%rsp |
+hex: 4a 8d 24 3c |
+ |
+ |
+# xor %esp,%ebp |
+# lea (%rbp,%r15,1),%rbp |
+asm: xor %esp,%ebp |
+hex: 31 e5 |
+ |
+asm: lea 0x0(%rbp,%r15,1),%rbp |
+hex: 4a 8d 6c 3d 00 |
+ |
+ |
+# Nop for bundle alignment. |
+asm: nop |
+hex: 90 |
+ |
+ |
+# mov %eax,%eax |
+# lea (%r15,%rax,1),%rsp |
+asm: mov %eax,%eax |
+hex: 89 c0 |
+ |
+asm: lea (%r15,%rax,1),%rsp |
+hex: 49 8d 24 07 |
+nc_out: ERROR: Illegal assignment to RSP |
+ |
+ |
+# mov %eax,%eax |
+# lea (%rax,%r15,1),%rsp |
+asm: mov %eax,%eax |
+hex: 89 c0 |
+ |
+asm: lea (%rax,%r15,1),%rsp |
+hex: 4a 8d 24 38 |
+nc_out: ERROR: Illegal assignment to RSP |
+ |