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

Unified Diff: src/trusted/validator_ragel/validator_internal.h

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 8 years, 3 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/validator_internal.h
===================================================================
--- src/trusted/validator_ragel/validator_internal.h (revision 9857)
+++ src/trusted/validator_ragel/validator_internal.h (working copy)
@@ -14,7 +14,7 @@
#include "native_client/src/shared/platform/nacl_check.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/unreviewed/decoding.h"
#include "native_client/src/trusted/validator_ragel/unreviewed/validator.h"
/* Maximum set of R-DFA allowable CPUID features. */
@@ -304,7 +304,8 @@
((((bitmap_word)1) << bits) - 1) << (index % NACL_HOST_WORDSIZE);
}
-/* Mark the destination of a jump instruction and make an early validity check:
+/*
+ * Mark the destination of a jump instruction and make an early validity check:
* to jump outside given code region, the target address must be aligned.
*
* Returns TRUE iff the jump passes the early validity check.
@@ -322,7 +323,22 @@
return TRUE;
}
+/*
+ * Mark the gived address as valid jump target address.
+ */
+static FORCEINLINE void MakeJumpTargetValid(size_t address,
+ bitmap_word *valid_targets) {
+ BitmapSetBit(valid_targets, address);
+}
+/*
+ * Mark the gived address as invalid jump target address.
+ */
+static FORCEINLINE void MakeJumpTargetInvalid(size_t address,
+ bitmap_word *valid_targets) {
+ BitmapClearBit(valid_targets, address);
+}
+
static INLINE Bool ProcessInvalidJumpTargets(
const uint8_t *data,
size_t size,

Powered by Google App Engine
This is Rietveld 408576698