| 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 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2187 UnimplementedError(Ctx->getFlags()); | 2187 UnimplementedError(Ctx->getFlags()); |
| 2188 } | 2188 } |
| 2189 | 2189 |
| 2190 void TargetARM32::emit(const ConstantUndef *) const { | 2190 void TargetARM32::emit(const ConstantUndef *) const { |
| 2191 llvm::report_fatal_error("undef value encountered by emitter."); | 2191 llvm::report_fatal_error("undef value encountered by emitter."); |
| 2192 } | 2192 } |
| 2193 | 2193 |
| 2194 TargetDataARM32::TargetDataARM32(GlobalContext *Ctx) | 2194 TargetDataARM32::TargetDataARM32(GlobalContext *Ctx) |
| 2195 : TargetDataLowering(Ctx) {} | 2195 : TargetDataLowering(Ctx) {} |
| 2196 | 2196 |
| 2197 void TargetDataARM32::lowerGlobal(const VariableDeclaration &Var) const { | |
| 2198 (void)Var; | |
| 2199 UnimplementedError(Ctx->getFlags()); | |
| 2200 } | |
| 2201 | |
| 2202 void TargetDataARM32::lowerGlobals( | 2197 void TargetDataARM32::lowerGlobals( |
| 2203 std::unique_ptr<VariableDeclarationList> Vars) { | 2198 std::unique_ptr<VariableDeclarationList> Vars) { |
| 2204 switch (Ctx->getFlags().getOutFileType()) { | 2199 switch (Ctx->getFlags().getOutFileType()) { |
| 2205 case FT_Elf: { | 2200 case FT_Elf: { |
| 2206 ELFObjectWriter *Writer = Ctx->getObjectWriter(); | 2201 ELFObjectWriter *Writer = Ctx->getObjectWriter(); |
| 2207 Writer->writeDataSection(*Vars, llvm::ELF::R_ARM_ABS32); | 2202 Writer->writeDataSection(*Vars, llvm::ELF::R_ARM_ABS32); |
| 2208 } break; | 2203 } break; |
| 2209 case FT_Asm: | 2204 case FT_Asm: |
| 2210 case FT_Iasm: { | 2205 case FT_Iasm: { |
| 2211 const IceString &TranslateOnly = Ctx->getFlags().getTranslateOnly(); | 2206 const IceString &TranslateOnly = Ctx->getFlags().getTranslateOnly(); |
| 2212 OstreamLocker L(Ctx); | 2207 OstreamLocker L(Ctx); |
| 2213 for (const VariableDeclaration *Var : *Vars) { | 2208 for (const VariableDeclaration *Var : *Vars) { |
| 2214 if (GlobalContext::matchSymbolName(Var->getName(), TranslateOnly)) { | 2209 if (GlobalContext::matchSymbolName(Var->getName(), TranslateOnly)) { |
| 2215 lowerGlobal(*Var); | 2210 emitGlobal(*Var); |
| 2216 } | 2211 } |
| 2217 } | 2212 } |
| 2218 } break; | 2213 } break; |
| 2219 } | 2214 } |
| 2220 } | 2215 } |
| 2221 | 2216 |
| 2222 void TargetDataARM32::lowerConstants() { | 2217 void TargetDataARM32::lowerConstants() { |
| 2223 if (Ctx->getFlags().getDisableTranslation()) | 2218 if (Ctx->getFlags().getDisableTranslation()) |
| 2224 return; | 2219 return; |
| 2225 UnimplementedError(Ctx->getFlags()); | 2220 UnimplementedError(Ctx->getFlags()); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2258 << ".eabi_attribute 36, 1 @ Tag_FP_HP_extension\n" | 2253 << ".eabi_attribute 36, 1 @ Tag_FP_HP_extension\n" |
| 2259 << ".eabi_attribute 38, 1 @ Tag_ABI_FP_16bit_format\n" | 2254 << ".eabi_attribute 38, 1 @ Tag_ABI_FP_16bit_format\n" |
| 2260 << ".eabi_attribute 42, 1 @ Tag_MPextension_use\n" | 2255 << ".eabi_attribute 42, 1 @ Tag_MPextension_use\n" |
| 2261 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; | 2256 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; |
| 2262 // Technically R9 is used for TLS with Sandboxing, and we reserve it. | 2257 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
| 2263 // However, for compatibility with current NaCl LLVM, don't claim that. | 2258 // However, for compatibility with current NaCl LLVM, don't claim that. |
| 2264 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; | 2259 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
| 2265 } | 2260 } |
| 2266 | 2261 |
| 2267 } // end of namespace Ice | 2262 } // end of namespace Ice |
| OLD | NEW |