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

Unified Diff: src/trusted/validator/x86/testing/tf/converted/64/movs_test.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: fix for windows (temp files and crlf) 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/testing/tf/converted/64/movs_test.tf
diff --git a/src/trusted/validator/x86/testing/tf/converted/64/movs_test.tf b/src/trusted/validator/x86/testing/tf/converted/64/movs_test.tf
new file mode 100644
index 0000000000000000000000000000000000000000..e0b63578c8002ab551fd6bf17f8215f2712b4a10
--- /dev/null
+++ b/src/trusted/validator/x86/testing/tf/converted/64/movs_test.tf
@@ -0,0 +1,60 @@
+BITS: 64
+OUTCOME: invalid
+
+# Test that we correctly check both implicit arguments to movsb
+
+# Valid case, within bundle
+# 0000000000000000: 89 f6 mov %esi, %esi
+# 0000000000000002: 49 8d 34 37 lea %rsi, [%r15+%rsi*1]
+# 0000000000000006: 89 ff mov %edi, %edi
+# 0000000000000008: 49 8d 3c 3f lea %rdi, [%r15+%rdi*1]
+# 000000000000000c: a4 movsb
+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: movsb %ds:(%rsi),%es:(%rdi)
+hex: a4
+
+
+# Nop spacer.
+asm: nop; nop; nop; nop; nop; nop; nop; nop
+hex: 90 90 90 90 90 90 90 90
+
+asm: nop; nop; nop; nop; nop; nop; nop; nop
+hex: 90 90 90 90 90 90 90 90
+
+asm: nop
+hex: 90
+
+
+# invalid case, crosses bundle
+# 000000000000001e: 89 f6 mov %esi, %esi
+# 0000000000000020: 49 8d 34 37 lea %rsi, [%r15+%rsi*1]
+# 0000000000000024: 89 ff mov %edi, %edi
+# 0000000000000026: 49 8d 3c 3f lea %rdi, [%r15+%rdi*1]
+# 000000000000002a: a4 movsb
+asm: mov %esi,%esi
+hex: 89 f6
+
+asm: lea (%r15,%rsi,1),%rsi
+hex: 49 8d 34 37
+nc_out: Bad basic block alignment.
+
+asm: mov %edi,%edi
+hex: 89 ff
+
+asm: lea (%r15,%rdi,1),%rdi
+hex: 49 8d 3c 3f
+
+asm: movsb %ds:(%rsi),%es:(%rdi)
+hex: a4
+

Powered by Google App Engine
This is Rietveld 408576698