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

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

Issue 11876041: [MIPS] Add thread-pointer to data addressing register list. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Update the comment. Created 7 years, 11 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
« no previous file with comments | « src/trusted/validator_mips/validator.h ('k') | src/trusted/validator_mips/validator_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/validator_mips/validator.cc
diff --git a/src/trusted/validator_mips/validator.cc b/src/trusted/validator_mips/validator.cc
index 0cd83fa610803709ac6ad3084796f6dbaf96ccb8..0abe704ed6dfde3dad6f056ad1840554d20e457c 100644
--- a/src/trusted/validator_mips/validator.cc
+++ b/src/trusted/validator_mips/validator.cc
@@ -15,9 +15,6 @@ using nacl_mips_dec::ClassDecoder;
using nacl_mips_dec::Register;
using nacl_mips_dec::RegisterList;
-using nacl_mips_dec::kRegisterJumpMask;
-using nacl_mips_dec::kRegisterLoadStoreMask;
-
using nacl_mips_dec::kInstrSize;
using nacl_mips_dec::kInstrAlign;
@@ -146,7 +143,7 @@ static PatternMatch CheckJmpReg(const SfiValidator &sfi,
ProblemSink *out) {
UNREFERENCED_PARAMETER(sfi);
if (second.IsJmpReg()) {
- if (first.IsMask(second.TargetReg(), kRegisterJumpMask)) {
+ if (first.IsMask(second.TargetReg(), Register::JumpMask())) {
return PATTERN_SAFE;
}
out->ReportProblem(second.addr(), second.safety(),
@@ -165,8 +162,8 @@ static PatternMatch CheckDataRegisterUpdate(const SfiValidator &sfi,
const DecodedInstruction &second,
ProblemSink *out) {
if (first.IsDestGprReg(sfi.data_address_registers())
- && !first.IsMask(first.DestGprReg(), kRegisterLoadStoreMask)) {
- if (second.IsMask(first.DestGprReg(), kRegisterLoadStoreMask)) {
+ && !first.IsMask(first.DestGprReg(), Register::LoadStoreMask())) {
+ if (second.IsMask(first.DestGprReg(), Register::LoadStoreMask())) {
return PATTERN_SAFE;
}
out->ReportProblem(first.addr(), first.safety(), kProblemUnsafeDataWrite);
@@ -183,7 +180,7 @@ static PatternMatch CheckDataRegisterDslot(const SfiValidator &sfi,
const DecodedInstruction &second,
ProblemSink *out) {
if (second.IsDestGprReg(sfi.data_address_registers())
- && !second.IsMask(second.DestGprReg(), kRegisterLoadStoreMask)) {
+ && !second.IsMask(second.DestGprReg(), Register::LoadStoreMask())) {
if (first.HasDelaySlot()) {
out->ReportProblem(second.addr(), second.safety(),
kProblemDataRegInDelaySlot);
@@ -204,7 +201,7 @@ static PatternMatch CheckLoadStore(const SfiValidator &sfi,
Register base_addr_reg = second.BaseAddressRegister();
if (!sfi.data_address_registers().
ContainsAll(RegisterList(base_addr_reg))) {
- if (first.IsMask(base_addr_reg, kRegisterLoadStoreMask)) {
+ if (first.IsMask(base_addr_reg, Register::LoadStoreMask())) {
return PATTERN_SAFE;
}
out->ReportProblem(second.addr(), second.safety(),
« no previous file with comments | « src/trusted/validator_mips/validator.h ('k') | src/trusted/validator_mips/validator_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698