diff options
author | Dale Johannesen <dalej@apple.com> | 2010-06-21 18:21:49 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-06-21 18:21:49 +0000 |
commit | b0ccb757b3ece5897e61643e055c30df407c0fc6 (patch) | |
tree | b8c4467c8e83cdcb434ce7b4ecd197b0cea02a95 /lib/Target/ARM/ARMRegisterInfo.td | |
parent | 18fb00b4b9fdac9a42c43c8651c9a8b3189ea6e5 (diff) | |
download | llvm-b0ccb757b3ece5897e61643e055c30df407c0fc6.tar.gz llvm-b0ccb757b3ece5897e61643e055c30df407c0fc6.tar.bz2 llvm-b0ccb757b3ece5897e61643e055c30df407c0fc6.tar.xz |
Fix PR 7433. Silly typo in non-Darwin ARM tail call
handling, plus correct R9 handling in that mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMRegisterInfo.td')
-rw-r--r-- | lib/Target/ARM/ARMRegisterInfo.td | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/lib/Target/ARM/ARMRegisterInfo.td b/lib/Target/ARM/ARMRegisterInfo.td index e41d9fc26a..b7e609426c 100644 --- a/lib/Target/ARM/ARMRegisterInfo.td +++ b/lib/Target/ARM/ARMRegisterInfo.td @@ -386,14 +386,9 @@ def tcGPR : RegisterClass<"ARM", [i32], 32, [R0, R1, R2, R3, R9, R12]> { return ARM_GPR_NOR9_TC; else return ARM_GPR_R9_TC; - } else { - if (Subtarget.isR9Reserved()) - return ARM_GPR_NOR9_TC; - else if (Subtarget.isThumb()) - return ARM_GPR_R9_TC; - else - return ARM_GPR_R9_TC; - } + } else + // R9 is either callee-saved or reserved; can't use it. + return ARM_GPR_NOR9_TC; } tcGPRClass::iterator @@ -412,14 +407,9 @@ def tcGPR : RegisterClass<"ARM", [i32], 32, [R0, R1, R2, R3, R9, R12]> { I = ARM_GPR_NOR9_TC + (sizeof(ARM_GPR_NOR9_TC)/sizeof(unsigned)); else I = ARM_GPR_R9_TC + (sizeof(ARM_GPR_R9_TC)/sizeof(unsigned)); - } else { - if (Subtarget.isR9Reserved()) - I = ARM_GPR_NOR9_TC + (sizeof(ARM_GPR_NOR9_TC)/sizeof(unsigned)); - else if (Subtarget.isThumb()) - I = ARM_GPR_R9_TC + (sizeof(ARM_GPR_R9_TC)/sizeof(unsigned)); - else - I = ARM_GPR_R9_TC + (sizeof(ARM_GPR_R9_TC)/sizeof(unsigned)); - } + } else + // R9 is either callee-saved or reserved; can't use it. + I = ARM_GPR_NOR9_TC + (sizeof(ARM_GPR_NOR9_TC)/sizeof(unsigned)); return I; } }]; |