From d5dfb62de78c60750af9c9fcf2b552cdcbddbc0e Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 26 Oct 2017 21:42:32 +0000 Subject: [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 --- llvm/lib/Target/ARM/ARMISelLowering.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'llvm/lib/Target/ARM/ARMISelLowering.cpp') 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(LCID), IsHFTarget ? CallingConv::ARM_AAPCS_VFP -- cgit v1.2.3