summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM
diff options
context:
space:
mode:
authorAmara Emerson <amara.emerson@arm.com>2014-07-25 14:03:14 +0000
committerAmara Emerson <amara.emerson@arm.com>2014-07-25 14:03:14 +0000
commit115d2df8a4406959fd0b62b205611bb75773aab3 (patch)
treeb1f25c553ba5596397e96618733ac6f283b87f3e /llvm/lib/Target/ARM
parent6819cf497411afe10738d6792cf208ee9271443a (diff)
downloadbcm5719-llvm-115d2df8a4406959fd0b62b205611bb75773aab3.tar.gz
bcm5719-llvm-115d2df8a4406959fd0b62b205611bb75773aab3.zip
[ARM] Emit ABI_PCS_R9_use build attribute.
Patch by Ben Foster! Differential Revision: http://reviews.llvm.org/D4657 llvm-svn: 213944
Diffstat (limited to 'llvm/lib/Target/ARM')
-rw-r--r--llvm/lib/Target/ARM/ARMAsmPrinter.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
index 9ad808c00e7..0ef72928926 100644
--- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -760,6 +760,17 @@ void ARMAsmPrinter::emitAttributes() {
}
}
+ // TODO: We currently only support either reserving the register, or treating
+ // it as another callee-saved register, but not as SB or a TLS pointer; It
+ // would instead be nicer to push this from the frontend as metadata, as we do
+ // for the wchar and enum size tags
+ if (Subtarget->isR9Reserved())
+ ATS.emitAttribute(ARMBuildAttrs::ABI_PCS_R9_use,
+ ARMBuildAttrs::R9Reserved);
+ else
+ ATS.emitAttribute(ARMBuildAttrs::ABI_PCS_R9_use,
+ ARMBuildAttrs::R9IsGPR);
+
if (Subtarget->hasTrustZone() && Subtarget->hasVirtualization())
ATS.emitAttribute(ARMBuildAttrs::Virtualization_use,
ARMBuildAttrs::AllowTZVirtualization);
OpenPOWER on IntegriCloud