summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2013-08-15 20:45:13 +0000
committerRenato Golin <renato.golin@linaro.org>2013-08-15 20:45:13 +0000
commit0a41d9ae7f0b70c5a613f72f119fa1c30fd6353a (patch)
tree64e77cf8af5982d9e5eba5cde44fa14e3273d6c8
parent33fae6935a663bb18c756a53eab14aa92e62d2e0 (diff)
downloadbcm5719-llvm-0a41d9ae7f0b70c5a613f72f119fa1c30fd6353a.tar.gz
bcm5719-llvm-0a41d9ae7f0b70c5a613f72f119fa1c30fd6353a.zip
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. llvm-svn: 188485
-rw-r--r--llvm/lib/Target/ARM/ARMSubtarget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp
index c592421d9a5..a94c9425fb5 100644
--- a/llvm/lib/Target/ARM/ARMSubtarget.cpp
+++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp
@@ -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);
OpenPOWER on IntegriCloud