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

Unified Diff: src/trusted/validator_ragel/decoder_x86_64.rl

Issue 11000033: Move validator_x86_XX.rl out of unreviewed. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 7 years, 9 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/decoder_x86_64.rl
===================================================================
--- src/trusted/validator_ragel/decoder_x86_64.rl (revision 10976)
+++ src/trusted/validator_ragel/decoder_x86_64.rl (working copy)
@@ -21,13 +21,8 @@
#include "native_client/src/include/elf32.h"
#include "native_client/src/shared/utils/types.h"
-#include "native_client/src/trusted/validator_ragel/unreviewed/decoder_internal.h"
+#include "native_client/src/trusted/validator_ragel/decoder_internal.h"
-/*
- * These prefixes are only useful in AMD64 mode, but they will "cleaned up" by
- * decoder's cleanup procedure in IA32 mode anyway. That's why we define them
- * twice: "real" version here and "do-nothing" in decoder_x86_32.rl.
- */
#define SET_REX_PREFIX(P) instruction.prefix.rex = (P)
#define SET_VEX_PREFIX2(P) vex_prefix2 = (P)
#define CLEAR_SPURIOUS_REX_B() \
@@ -100,6 +95,10 @@
main := decoder;
}%%
+/*
+ * The "write data" statement causes Ragel to emit the constant static data
+ * needed by the ragel machine.
+ */
%% write data;
int DecodeChunkAMD64(const uint8_t *data, size_t size,
@@ -120,7 +119,7 @@
SET_DISP_TYPE(DISPNONE);
SET_IMM_TYPE(IMMNONE);
- SET_IMM2_TYPE(IMMNONE);
+ SET_SECOND_IMM_TYPE(IMMNONE);
SET_REX_PREFIX(FALSE);
SET_DATA16_PREFIX(FALSE);
SET_LOCK_PREFIX(FALSE);
@@ -134,7 +133,15 @@
instruction.prefix.rex_r_spurious = FALSE;
instruction.prefix.rex_w_spurious = FALSE;
+ /*
+ * The "write init" statement causes Ragel to emit initialization code.
+ * This should be executed once before the ragel machine is started.
+ */
%% write init;
+ /*
+ * The "write exec" statement causes Ragel to emit the ragel machine's
+ * execution code.
+ */
%% write exec;
error_detected:

Powered by Google App Engine
This is Rietveld 408576698