| 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 } | 379 } |
| 380 } | 380 } |
| 381 | 381 |
| 382 bool TargetARM32::doBranchOpt(Inst *I, const CfgNode *NextNode) { | 382 bool TargetARM32::doBranchOpt(Inst *I, const CfgNode *NextNode) { |
| 383 if (InstARM32Br *Br = llvm::dyn_cast<InstARM32Br>(I)) { | 383 if (InstARM32Br *Br = llvm::dyn_cast<InstARM32Br>(I)) { |
| 384 return Br->optimizeBranch(NextNode); | 384 return Br->optimizeBranch(NextNode); |
| 385 } | 385 } |
| 386 return false; | 386 return false; |
| 387 } | 387 } |
| 388 | 388 |
| 389 const char *RegARM32::RegNames[] = { |
| 390 #define X(val, encode, name, scratch, preserved, stackptr, frameptr, isInt, \ |
| 391 isI64Pair, isFP32, isFP64, isVec128, alias_init) \ |
| 392 name, |
| 393 REGARM32_TABLE |
| 394 #undef X |
| 395 }; |
| 396 |
| 389 IceString TargetARM32::getRegName(SizeT RegNum, Type Ty) const { | 397 IceString TargetARM32::getRegName(SizeT RegNum, Type Ty) const { |
| 390 assert(RegNum < RegARM32::Reg_NUM); | 398 assert(RegNum < RegARM32::Reg_NUM); |
| 391 (void)Ty; | 399 (void)Ty; |
| 392 static const char *RegNames[] = { | 400 return RegARM32::RegNames[RegNum]; |
| 393 #define X(val, encode, name, scratch, preserved, stackptr, frameptr, isInt, \ | |
| 394 isI64Pair, isFP32, isFP64, isVec128, alias_init) \ | |
| 395 name, | |
| 396 REGARM32_TABLE | |
| 397 #undef X | |
| 398 }; | |
| 399 | |
| 400 return RegNames[RegNum]; | |
| 401 } | 401 } |
| 402 | 402 |
| 403 Variable *TargetARM32::getPhysicalRegister(SizeT RegNum, Type Ty) { | 403 Variable *TargetARM32::getPhysicalRegister(SizeT RegNum, Type Ty) { |
| 404 static const Type DefaultType[] = { | 404 static const Type DefaultType[] = { |
| 405 #define X(val, encode, name, scratch, preserved, stackptr, frameptr, isInt, \ | 405 #define X(val, encode, name, scratch, preserved, stackptr, frameptr, isInt, \ |
| 406 isI64Pair, isFP32, isFP64, isVec128, alias_init) \ | 406 isI64Pair, isFP32, isFP64, isVec128, alias_init) \ |
| 407 (isFP32) \ | 407 (isFP32) \ |
| 408 ? IceType_f32 \ | 408 ? IceType_f32 \ |
| 409 : ((isFP64) ? IceType_f64 : ((isVec128 ? IceType_v4i32 : IceType_i32))), | 409 : ((isFP64) ? IceType_f64 : ((isVec128 ? IceType_v4i32 : IceType_i32))), |
| 410 REGARM32_TABLE | 410 REGARM32_TABLE |
| (...skipping 3543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3954 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; | 3954 << ".eabi_attribute 68, 1 @ Tag_Virtualization_use\n"; |
| 3955 if (CPUFeatures.hasFeature(TargetARM32Features::HWDivArm)) { | 3955 if (CPUFeatures.hasFeature(TargetARM32Features::HWDivArm)) { |
| 3956 Str << ".eabi_attribute 44, 2 @ Tag_DIV_use\n"; | 3956 Str << ".eabi_attribute 44, 2 @ Tag_DIV_use\n"; |
| 3957 } | 3957 } |
| 3958 // Technically R9 is used for TLS with Sandboxing, and we reserve it. | 3958 // Technically R9 is used for TLS with Sandboxing, and we reserve it. |
| 3959 // However, for compatibility with current NaCl LLVM, don't claim that. | 3959 // However, for compatibility with current NaCl LLVM, don't claim that. |
| 3960 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; | 3960 Str << ".eabi_attribute 14, 3 @ Tag_ABI_PCS_R9_use: Not used\n"; |
| 3961 } | 3961 } |
| 3962 | 3962 |
| 3963 } // end of namespace Ice | 3963 } // end of namespace Ice |
| OLD | NEW |