| OLD | NEW |
| 1 //===- subzero/src/IceTargetLoweringARM32.cpp - ARM32 lowering ------------===// | 1 //===- subzero/src/IceTargetLoweringARM32.cpp - ARM32 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 TargetLoweringARM32 class, which consists almost | 10 // This file implements the TargetLoweringARM32 class, which consists almost |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // aligns vectors to 8 bytes. | 136 // aligns vectors to 8 bytes. |
| 137 // TODO(jvoung): Check this ... | 137 // TODO(jvoung): Check this ... |
| 138 size_t typeAlignInBytes = typeWidthInBytes(Ty); | 138 size_t typeAlignInBytes = typeWidthInBytes(Ty); |
| 139 if (isVectorType(Ty)) | 139 if (isVectorType(Ty)) |
| 140 typeAlignInBytes = 8; | 140 typeAlignInBytes = 8; |
| 141 return Utils::applyAlignment(Value, typeAlignInBytes); | 141 return Utils::applyAlignment(Value, typeAlignInBytes); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // end of anonymous namespace | 144 } // end of anonymous namespace |
| 145 | 145 |
| 146 TargetARM32::TargetARM32(Cfg *Func) | 146 TargetARM32::TargetARM32(Cfg *Func) : TargetLowering(Func) { |
| 147 : TargetLowering(Func), InstructionSet(ARM32InstructionSet::Begin), | |
| 148 UsesFramePointer(false), NeedsStackAlignment(false), MaybeLeafFunc(true), | |
| 149 SpillAreaSizeBytes(0) { | |
| 150 static_assert( | 147 static_assert( |
| 151 (ARM32InstructionSet::End - ARM32InstructionSet::Begin) == | 148 (ARM32InstructionSet::End - ARM32InstructionSet::Begin) == |
| 152 (TargetInstructionSet::ARM32InstructionSet_End - | 149 (TargetInstructionSet::ARM32InstructionSet_End - |
| 153 TargetInstructionSet::ARM32InstructionSet_Begin), | 150 TargetInstructionSet::ARM32InstructionSet_Begin), |
| 154 "ARM32InstructionSet range different from TargetInstructionSet"); | 151 "ARM32InstructionSet range different from TargetInstructionSet"); |
| 155 if (Func->getContext()->getFlags().getTargetInstructionSet() != | 152 if (Func->getContext()->getFlags().getTargetInstructionSet() != |
| 156 TargetInstructionSet::BaseInstructionSet) { | 153 TargetInstructionSet::BaseInstructionSet) { |
| 157 InstructionSet = static_cast<ARM32InstructionSet>( | 154 InstructionSet = static_cast<ARM32InstructionSet>( |
| 158 (Func->getContext()->getFlags().getTargetInstructionSet() - | 155 (Func->getContext()->getFlags().getTargetInstructionSet() - |
| 159 TargetInstructionSet::ARM32InstructionSet_Begin) + | 156 TargetInstructionSet::ARM32InstructionSet_Begin) + |
| (...skipping 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2381 << ".eabi_attribute 36, 1 @ Tag_FP_HP_extension\n" | 2378 << ".eabi_attribute 36, 1 @ Tag_FP_HP_extension\n" |
| 2382 << ".eabi_attribute 38, 1 @ Tag_ABI_FP_16bit_format\n" | 2379 << ".eabi_attribute 38, 1 @ Tag_ABI_FP_16bit_format\n" |
| 2383 << ".eabi_attribute 42, 1 @ Tag_MPextension_use\n" | 2380 << ".eabi_attribute 42, 1 @ Tag_MPextension_use\n" |
| 2384 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; | 2381 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; |
| 2385 // Technically R9 is used for TLS with Sandboxing, and we reserve it. | 2382 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
| 2386 // However, for compatibility with current NaCl LLVM, don't claim that. | 2383 // However, for compatibility with current NaCl LLVM, don't claim that. |
| 2387 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; | 2384 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
| 2388 } | 2385 } |
| 2389 | 2386 |
| 2390 } // end of namespace Ice | 2387 } // end of namespace Ice |
| OLD | NEW |