make arm-reserve-r9 available for all ARM

r9 is defined as a platform-specific register in the ARM EABI.
It can be reserved for a special purpose or be used as a general
purpose register. Add support for reserving r9 for all ARM, while
leaving the IOS usage unchanged.

Patch by Jeroen Hofstee.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188485 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Renato Golin 2013-08-15 20:45:13 +00:00
parent 873e392ffd
commit 24adc8f60f

View File

@ -169,9 +169,10 @@ void ARMSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) {
if (isAAPCS_ABI())
stackAlignment = 8;
if (!isTargetIOS())
if (!isTargetIOS()) {
UseMovt = hasV6T2Ops();
else {
IsR9Reserved = ReserveR9;
} else {
IsR9Reserved = ReserveR9 | !HasV6Ops;
UseMovt = DarwinUseMOVT && hasV6T2Ops();
SupportsTailCall = !getTargetTriple().isOSVersionLT(5, 0);