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

Unified Diff: src/trusted/validator_x86/testdata/64/sse4data16.test

Issue 11088006: Validator_ragel: disallow 16-bit form for SSE4 instructions (popcnt, lzcnt, tzcnt) (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fix copypaste artifacts Created 8 years, 2 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
« no previous file with comments | « src/trusted/validator_ragel/unreviewed/general_purpose_instructions.def ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/validator_x86/testdata/64/sse4data16.test
diff --git a/src/trusted/validator_x86/testdata/64/sse4data16.test b/src/trusted/validator_x86/testdata/64/sse4data16.test
new file mode 100644
index 0000000000000000000000000000000000000000..fcb132c577a4d808133ef6565d71e4c820d551e8
--- /dev/null
+++ b/src/trusted/validator_x86/testdata/64/sse4data16.test
@@ -0,0 +1,45 @@
+@hex:
+ # SSE4 uses opcode extension which looks like REP prefix.
+ # Since two prefixes are not allowed, 16-bit form of these perfectly safe
+ # instructions is invalid.
+
+ # popcnt %ax, %bx
+ 66 f3 0f b8 d8
+ f3 66 0f b8 d8
+ # lzcnt %cx, %dx
+ 66 f3 0f bd d1
+ f3 66 0f bd d1
+ # tzcnt %bp, %bx
+ 66 f3 0f bc dd
+ f3 66 0f bc dd
+@rval:
+ VALIDATOR: 0000000000000000: 66 f3 0f b8 d8 popcnt %bx, %ax
+ VALIDATOR: ERROR: More than one (non-REX) prefix byte specified
+ VALIDATOR: 0000000000000005: f3 66 0f b8 d8 popcnt %bx, %ax
+ VALIDATOR: ERROR: More than one (non-REX) prefix byte specified
+ VALIDATOR: 000000000000000a: 66 f3 0f bd d1 lzcnt %dx, %cx
+ VALIDATOR: ERROR: More than one (non-REX) prefix byte specified
+ VALIDATOR: 000000000000000f: f3 66 0f bd d1 lzcnt %dx, %cx
+ VALIDATOR: ERROR: More than one (non-REX) prefix byte specified
+ VALIDATOR: 0000000000000014: 66 f3 0f bc dd tzcnt %bx, %bp
+ VALIDATOR: ERROR: More than one (non-REX) prefix byte specified
+ VALIDATOR: 0000000000000019: f3 66 0f bc dd tzcnt %bx, %bp
+ VALIDATOR: ERROR: More than one (non-REX) prefix byte specified
+ VALIDATOR: Checking jump targets: 0 to 1e
+ VALIDATOR: Checking that basic blocks are aligned
+ *** <input> IS UNSAFE ***
+@dis:
+ 0000000000000000: 66 f3 0f b8 d8 popcnt %bx, %ax
+ 0000000000000005: f3 66 0f b8 d8 popcnt %bx, %ax
+ 000000000000000a: 66 f3 0f bd d1 lzcnt %dx, %cx
+ 000000000000000f: f3 66 0f bd d1 lzcnt %dx, %cx
+ 0000000000000014: 66 f3 0f bc dd tzcnt %bx, %bp
+ 0000000000000019: f3 66 0f bc dd tzcnt %bx, %bp
+@rdfa_output:
+ 0: [0] unrecognized instruction
+ 5: [1] unrecognized instruction
+ a: [2] unrecognized instruction
+ f: [3] unrecognized instruction
+ 14: [4] unrecognized instruction
+ 19: [5] unrecognized instruction
+ return code: 1
« no previous file with comments | « src/trusted/validator_ragel/unreviewed/general_purpose_instructions.def ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698