| 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 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2200 UnimplementedError(Ctx->getFlags()); | 2200 UnimplementedError(Ctx->getFlags()); |
| 2201 } | 2201 } |
| 2202 | 2202 |
| 2203 void TargetARM32::emit(const ConstantUndef *) const { | 2203 void TargetARM32::emit(const ConstantUndef *) const { |
| 2204 llvm::report_fatal_error("undef value encountered by emitter."); | 2204 llvm::report_fatal_error("undef value encountered by emitter."); |
| 2205 } | 2205 } |
| 2206 | 2206 |
| 2207 TargetDataARM32::TargetDataARM32(GlobalContext *Ctx) | 2207 TargetDataARM32::TargetDataARM32(GlobalContext *Ctx) |
| 2208 : TargetDataLowering(Ctx) {} | 2208 : TargetDataLowering(Ctx) {} |
| 2209 | 2209 |
| 2210 void TargetDataARM32::lowerGlobals( | 2210 void TargetDataARM32::lowerGlobals(const VariableDeclarationList &Vars, |
| 2211 std::unique_ptr<VariableDeclarationList> Vars) { | 2211 const IceString &SectionSuffix) { |
| 2212 switch (Ctx->getFlags().getOutFileType()) { | 2212 switch (Ctx->getFlags().getOutFileType()) { |
| 2213 case FT_Elf: { | 2213 case FT_Elf: { |
| 2214 ELFObjectWriter *Writer = Ctx->getObjectWriter(); | 2214 ELFObjectWriter *Writer = Ctx->getObjectWriter(); |
| 2215 Writer->writeDataSection(*Vars, llvm::ELF::R_ARM_ABS32); | 2215 Writer->writeDataSection(Vars, llvm::ELF::R_ARM_ABS32, SectionSuffix); |
| 2216 } break; | 2216 } break; |
| 2217 case FT_Asm: | 2217 case FT_Asm: |
| 2218 case FT_Iasm: { | 2218 case FT_Iasm: { |
| 2219 const IceString &TranslateOnly = Ctx->getFlags().getTranslateOnly(); | 2219 const IceString &TranslateOnly = Ctx->getFlags().getTranslateOnly(); |
| 2220 OstreamLocker L(Ctx); | 2220 OstreamLocker L(Ctx); |
| 2221 for (const VariableDeclaration *Var : *Vars) { | 2221 for (const VariableDeclaration *Var : Vars) { |
| 2222 if (GlobalContext::matchSymbolName(Var->getName(), TranslateOnly)) { | 2222 if (GlobalContext::matchSymbolName(Var->getName(), TranslateOnly)) { |
| 2223 emitGlobal(*Var); | 2223 emitGlobal(*Var, SectionSuffix); |
| 2224 } | 2224 } |
| 2225 } | 2225 } |
| 2226 } break; | 2226 } break; |
| 2227 } | 2227 } |
| 2228 } | 2228 } |
| 2229 | 2229 |
| 2230 void TargetDataARM32::lowerConstants() { | 2230 void TargetDataARM32::lowerConstants() { |
| 2231 if (Ctx->getFlags().getDisableTranslation()) | 2231 if (Ctx->getFlags().getDisableTranslation()) |
| 2232 return; | 2232 return; |
| 2233 UnimplementedError(Ctx->getFlags()); | 2233 UnimplementedError(Ctx->getFlags()); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2266 << ".eabi_attribute 36, 1 @ Tag_FP_HP_extension\n" | 2266 << ".eabi_attribute 36, 1 @ Tag_FP_HP_extension\n" |
| 2267 << ".eabi_attribute 38, 1 @ Tag_ABI_FP_16bit_format\n" | 2267 << ".eabi_attribute 38, 1 @ Tag_ABI_FP_16bit_format\n" |
| 2268 << ".eabi_attribute 42, 1 @ Tag_MPextension_use\n" | 2268 << ".eabi_attribute 42, 1 @ Tag_MPextension_use\n" |
| 2269 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; | 2269 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; |
| 2270 // Technically R9 is used for TLS with Sandboxing, and we reserve it. | 2270 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
| 2271 // However, for compatibility with current NaCl LLVM, don't claim that. | 2271 // However, for compatibility with current NaCl LLVM, don't claim that. |
| 2272 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; | 2272 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
| 2273 } | 2273 } |
| 2274 | 2274 |
| 2275 } // end of namespace Ice | 2275 } // end of namespace Ice |
| OLD | NEW |