| 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 /// \file | 10 /// \file |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 // Specially mark SP and LR as an "argument" so that it is considered | 376 // Specially mark SP and LR as an "argument" so that it is considered |
| 377 // live upon function entry. | 377 // live upon function entry. |
| 378 if (RegNum == RegARM32::Reg_sp || RegNum == RegARM32::Reg_lr) { | 378 if (RegNum == RegARM32::Reg_sp || RegNum == RegARM32::Reg_lr) { |
| 379 Func->addImplicitArg(Reg); | 379 Func->addImplicitArg(Reg); |
| 380 Reg->setIgnoreLiveness(); | 380 Reg->setIgnoreLiveness(); |
| 381 } | 381 } |
| 382 } | 382 } |
| 383 return Reg; | 383 return Reg; |
| 384 } | 384 } |
| 385 | 385 |
| 386 void TargetARM32::emitJumpTable(const Cfg *Func, |
| 387 const InstJumpTable *JumpTable) const { |
| 388 (void)JumpTable; |
| 389 UnimplementedError(Func->getContext()->getFlags()); |
| 390 } |
| 391 |
| 386 void TargetARM32::emitVariable(const Variable *Var) const { | 392 void TargetARM32::emitVariable(const Variable *Var) const { |
| 387 Ostream &Str = Ctx->getStrEmit(); | 393 Ostream &Str = Ctx->getStrEmit(); |
| 388 if (Var->hasReg()) { | 394 if (Var->hasReg()) { |
| 389 Str << getRegName(Var->getRegNum(), Var->getType()); | 395 Str << getRegName(Var->getRegNum(), Var->getType()); |
| 390 return; | 396 return; |
| 391 } | 397 } |
| 392 if (Var->getWeight().isInf()) { | 398 if (Var->getWeight().isInf()) { |
| 393 llvm::report_fatal_error( | 399 llvm::report_fatal_error( |
| 394 "Infinite-weight Variable has no register assigned"); | 400 "Infinite-weight Variable has no register assigned"); |
| 395 } | 401 } |
| (...skipping 2319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2715 } break; | 2721 } break; |
| 2716 } | 2722 } |
| 2717 } | 2723 } |
| 2718 | 2724 |
| 2719 void TargetDataARM32::lowerConstants() { | 2725 void TargetDataARM32::lowerConstants() { |
| 2720 if (Ctx->getFlags().getDisableTranslation()) | 2726 if (Ctx->getFlags().getDisableTranslation()) |
| 2721 return; | 2727 return; |
| 2722 UnimplementedError(Ctx->getFlags()); | 2728 UnimplementedError(Ctx->getFlags()); |
| 2723 } | 2729 } |
| 2724 | 2730 |
| 2731 void TargetDataARM32::lowerJumpTables() { |
| 2732 if (Ctx->getFlags().getDisableTranslation()) |
| 2733 return; |
| 2734 UnimplementedError(Ctx->getFlags()); |
| 2735 } |
| 2736 |
| 2725 TargetHeaderARM32::TargetHeaderARM32(GlobalContext *Ctx) | 2737 TargetHeaderARM32::TargetHeaderARM32(GlobalContext *Ctx) |
| 2726 : TargetHeaderLowering(Ctx), CPUFeatures(Ctx->getFlags()) {} | 2738 : TargetHeaderLowering(Ctx), CPUFeatures(Ctx->getFlags()) {} |
| 2727 | 2739 |
| 2728 void TargetHeaderARM32::lower() { | 2740 void TargetHeaderARM32::lower() { |
| 2729 OstreamLocker L(Ctx); | 2741 OstreamLocker L(Ctx); |
| 2730 Ostream &Str = Ctx->getStrEmit(); | 2742 Ostream &Str = Ctx->getStrEmit(); |
| 2731 Str << ".syntax unified\n"; | 2743 Str << ".syntax unified\n"; |
| 2732 // Emit build attributes in format: .eabi_attribute TAG, VALUE. | 2744 // Emit build attributes in format: .eabi_attribute TAG, VALUE. |
| 2733 // See Sec. 2 of "Addenda to, and Errata in the ABI for the ARM architecture" | 2745 // See Sec. 2 of "Addenda to, and Errata in the ABI for the ARM architecture" |
| 2734 // http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045d/IHI0045D_ABI_adde
nda.pdf | 2746 // http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045d/IHI0045D_ABI_adde
nda.pdf |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2764 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; | 2776 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; |
| 2765 if (CPUFeatures.hasFeature(TargetARM32Features::HWDivArm)) { | 2777 if (CPUFeatures.hasFeature(TargetARM32Features::HWDivArm)) { |
| 2766 Str << ".eabi_attribute 44, 2 @ Tag_DIV_use\n"; | 2778 Str << ".eabi_attribute 44, 2 @ Tag_DIV_use\n"; |
| 2767 } | 2779 } |
| 2768 // Technically R9 is used for TLS with Sandboxing, and we reserve it. | 2780 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
| 2769 // However, for compatibility with current NaCl LLVM, don't claim that. | 2781 // However, for compatibility with current NaCl LLVM, don't claim that. |
| 2770 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; | 2782 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
| 2771 } | 2783 } |
| 2772 | 2784 |
| 2773 } // end of namespace Ice | 2785 } // end of namespace Ice |
| OLD | NEW |