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

Unified Diff: src/trusted/validator_ragel/dfa_validate_32.c

Issue 1269113003: Rewrite non-temporal instructions Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Format Created 5 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/dfa_validate_32.c
diff --git a/src/trusted/validator_ragel/dfa_validate_32.c b/src/trusted/validator_ragel/dfa_validate_32.c
index bdbe510a5745417d872ceb43a56ff5b50317dd13..1ef111423766bc0c470ce9f2c167570b2655bb49 100644
--- a/src/trusted/validator_ragel/dfa_validate_32.c
+++ b/src/trusted/validator_ragel/dfa_validate_32.c
@@ -39,9 +39,9 @@ NaClValidationStatus ApplyDfaValidator_x86_32(
NaClCPUFeaturesX86 *cpu_features = (NaClCPUFeaturesX86 *) f;
enum NaClValidationStatus status = NaClValidationFailed;
void *query = NULL;
+ uint32_t options;
struct StubOutCallbackData callback_data;
- callback_data.flags = flags;
- callback_data.did_rewrite = 0;
+
UNREFERENCED_PARAMETER(guest_addr);
if (stubout_mode)
@@ -68,17 +68,26 @@ NaClValidationStatus ApplyDfaValidator_x86_32(
}
}
+ options = 0;
+ callback_data.flags = flags;
+ callback_data.chunk_processed_as_a_contiguous_stream =
+ (options & PROCESS_CHUNK_AS_A_CONTIGUOUS_STREAM) != 0;
+ callback_data.bundle_begin_offset = (uintptr_t) data & kBundleMask;
+ callback_data.cpu_features = cpu_features;
+ callback_data.did_rewrite = 0;
+
if (readonly_text) {
- if (ValidateChunkIA32(data, size, 0 /*options*/, cpu_features,
+ if (ValidateChunkIA32(data, size, options, cpu_features,
NaClDfaProcessValidationError,
NULL))
status = NaClValidationSucceeded;
} else {
- if (ValidateChunkIA32(data, size, 0 /*options*/, cpu_features,
+ if (ValidateChunkIA32(data, size, options, cpu_features,
NaClDfaStubOutUnsupportedInstruction,
&callback_data))
status = NaClValidationSucceeded;
}
+
if (status != NaClValidationSucceeded && errno == ENOMEM)
status = NaClValidationFailedOutOfMemory;
« no previous file with comments | « src/trusted/validator/validation_rewrite_64_test_data.S ('k') | src/trusted/validator_ragel/dfa_validate_64.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698