| 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 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2702 } break; | 2708 } break; |
| 2703 } | 2709 } |
| 2704 } | 2710 } |
| 2705 | 2711 |
| 2706 void TargetDataARM32::lowerConstants() { | 2712 void TargetDataARM32::lowerConstants() { |
| 2707 if (Ctx->getFlags().getDisableTranslation()) | 2713 if (Ctx->getFlags().getDisableTranslation()) |
| 2708 return; | 2714 return; |
| 2709 UnimplementedError(Ctx->getFlags()); | 2715 UnimplementedError(Ctx->getFlags()); |
| 2710 } | 2716 } |
| 2711 | 2717 |
| 2718 void TargetDataARM32::lowerJumpTables() { |
| 2719 if (Ctx->getFlags().getDisableTranslation()) |
| 2720 return; |
| 2721 UnimplementedError(Ctx->getFlags()); |
| 2722 } |
| 2723 |
| 2712 TargetHeaderARM32::TargetHeaderARM32(GlobalContext *Ctx) | 2724 TargetHeaderARM32::TargetHeaderARM32(GlobalContext *Ctx) |
| 2713 : TargetHeaderLowering(Ctx), CPUFeatures(Ctx->getFlags()) {} | 2725 : TargetHeaderLowering(Ctx), CPUFeatures(Ctx->getFlags()) {} |
| 2714 | 2726 |
| 2715 void TargetHeaderARM32::lower() { | 2727 void TargetHeaderARM32::lower() { |
| 2716 OstreamLocker L(Ctx); | 2728 OstreamLocker L(Ctx); |
| 2717 Ostream &Str = Ctx->getStrEmit(); | 2729 Ostream &Str = Ctx->getStrEmit(); |
| 2718 Str << ".syntax unified\n"; | 2730 Str << ".syntax unified\n"; |
| 2719 // Emit build attributes in format: .eabi_attribute TAG, VALUE. | 2731 // Emit build attributes in format: .eabi_attribute TAG, VALUE. |
| 2720 // See Sec. 2 of "Addenda to, and Errata in the ABI for the ARM architecture" | 2732 // See Sec. 2 of "Addenda to, and Errata in the ABI for the ARM architecture" |
| 2721 // http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045d/IHI0045D_ABI_adde
nda.pdf | 2733 // http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045d/IHI0045D_ABI_adde
nda.pdf |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2751 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; | 2763 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; |
| 2752 if (CPUFeatures.hasFeature(TargetARM32Features::HWDivArm)) { | 2764 if (CPUFeatures.hasFeature(TargetARM32Features::HWDivArm)) { |
| 2753 Str << ".eabi_attribute 44, 2 @ Tag_DIV_use\n"; | 2765 Str << ".eabi_attribute 44, 2 @ Tag_DIV_use\n"; |
| 2754 } | 2766 } |
| 2755 // Technically R9 is used for TLS with Sandboxing, and we reserve it. | 2767 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
| 2756 // However, for compatibility with current NaCl LLVM, don't claim that. | 2768 // However, for compatibility with current NaCl LLVM, don't claim that. |
| 2757 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; | 2769 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
| 2758 } | 2770 } |
| 2759 | 2771 |
| 2760 } // end of namespace Ice | 2772 } // end of namespace Ice |
| OLD | NEW |