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

Side by Side 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, 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 unified diff | Download patch
« no previous file with comments | « src/IceTargetLowering.h ('k') | src/IceTargetLoweringX8632.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===// 1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file implements the skeleton of the TargetLowering class, 10 // This file implements the skeleton of the TargetLowering class,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 RegSetMask RegExclude = RegSet_None; 167 RegSetMask RegExclude = RegSet_None;
168 RegInclude |= RegSet_CallerSave; 168 RegInclude |= RegSet_CallerSave;
169 RegInclude |= RegSet_CalleeSave; 169 RegInclude |= RegSet_CalleeSave;
170 RegExclude |= RegSet_StackPointer; 170 RegExclude |= RegSet_StackPointer;
171 if (hasFramePointer()) 171 if (hasFramePointer())
172 RegExclude |= RegSet_FramePointer; 172 RegExclude |= RegSet_FramePointer;
173 llvm::SmallBitVector RegMask = getRegisterSet(RegInclude, RegExclude); 173 llvm::SmallBitVector RegMask = getRegisterSet(RegInclude, RegExclude);
174 LinearScan.scan(RegMask); 174 LinearScan.scan(RegMask);
175 } 175 }
176 176
177 TargetGlobalInitLowering *
178 TargetGlobalInitLowering::createLowering(TargetArch Target,
179 GlobalContext *Ctx) {
180 // These statements can be #ifdef'd to specialize the code generator
181 // to a subset of the available targets. TODO: use CRTP.
182 if (Target == Target_X8632)
183 return TargetGlobalInitX8632::create(Ctx);
184 #if 0
185 if (Target == Target_X8664)
186 return IceTargetGlobalInitX8664::create(Ctx);
187 if (Target == Target_ARM32)
188 return IceTargetGlobalInitARM32::create(Ctx);
189 if (Target == Target_ARM64)
190 return IceTargetGlobalInitARM64::create(Ctx);
191 #endif
192 llvm_unreachable("Unsupported target");
193 return NULL;
194 }
195
177 } // end of namespace Ice 196 } // end of namespace Ice
OLDNEW
« 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