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

Unified Diff: src/trusted/validator_mips/validator.cc

Issue 11415031: [MIPS] Forbid $sp update at the end of the last bundle. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 8 years, 1 month 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_mips/validator.cc
diff --git a/src/trusted/validator_mips/validator.cc b/src/trusted/validator_mips/validator.cc
index 1e4d71e651258106447f6e1013b11454983db0dd..33fdfe20eebaf58cbd722b17bc23541bcd24b237 100644
--- a/src/trusted/validator_mips/validator.cc
+++ b/src/trusted/validator_mips/validator.cc
@@ -355,6 +355,12 @@ bool SfiValidator::ValidateFallthrough(const CodeSegment &segment,
prev = inst;
}
+
+ // Validate the last instruction, paired with a nop.
+ const Instruction nop(nacl_mips_dec::kNop);
+ DecodedInstruction one_past_end(segment.EndAddr(), nop, initial_decoder);
JF 2012/11/16 21:03:27 Why initial_decoder here? The ARM change does: de
petarj 2012/11/19 18:46:10 Changed to nacl_mips_dec::decode(nop, decode_state
+ complete_success &= ApplyPatterns(prev, one_past_end, critical, out);
+
return complete_success;
}

Powered by Google App Engine
This is Rietveld 408576698