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

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: plus begin 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>(
408 (Func->getContext()->getFlags().getTargetInstructionSet() -
409 TargetInstructionSet::X86InstructionSet_Begin) +
410 X86InstructionSet::Begin);
411 }
408 // TODO: Don't initialize IntegerRegisters and friends every time. 412 // TODO: Don't initialize IntegerRegisters and friends every time.
409 // Instead, initialize in some sort of static initializer for the 413 // Instead, initialize in some sort of static initializer for the
410 // class. 414 // class.
411 llvm::SmallBitVector IntegerRegisters(RegX8632::Reg_NUM); 415 llvm::SmallBitVector IntegerRegisters(RegX8632::Reg_NUM);
412 llvm::SmallBitVector IntegerRegistersI8(RegX8632::Reg_NUM); 416 llvm::SmallBitVector IntegerRegistersI8(RegX8632::Reg_NUM);
413 llvm::SmallBitVector FloatRegisters(RegX8632::Reg_NUM); 417 llvm::SmallBitVector FloatRegisters(RegX8632::Reg_NUM);
414 llvm::SmallBitVector VectorRegisters(RegX8632::Reg_NUM); 418 llvm::SmallBitVector VectorRegisters(RegX8632::Reg_NUM);
415 llvm::SmallBitVector InvalidRegisters(RegX8632::Reg_NUM); 419 llvm::SmallBitVector InvalidRegisters(RegX8632::Reg_NUM);
416 ScratchRegs.resize(RegX8632::Reg_NUM); 420 ScratchRegs.resize(RegX8632::Reg_NUM);
417 #define X(val, encode, name, name16, name8, scratch, preserved, stackptr, \ 421 #define X(val, encode, name, name16, name8, scratch, preserved, stackptr, \
(...skipping 4693 matching lines...) Expand 10 before | Expand all | Expand 10 after
5111 emitConstantPool<PoolTypeConverter<float>>(Ctx); 5115 emitConstantPool<PoolTypeConverter<float>>(Ctx);
5112 emitConstantPool<PoolTypeConverter<double>>(Ctx); 5116 emitConstantPool<PoolTypeConverter<double>>(Ctx);
5113 } break; 5117 } break;
5114 } 5118 }
5115 } 5119 }
5116 5120
5117 TargetHeaderX8632::TargetHeaderX8632(GlobalContext *Ctx) 5121 TargetHeaderX8632::TargetHeaderX8632(GlobalContext *Ctx)
5118 : TargetHeaderLowering(Ctx) {} 5122 : TargetHeaderLowering(Ctx) {}
5119 5123
5120 } // end of namespace Ice 5124 } // 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