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

Unified Diff: src/trusted/validator_x86/testdata/64/prefix-single.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/prefix-single.tf
diff --git a/src/trusted/validator_x86/testdata/64/prefix-single.tf b/src/trusted/validator_x86/testdata/64/prefix-single.tf
new file mode 100644
index 0000000000000000000000000000000000000000..8fd341b6e849bca8e21c50892df6c130e4729427
--- /dev/null
+++ b/src/trusted/validator_x86/testdata/64/prefix-single.tf
@@ -0,0 +1,173 @@
+BITS: 64
+OUTCOME: invalid
+
+# lock add %eax,(%rsp)
+asm: lock add %eax,(%rsp)
+hex: F0 01 04 24
+
+# mov %edi,%edi
+# lea (%r15,%rdi),%rdi
+# rep stos %eax,%es:(%rdi)
+asm: mov %edi,%edi
+hex: 89 FF
+
+asm: lea (%r15,%rdi,1),%rdi
+hex: 49 8D 3C 3F
+
+asm: rep stos %eax,%es:(%rdi)
+hex: F3 AB
+
+# mov %edi,%edi
+# lea (%r15,%rdi),%rdi
+# repne scas %es:(%rdi),%al
+asm: mov %edi,%edi
+hex: 89 FF
+
+asm: lea (%r15,%rdi,1),%rdi
+hex: 49 8D 3C 3F
+
+asm: repnz scas %es:(%rdi),%al
+hex: F2 AE
+
+# mov %ax, %ax
+asm: mov %ax,%ax
+hex: 66 89 C0
+
+# rex jmp $
+hex: 40 EB FD
+
+# Branch prediction prefixes. (for jz).
+hex: 2e 74 02
+
+hex: 3e 74 02
+nc_out: [at +2] Bad jump target
+
+
+# Forbidden prefixes.
+# rep push %eax
+hex: F3 50
+nc_out: ERROR: Use of REP (F3) prefix for instruction not allowed by Native Client
+
+# mov %edi,%edi
+# lea (%r15,%rdi),%rdi
+# repne stos %eax,%es:(%rdi)
+asm: mov %edi,%edi
+hex: 89 FF
+
+asm: lea (%r15,%rdi,1),%rdi
+hex: 49 8D 3C 3F
+
+asm: repnz stos %eax,%es:(%rdi)
+hex: F2 AB
+nc_out: ERROR: Use of REPNE (F2) prefix for instruction not allowed by Native Client
+
+# fs mov %eax,%eax
+asm: fs; mov %eax,%eax
+hex: 64 89 C0
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# gs mov %eax,%eax
+asm: gs; mov %eax,%eax
+hex: 65 89 C0
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# mov %eax,%cs:(%rsp)
+asm: mov %eax,%cs:(%rsp)
+hex: 2E 89 04 24
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# mov %eax,%ss:(%rsp)
+hex: 36 89 04 24
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# mov %eax,%ds:(%rsp)
+asm: mov %eax,%ds:(%rsp)
+hex: 3E 89 04 24
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# mov %eax,%es:(%rsp)
+asm: mov %eax,%es:(%rsp)
+hex: 26 89 04 24
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# mov %eax,%fs:(%rsp)
+asm: mov %eax,%fs:(%rsp)
+hex: 64 89 04 24
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+nc_out: ERROR: Segment memory reference not allowed
+
+# mov %eax,%gs:(%rsp)
+asm: mov %eax,%gs:(%rsp)
+hex: 65 89 04 24
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+nc_out: ERROR: Segment memory reference not allowed
+
+# mov %eax,(%esp)
+asm: addr32 mov %eax,(%esp)
+hex: 67 89 04 24
+nc_out: ERROR: Use of 67 (ADDR16) prefix not allowed by Native Client
+nc_out: ERROR: Assignment to non-64 bit memory address
+
+# cs jmp $
+hex: 2E EB FD
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# ss jmp $
+hex: 36 EB FD
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# ds jmp $
+hex: 3E EB FD
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# es jmp $
+hex: 26 EB FD
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# fs jmp $
+hex: 64 EB FD
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# gs jmp $
+hex: 65 EB FD
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# jmp dword $
+hex: 66 EB FD
+nc_out: ERROR: Use of DATA16 (66) prefix for instruction not allowed by Native Client
+nc_out: [at +2] Bad basic block alignment.
+
+# ss jz $
+hex: 36 74 02
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+
+# fs jz $
+hex: 64 74 02
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+nc_out: [at +2] Bad jump target
+
+# gs jz $
+hex: 65 74 02
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+nc_out: [at +2] Bad jump target
+
+# es jz $
+hex: 26 74 02
+nc_out: ERROR: Uses a segment prefix byte not allowed by Native Client
+nc_out: [at +2] Bad jump target
+
+
+# Mandatory prefix.
+# phaddw %xmm0,%xmm1
+asm: phaddw %xmm0,%xmm1
+hex: 66 0f 38 01 c8
+nc_out: [at +2] Bad jump target
+
+# addsd %xmm0,%xmm1
+asm: addsd %xmm0,%xmm1
+hex: f2 0f 58 c8
+
+# cmpeqss %xmm0,%xmm1
+asm: cmpeqss %xmm0,%xmm1
+hex: f3 0f c2 c8 00
+

Powered by Google App Engine
This is Rietveld 408576698