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

Unified Diff: src/IceTargetLoweringX86Base.h

Issue 1257283004: Iasm and obj lowering for advanced switch lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 years, 5 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/IceTargetLoweringX8664.cpp ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX86Base.h
diff --git a/src/IceTargetLoweringX86Base.h b/src/IceTargetLoweringX86Base.h
index 84a1e196434104bf8f2e59bc7a62e8d67ed3f5f3..58c425a3b558f0b9a018500273aa2dbd9cf4991b 100644
--- a/src/IceTargetLoweringX86Base.h
+++ b/src/IceTargetLoweringX86Base.h
@@ -158,6 +158,8 @@ protected:
Operand *Val);
void lowerCountZeros(bool Cttz, Type Ty, Variable *Dest, Operand *FirstVal,
Operand *SecondVal);
+ /// Lower an indirect jump adding sandboxing when needed.
+ void lowerIndirectJump(Variable *Target);
/// Check the comparison is in [Min,Max]. The flags register will be modified
/// with:
@@ -266,18 +268,21 @@ protected:
}
void _br(typename Traits::Cond::BrCond Condition, CfgNode *TargetTrue,
CfgNode *TargetFalse) {
- Context.insert(
- Traits::Insts::Br::create(Func, TargetTrue, TargetFalse, Condition));
+ Context.insert(Traits::Insts::Br::create(
+ Func, TargetTrue, TargetFalse, Condition, Traits::Insts::Br::Far));
}
void _br(CfgNode *Target) {
- Context.insert(Traits::Insts::Br::create(Func, Target));
+ Context.insert(
+ Traits::Insts::Br::create(Func, Target, Traits::Insts::Br::Far));
}
void _br(typename Traits::Cond::BrCond Condition, CfgNode *Target) {
- Context.insert(Traits::Insts::Br::create(Func, Target, Condition));
+ Context.insert(Traits::Insts::Br::create(Func, Target, Condition,
+ Traits::Insts::Br::Far));
}
void _br(typename Traits::Cond::BrCond Condition,
- typename Traits::Insts::Label *Label) {
- Context.insert(Traits::Insts::Br::create(Func, Label, Condition));
+ typename Traits::Insts::Label *Label,
+ typename Traits::Insts::Br::Mode Kind = Traits::Insts::Br::Near) {
+ Context.insert(Traits::Insts::Br::create(Func, Label, Condition, Kind));
}
void _bsf(Variable *Dest, Operand *Src0) {
Context.insert(Traits::Insts::Bsf::create(Func, Dest, Src0));
« no previous file with comments | « src/IceTargetLoweringX8664.cpp ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698