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

Unified Diff: src/trusted/validator_ragel/testdata/64/bswap.test

Issue 18553004: Add more instructions to text-based spec. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: only allow bt* with immediate Created 7 years, 6 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_ragel/testdata/64/bswap.test
diff --git a/src/trusted/validator_ragel/testdata/64/bswap.test b/src/trusted/validator_ragel/testdata/64/bswap.test
index 5e31f6addaacf895b8401d79671cfb7f53ccd418..97c03b363c3c8a5654e1879e00283ffc038a25a4 100644
--- a/src/trusted/validator_ragel/testdata/64/bswap.test
+++ b/src/trusted/validator_ragel/testdata/64/bswap.test
@@ -1,16 +1,30 @@
@hex:
# Test handling of different sizes for instruction bswap.
- # 32-bit example
0f c8
- # 64-bit example
+@dis:
+ 0: 0f c8 bswap %eax
+@rdfa_output:
+ return code: 0
+@spec:
+ SAFE
+----------------------------------------------------------------------
+@hex:
48 0f c8
- # Bad case, we should not parse 16-bit operands
+@dis:
+ 0: 48 0f c8 bswap %rax
+@rdfa_output:
+ return code: 0
+@spec:
+ SAFE
+----------------------------------------------------------------------
+@hex:
+ # Bad case, we should not parse 16-bit operands
+ # (because bswap's behavior is undefined)
66 0f c8
-
@dis:
- 0: 0f c8 bswap %eax
- 2: 48 0f c8 bswap %rax
- 5: 66 0f c8 bswap %ax
+ 0: 66 0f c8 bswap %ax
@rdfa_output:
- 5: [0] unrecognized instruction
+ 0: [0] unrecognized instruction
return code: 1
+@spec:
+ 0: ('bswap is only allowed with 32-bit and 64-bit operands', Instruction(0x0: 66 0f c8 bswap %ax))
« no previous file with comments | « src/trusted/validator_ragel/testdata/64/bsr-mask.test ('k') | src/trusted/validator_ragel/testdata/64/bt.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698