Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2282)

Unified Diff: src/trusted/validator_x86/testdata/64/stack_regs.tf

Issue 10908137: (abandoned) Validator tests: convert hexes to TFs and run on bots (for prod. validator only) (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: restore 'read overflow' and 'SegmentationError' Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
+

Powered by Google App Engine
This is Rietveld 408576698