Chromium Code Reviews| Index: src/IceTargetLoweringX8632.cpp |
| diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp |
| index dcfdc96dab75eb01a067f292b193f664270c1afc..ad6f596f46c9ddbd0fb2b15904903bedc4b9c92f 100644 |
| --- a/src/IceTargetLoweringX8632.cpp |
| +++ b/src/IceTargetLoweringX8632.cpp |
| @@ -395,16 +395,19 @@ void TargetX8632::initNodeForLowering(CfgNode *Node) { |
| } |
| TargetX8632::TargetX8632(Cfg *Func) |
| - : TargetLowering(Func), |
| - InstructionSet(static_cast<X86InstructionSet>( |
| - Func->getContext()->getFlags().getTargetInstructionSet() - |
| - TargetInstructionSet::X86InstructionSet_Begin)), |
| + : TargetLowering(Func), InstructionSet(X86InstructionSet::Begin), |
| IsEbpBasedFrame(false), NeedsStackAlignment(false), |
| SpillAreaSizeBytes(0) { |
| static_assert((X86InstructionSet::End - X86InstructionSet::Begin) == |
| (TargetInstructionSet::X86InstructionSet_End - |
| TargetInstructionSet::X86InstructionSet_Begin), |
| "X86InstructionSet range different from TargetInstructionSet"); |
| + if (Func->getContext()->getFlags().getTargetInstructionSet() != |
| + TargetInstructionSet::BaseInstructionSet) { |
| + 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.
|
| + Func->getContext()->getFlags().getTargetInstructionSet() - |
| + TargetInstructionSet::X86InstructionSet_Begin); |
| + } |
| // TODO: Don't initialize IntegerRegisters and friends every time. |
| // Instead, initialize in some sort of static initializer for the |
| // class. |