diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-08-14 20:10:52 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-08-14 20:10:52 +0000 |
commit | 72977a45a8ad9d9524c9b49399e89fb9a3a676ed (patch) | |
tree | c55553467012faa67e7cbf7d9d59fff93516a821 /lib/Target/ARM | |
parent | e6c835f42418c0fae6b63908d3c576a26d64cab2 (diff) | |
download | external_llvm-72977a45a8ad9d9524c9b49399e89fb9a3a676ed.zip external_llvm-72977a45a8ad9d9524c9b49399e89fb9a3a676ed.tar.gz external_llvm-72977a45a8ad9d9524c9b49399e89fb9a3a676ed.tar.bz2 |
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 9138c57..a447100 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/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 |