[PATCH] D38299: [ARM] Honor -mfloat-abi for libcall calling convention
Saleem Abdulrasool via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 22 17:47:09 PDT 2017
compnerd accepted this revision.
compnerd added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:234
!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)
----------------
@peter.smith and I had a look at this. Since at least GCC 4.9, GCC uses the floating point ABI to determine the libcall calling convention. Note that this does break the current ABI.
Given that GCC now does something sane (i.e. only the `__aeabi_` functions are soft float, and the other calls are dependent on `-mfloat-abi`) this seems like the best thing to do.
Repository:
rL LLVM
https://reviews.llvm.org/D38299
More information about the llvm-commits
mailing list