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

Unified Diff: src/IceTargetLowering.cpp

Issue 358013003: Subzero: Partial implementation of global initializers. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: After rebasing from laster master Created 6 years, 6 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/IceTargetLoweringX8632.h » ('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 877f717dea7ed9b5b6bfcf7822c4ab66c78b89d2..d29506ee422d19d83e1f2a1004ce5e197e0eab28 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -174,4 +174,23 @@ void TargetLowering::regAlloc() {
LinearScan.scan(RegMask);
}
+TargetGlobalInitLowering *
+TargetGlobalInitLowering::createLowering(TargetArch Target,
+ GlobalContext *Ctx) {
+ // These statements can be #ifdef'd to specialize the code generator
+ // to a subset of the available targets. TODO: use CRTP.
+ if (Target == Target_X8632)
+ return TargetGlobalInitX8632::create(Ctx);
+#if 0
+ if (Target == Target_X8664)
+ return IceTargetGlobalInitX8664::create(Ctx);
+ if (Target == Target_ARM32)
+ return IceTargetGlobalInitARM32::create(Ctx);
+ if (Target == Target_ARM64)
+ return IceTargetGlobalInitARM64::create(Ctx);
+#endif
+ llvm_unreachable("Unsupported target");
+ return NULL;
+}
+
} // end of namespace Ice
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698