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

Unified Diff: src/trusted/validator_ragel/unreviewed/validator_internal.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_internal.h
===================================================================
--- src/trusted/validator_ragel/unreviewed/validator_internal.h (revision 9570)
+++ src/trusted/validator_ragel/unreviewed/validator_internal.h (working copy)
@@ -370,9 +370,10 @@
int8_t offset = (uint8_t) (rip[-1]);
size_t jump_dest = offset + (rip - codeblock_start);
- if (!MarkJumpTarget(jump_dest, jump_dests, jumpdests_size)) {
- *instruction_info_collected |= DIRECT_JUMP_OUT_OF_RANGE;
- }
+ if (!MarkJumpTarget(jump_dest, jump_dests, jumpdests_size))
+ *instruction_info_collected |= RELATIVE_8BIT | DIRECT_JUMP_OUT_OF_RANGE;
+ else
+ *instruction_info_collected |= RELATIVE_8BIT;
}
/*
@@ -389,9 +390,10 @@
rip[-2] + 256U * ((uint32_t) rip[-1]))));
size_t jump_dest = offset + (rip - codeblock_start);
- if (!MarkJumpTarget(jump_dest, jump_dests, jumpdests_size)) {
- *instruction_info_collected |= DIRECT_JUMP_OUT_OF_RANGE;
- }
+ if (!MarkJumpTarget(jump_dest, jump_dests, jumpdests_size))
+ *instruction_info_collected |= RELATIVE_32BIT | DIRECT_JUMP_OUT_OF_RANGE;
+ else
+ *instruction_info_collected |= RELATIVE_32BIT;
}
static INLINE void check_access(ptrdiff_t instruction_start,
« no previous file with comments | « src/trusted/validator_ragel/unreviewed/validator.h ('k') | src/trusted/validator_ragel/unreviewed/validator_internals.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698