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

Unified Diff: src/trusted/validator_ragel/unreviewed/validator.h

Issue 10883051: Add documentation for the dynamic code modifications. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 4 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/unreviewed/validator.h
===================================================================
--- src/trusted/validator_ragel/unreviewed/validator.h (revision 9563)
+++ src/trusted/validator_ragel/unreviewed/validator.h (working copy)
@@ -12,9 +12,10 @@
EXTERN_C_BEGIN
enum validation_callback_info {
- /* validation_error & IMMEDIATES_INFO will give you immediates size. */
- IMMEDIATES_SIZE = 0x0000000f,
+ /* Anyfield info mask: you can use to parse information about anyfields. */
+ ANYFIELD_INFO_MASK = 0x000000ff,
/* Immediate sizes (immediates always come at the end of instruction). */
+ IMMEDIATES_SIZE_MASK = 0x0000000f,
IMMEDIATE_8BIT = 0x00000001,
IMMEDIATE_16BIT = 0x00000002,
IMMEDIATE_32BIT = 0x00000004,
@@ -24,6 +25,7 @@
/* Second 16bit immediate is only used in "enter" instruction. */
SECOND_IMMEDIATE_16BIT = 0x00000012,
/* Displacement sizes (displacements come at the end - before immediates). */
+ DISPLACEMENT_SIZE_MASK = 0x00000060,
DISPLACEMENT_8BIT = 0x00000021,
DISPLACEMENT_16BIT = 0x00000042,
DISPLACEMENT_32BIT = 0x00000064,
@@ -39,7 +41,7 @@
/* Was restricted from previous instruction used in the current one? */
RESTRICTED_REGISTER_USED = 0x00002000,
/* Mask to select all validation errors. */
- VALIDATION_ERRORS = 0x03ffc000,
+ VALIDATION_ERRORS_MASK = 0x03ffc000,
/* Unrecognized instruction: fatal error, processing stops here. */
UNRECOGNIZED_INSTRUCTION = 0x00004000,
/* Direct jump to unaligned address outside of given region. */
« no previous file with comments | « src/trusted/validator_ragel/unreviewed/sample3.svg ('k') | src/trusted/validator_ragel/unreviewed/validator_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698