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

Unified Diff: src/trusted/validator_arm/actual_classes.cc

Issue 11194045: Change BKPT and UDF encodings on ARM. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Update copyright. Created 8 years, 2 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_arm/actual_classes.h ('k') | src/trusted/validator_arm/armv7.table » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/validator_arm/actual_classes.cc
diff --git a/src/trusted/validator_arm/actual_classes.cc b/src/trusted/validator_arm/actual_classes.cc
index 505a3ef94fb23f15d640083cde8993ecdd470aa7..ba3afbc255268169c8da54e601fcce2750548b51 100644
--- a/src/trusted/validator_arm/actual_classes.cc
+++ b/src/trusted/validator_arm/actual_classes.cc
@@ -528,26 +528,38 @@ RegisterList EffectiveNoOp::defs(Instruction i) const {
return RegisterList();
}
-// Roadblock
-SafetyLevel Roadblock::safety(Instruction i) const {
- UNREFERENCED_PARAMETER(i);
- return MAY_BE_SAFE;
+// PermanentlyUndefined
+SafetyLevel PermanentlyUndefined::safety(Instruction i) const {
+ // Restrict UDF's encoding to values we've chosen as safe.
+ if ((i.Bits(31, 0) == kHaltFill) ||
+ (i.Bits(31, 0) == kAbortNow))
+ return MAY_BE_SAFE;
+ return FORBIDDEN_OPERANDS;
}
-RegisterList Roadblock::defs(Instruction i) const {
+RegisterList PermanentlyUndefined::defs(Instruction i) const {
UNREFERENCED_PARAMETER(i);
return RegisterList();
}
// Breakpoint
SafetyLevel Breakpoint::safety(Instruction i) const {
- return i.GetCondition() == Instruction::AL
- ? MAY_BE_SAFE
- : UNPREDICTABLE;
+ if (i.GetCondition() != Instruction::AL)
+ return UNPREDICTABLE;
+ // Restrict BKPT's encoding to values we've chosen as safe.
+ if ((i.Bits(31, 0) == kLiteralPoolHead) ||
+ (i.Bits(31, 0) == kBreakpoint))
+ return MAY_BE_SAFE;
+ return FORBIDDEN_OPERANDS;
+}
+
+RegisterList Breakpoint::defs(Instruction i) const {
+ UNREFERENCED_PARAMETER(i);
+ return RegisterList();
}
bool Breakpoint::is_literal_pool_head(const Instruction i) const {
- return i.Bits(31, 0) == kLiteralPoolHeadInstruction;
+ return i.Bits(31, 0) == kLiteralPoolHead;
}
SafetyLevel PackSatRev::safety(const Instruction i) const {
« no previous file with comments | « src/trusted/validator_arm/actual_classes.h ('k') | src/trusted/validator_arm/armv7.table » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698