summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM
diff options
context:
space:
mode:
authorEli Friedman <efriedma@codeaurora.org>2017-10-26 21:42:32 +0000
committerEli Friedman <efriedma@codeaurora.org>2017-10-26 21:42:32 +0000
commitd5dfb62de78c60750af9c9fcf2b552cdcbddbc0e (patch)
tree9b888c9c23562d29d49ce809965c36670fb404ef /llvm/lib/Target/ARM
parent6e5fda9db80787039edfec0fa1d84c353f60d451 (diff)
downloadbcm5719-llvm-d5dfb62de78c60750af9c9fcf2b552cdcbddbc0e.tar.gz
bcm5719-llvm-d5dfb62de78c60750af9c9fcf2b552cdcbddbc0e.zip
[ARM] Honor -mfloat-abi for libcall calling convention
As far as I can tell, this matches gcc: -mfloat-abi determines the calling convention for all functions except those explicitly defined as soft-float in the ARM RTABI. This change only affects cases where the user specifies -mfloat-abi to override the default calling convention derived from the target triple. Fixes https://bugs.llvm.org//show_bug.cgi?id=34530. Differential Revision: https://reviews.llvm.org/D38299 llvm-svn: 316708
Diffstat (limited to 'llvm/lib/Target/ARM')
-rw-r--r--llvm/lib/Target/ARM/ARMISelLowering.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index 3e80c1e8359..92772577541 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -231,15 +231,7 @@ ARMTargetLowering::ARMTargetLowering(const TargetMachine &TM,
if (!Subtarget->isTargetDarwin() && !Subtarget->isTargetIOS() &&
!Subtarget->isTargetWatchOS()) {
- const auto &E = Subtarget->getTargetTriple().getEnvironment();
-
- bool IsHFTarget = E == Triple::EABIHF || E == Triple::GNUEABIHF ||
- E == Triple::MuslEABIHF;
- // Windows is a special case. Technically, we will replace all of the "GNU"
- // calls with calls to MSVCRT if appropriate and adjust the calling
- // convention then.
- IsHFTarget = IsHFTarget || Subtarget->isTargetWindows();
-
+ bool IsHFTarget = TM.Options.FloatABIType == FloatABI::Hard;
for (int LCID = 0; LCID < RTLIB::UNKNOWN_LIBCALL; ++LCID)
setLibcallCallingConv(static_cast<RTLIB::Libcall>(LCID),
IsHFTarget ? CallingConv::ARM_AAPCS_VFP
OpenPOWER on IntegriCloud