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

Unified Diff: src/IceTargetLowering.cpp

Issue 1605103002: Subzero. X86. Refactors Address Mode formation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: make format Created 4 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/IceTargetLowering.h ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLowering.cpp
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp
index bd5c11b47e4fd0548a6084bf3a0c75a4516f0f42..1f459a49d436b4f7286e3aeda00ff02dbaaaa711 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -245,8 +245,21 @@ void TargetLowering::staticInit(GlobalContext *Ctx) {
}
}
+TargetLowering::SandboxType
+TargetLowering::determineSandboxTypeFromFlags(const ClFlags &Flags) {
+ assert(!Flags.getUseSandboxing() || !Flags.getUseNonsfi());
+ if (Flags.getUseNonsfi()) {
+ return TargetLowering::ST_Nonsfi;
+ }
+ if (Flags.getUseSandboxing()) {
+ return TargetLowering::ST_NaCl;
+ }
+ return TargetLowering::ST_None;
+}
+
TargetLowering::TargetLowering(Cfg *Func)
- : Func(Func), Ctx(Func->getContext()), Context() {}
+ : Func(Func), Ctx(Func->getContext()),
+ SandboxingType(determineSandboxTypeFromFlags(Ctx->getFlags())) {}
TargetLowering::AutoBundle::AutoBundle(TargetLowering *Target,
InstBundleLock::Option Option)
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698