summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMISelLowering.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-08-14 20:10:52 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-08-14 20:10:52 +0000
commita6b3ce203a09da37ee7f93b8b8339af9e38fdf07 (patch)
tree6ee83efbe0c12a1ca8c5c3c8355aa5f08e236edb /llvm/lib/Target/ARM/ARMISelLowering.cpp
parentdc49a8d3f1e3de05941a987647659d3e70cfff7d (diff)
downloadbcm5719-llvm-a6b3ce203a09da37ee7f93b8b8339af9e38fdf07.tar.gz
bcm5719-llvm-a6b3ce203a09da37ee7f93b8b8339af9e38fdf07.zip
Allow targets to specify their choice of calling conventions per
libcall. Take advantage of this in the ARM backend to rectify broken choice of CC when hard float is in effect. PIC16 may want to see if it could be of use in MakePIC16Libcall, which works unchanged. Patch by Sandeep! llvm-svn: 79033
Diffstat (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 9138c5730c4..a4471000b0c 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -201,6 +201,15 @@ ARMTargetLowering::ARMTargetLowering(TargetMachine &TM)
setLibcallName(RTLIB::SRL_I128, 0);
setLibcallName(RTLIB::SRA_I128, 0);
+ // Libcalls should use the AAPCS base standard ABI, even if hard float
+ // is in effect, as per the ARM RTABI specification, section 4.1.2.
+ if (Subtarget->isAAPCS_ABI()) {
+ for (int i = 0; i < RTLIB::UNKNOWN_LIBCALL; ++i) {
+ setLibcallCallingConv(static_cast<RTLIB::Libcall>(i),
+ CallingConv::ARM_AAPCS);
+ }
+ }
+
if (Subtarget->isThumb1Only())
addRegisterClass(MVT::i32, ARM::tGPRRegisterClass);
else
OpenPOWER on IntegriCloud