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

Unified Diff: src/trusted/validator_x86/testdata/64/strings.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/strings.tf
diff --git a/src/trusted/validator_x86/testdata/64/strings.tf b/src/trusted/validator_x86/testdata/64/strings.tf
new file mode 100644
index 0000000000000000000000000000000000000000..b40888907483b288a97d417d127c60798f394818
--- /dev/null
+++ b/src/trusted/validator_x86/testdata/64/strings.tf
@@ -0,0 +1,171 @@
+BITS: 64
+OUTCOME: invalid
+
+# Test string operations with 1 memory operand
+# mov %edi,%edi
+# lea (%r15,%rdi,1),%rdi
+# scas %es:(%rdi),%al
+asm: mov %edi,%edi
+hex: 89 ff
+
+asm: lea (%r15,%rdi,1),%rdi
+hex: 49 8d 3c 3f
+
+asm: scas %es:(%rdi),%al
+hex: ae
+
+
+# add %edi,%edi
+# lea (%r15,%rdi,1),%rdi
+# scas %es:(%rdi),%al
+asm: add %edi,%edi
+hex: 01 ff
+
+asm: lea (%r15,%rdi,1),%rdi
+hex: 49 8d 3c 3f
+
+asm: scas %es:(%rdi),%al
+hex: ae
+nc_out: ERROR: Segment memory reference not allowed
+
+
+# mov %edi,%edi
+# add %r15,%rdi
+# scas %es:(%rdi),%al
+asm: mov %edi,%edi
+hex: 89 ff
+
+asm: add %r15,%rdi
+hex: 4c 01 ff
+
+asm: scas %es:(%rdi),%al
+hex: ae
+nc_out: ERROR: Segment memory reference not allowed
+
+
+# mov %edi,%edi
+# lea (%rdi,%r15,1),%rdi
+# scas %es:(%rdi),%al
+asm: mov %edi,%edi
+hex: 89 ff
+
+asm: lea (%rdi,%r15,1),%rdi
+hex: 4a 8d 3c 3f
+
+asm: scas %es:(%rdi),%al
+hex: ae
+nc_out: ERROR: Segment memory reference not allowed
+
+
+# Test string operations with 2 memory operands.
+# mov %esi,%esi
+# add %r15,%rsi
+# mov %edi,%edi
+# add %r15,%rdi
+# movsl %ds:(%rsi),%es:(%rdi)
+asm: mov %esi,%esi
+hex: 89 f6
+
+asm: add %r15,%rsi
+hex: 4c 01 fe
+
+asm: mov %edi,%edi
+hex: 89 ff
+
+asm: add %r15,%rdi
+hex: 4c 01 ff
+
+asm: movsl %ds:(%rsi),%es:(%rdi)
+hex: a5
+nc_out: ERROR: Segment memory reference not allowed
+nc_out: ERROR: Segment memory reference not allowed
+
+
+# mov %esi,%esi
+# add %r15,%rsi
+# mov %edi,%edi
+# add %r15,%rdi
+# cmpsl %es:(%rdi),%ds:(%rsi)
+asm: mov %esi,%esi
+hex: 89 f6
+
+asm: add %r15,%rsi
+hex: 4c 01 fe
+
+asm: mov %edi,%edi
+hex: 89 ff
+
+asm: add %r15,%rdi
+hex: 4c 01 ff
+
+asm: cmpsl %es:(%rdi),%ds:(%rsi)
+hex: a7
+nc_out: ERROR: Segment memory reference not allowed
+nc_out: ERROR: Segment memory reference not allowed
+
+
+# mov %esi,%esi
+# lea (%r15,%rsi),%rsi
+# mov %edi,%edi
+# lea (%r15,%rdi),%rdi
+# cmpsl %es:(%rdi),%ds:(%rsi)
+asm: mov %esi,%esi
+hex: 89 f6
+
+asm: lea (%r15,%rsi,1),%rsi
+hex: 49 8d 34 37
+
+asm: mov %edi,%edi
+hex: 89 ff
+
+asm: lea (%r15,%rdi,1),%rdi
+hex: 49 8d 3c 3f
+
+asm: cmpsl %es:(%rdi),%ds:(%rsi)
+hex: a7
+
+
+# mov %edi,%edi
+# lea (%r15,%rdi),%rdi
+# mov %esi,%esi
+# lea (%r15,%rsi),%rsi
+# cmpsl %es:(%rdi),%ds:(%rsi)
+asm: mov %edi,%edi
+hex: 89 ff
+
+asm: lea (%r15,%rdi,1),%rdi
+hex: 49 8d 3c 3f
+
+asm: mov %esi,%esi
+hex: 89 f6
+
+asm: lea (%r15,%rsi,1),%rsi
+hex: 49 8d 34 37
+
+asm: cmpsl %es:(%rdi),%ds:(%rsi)
+hex: a7
+nc_out: ERROR: Segment memory reference not allowed
+
+
+# add %esi,%esi
+# lea (%r15,%rsi,1),%rsi
+# add %edi,%edi
+# lea (%r15,%rdi,1),%rdi
+# cmpsl %es:(%rdi),%ds:(%rsi)
+asm: add %esi,%esi
+hex: 01 f6
+
+asm: lea (%r15,%rsi,1),%rsi
+hex: 49 8d 34 37
+
+asm: add %edi,%edi
+hex: 01 ff
+
+asm: lea (%r15,%rdi,1),%rdi
+hex: 49 8d 3c 3f
+
+asm: cmpsl %es:(%rdi),%ds:(%rsi)
+hex: a7
+nc_out: ERROR: Segment memory reference not allowed
+nc_out: ERROR: Segment memory reference not allowed
+

Powered by Google App Engine
This is Rietveld 408576698