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

Unified Diff: src/trusted/validator/x86/ncval_seg_sfi/generator/ncdecode_table.c

Issue 10809021: Add tzcnt as an acceptable instruction to the x86-32 validator (it already (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 5 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/ncval_seg_sfi/generator/ncdecode_table.c
===================================================================
--- src/trusted/validator/x86/ncval_seg_sfi/generator/ncdecode_table.c (revision 9237)
+++ src/trusted/validator/x86/ncval_seg_sfi/generator/ncdecode_table.c (working copy)
@@ -2168,12 +2168,19 @@
EncodeOpF20F(0xbb, 0, IMM_NONE, NACLi_INVALID, "reserved");
EncodeOp0F(0xbc, 1, IMM_NONE, NACLi_386, "bsf $Gv, $Ev");
- EncodeOpF30F(0xbc, 0, IMM_NONE, NACLi_INVALID, "reserved");
+ /* tzcnt is treated as a bsf on machines that don't have tzcnt.
+ * Hence, even though its conditional on NACLi_LZCNT, we act
+ * like it can be used on all processors.
+ */
+ EncodeOpF30F(0xbc, 1, IMM_NONE, NACLi_386, "tzcnt $Gv, $Ev");
Karl 2012/07/24 21:15:45 Followed Roland's advice and made it work for all
EncodeOpF20F(0xbc, 0, IMM_NONE, NACLi_INVALID, "reserved");
EncodeOp0F(0xbd, 1, IMM_NONE, NACLi_386, "bsr $Gv, $Ev");
- /* lzcnt is treated as a bsr on machines that don't have lzcnt */
- EncodeOpF30F(0xbd, 1, IMM_NONE, NACLi_LZCNT, "lzcnt $Gv, $Ev");
+ /* lzcnt is treated as a bsr on machines that don't have lzcnt.
+ * Hence, even though its conditional on NACLi_LZCNT, we act
+ * like it can be used on all processors.
+ */
+ EncodeOpF30F(0xbd, 1, IMM_NONE, NACLi_386, "lzcnt $Gv, $Ev");
Karl 2012/07/24 21:15:45 Did the same for lzcnt.
EncodeOpF20F(0xbd, 0, IMM_NONE, NACLi_INVALID, "reserved");
EncodeOp0F(0xbe, 1, IMM_NONE, NACLi_386, "movsx $Gv, $Eb");
« no previous file with comments | « src/trusted/validator/x86/ncval_seg_sfi/gen/ncdisasmtab_64.h ('k') | src/trusted/validator_x86/testdata/32/lzcnt.hex » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698