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

Side by Side Diff: src/IceTargetLoweringX8632.cpp

Issue 1191573003: Add a basic enum for ARM InstructionSet / cpu features. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: comment Created 5 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 unified diff | Download patch
« no previous file with comments | « src/IceTargetLoweringX8632.h ('k') | src/IceTypes.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/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===// 1 //===- subzero/src/IceTargetLoweringX8632.cpp - x86-32 lowering -----------===//
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 TargetLoweringX8632 class, which 10 // This file implements the TargetLoweringX8632 class, which
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 Str << "\n"; 388 Str << "\n";
389 } 389 }
390 } 390 }
391 391
392 void TargetX8632::initNodeForLowering(CfgNode *Node) { 392 void TargetX8632::initNodeForLowering(CfgNode *Node) {
393 FoldingInfo.init(Node); 393 FoldingInfo.init(Node);
394 FoldingInfo.dump(Func); 394 FoldingInfo.dump(Func);
395 } 395 }
396 396
397 TargetX8632::TargetX8632(Cfg *Func) 397 TargetX8632::TargetX8632(Cfg *Func)
398 : TargetLowering(Func), 398 : TargetLowering(Func), InstructionSet(X86InstructionSet::Begin),
399 InstructionSet(static_cast<X86InstructionSet>(
400 Func->getContext()->getFlags().getTargetInstructionSet() -
401 TargetInstructionSet::X86InstructionSet_Begin)),
402 IsEbpBasedFrame(false), NeedsStackAlignment(false), 399 IsEbpBasedFrame(false), NeedsStackAlignment(false),
403 SpillAreaSizeBytes(0) { 400 SpillAreaSizeBytes(0) {
404 static_assert((X86InstructionSet::End - X86InstructionSet::Begin) == 401 static_assert((X86InstructionSet::End - X86InstructionSet::Begin) ==
405 (TargetInstructionSet::X86InstructionSet_End - 402 (TargetInstructionSet::X86InstructionSet_End -
406 TargetInstructionSet::X86InstructionSet_Begin), 403 TargetInstructionSet::X86InstructionSet_Begin),
407 "X86InstructionSet range different from TargetInstructionSet"); 404 "X86InstructionSet range different from TargetInstructionSet");
405 if (Func->getContext()->getFlags().getTargetInstructionSet() !=
406 TargetInstructionSet::BaseInstructionSet) {
407 InstructionSet = static_cast<X86InstructionSet>(
Jim Stichnoth 2015/06/15 21:46:01 Seems like this should be getTargetInstructionSe
jvoung (off chromium) 2015/06/15 23:58:19 Done.
408 Func->getContext()->getFlags().getTargetInstructionSet() -
409 TargetInstructionSet::X86InstructionSet_Begin);
410 }
408 // TODO: Don't initialize IntegerRegisters and friends every time. 411 // TODO: Don't initialize IntegerRegisters and friends every time.
409 // Instead, initialize in some sort of static initializer for the 412 // Instead, initialize in some sort of static initializer for the
410 // class. 413 // class.
411 llvm::SmallBitVector IntegerRegisters(RegX8632::Reg_NUM); 414 llvm::SmallBitVector IntegerRegisters(RegX8632::Reg_NUM);
412 llvm::SmallBitVector IntegerRegistersI8(RegX8632::Reg_NUM); 415 llvm::SmallBitVector IntegerRegistersI8(RegX8632::Reg_NUM);
413 llvm::SmallBitVector FloatRegisters(RegX8632::Reg_NUM); 416 llvm::SmallBitVector FloatRegisters(RegX8632::Reg_NUM);
414 llvm::SmallBitVector VectorRegisters(RegX8632::Reg_NUM); 417 llvm::SmallBitVector VectorRegisters(RegX8632::Reg_NUM);
415 llvm::SmallBitVector InvalidRegisters(RegX8632::Reg_NUM); 418 llvm::SmallBitVector InvalidRegisters(RegX8632::Reg_NUM);
416 ScratchRegs.resize(RegX8632::Reg_NUM); 419 ScratchRegs.resize(RegX8632::Reg_NUM);
417 #define X(val, encode, name, name16, name8, scratch, preserved, stackptr, \ 420 #define X(val, encode, name, name16, name8, scratch, preserved, stackptr, \
(...skipping 4769 matching lines...) Expand 10 before | Expand all | Expand 10 after
5187 emitConstantPool<PoolTypeConverter<float>>(Ctx); 5190 emitConstantPool<PoolTypeConverter<float>>(Ctx);
5188 emitConstantPool<PoolTypeConverter<double>>(Ctx); 5191 emitConstantPool<PoolTypeConverter<double>>(Ctx);
5189 } break; 5192 } break;
5190 } 5193 }
5191 } 5194 }
5192 5195
5193 TargetHeaderX8632::TargetHeaderX8632(GlobalContext *Ctx) 5196 TargetHeaderX8632::TargetHeaderX8632(GlobalContext *Ctx)
5194 : TargetHeaderLowering(Ctx) {} 5197 : TargetHeaderLowering(Ctx) {}
5195 5198
5196 } // end of namespace Ice 5199 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX8632.h ('k') | src/IceTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698