@@ -65,7 +65,17 @@ static void setAArch64LibcallNames(RuntimeLibcallsInfo &Info,
65
65
#undef LCALLNAME5
66
66
}
67
67
68
- static void setARMLibcallNames (RuntimeLibcallsInfo &Info, const Triple &TT) {
68
+ static void setARMLibcallNames (RuntimeLibcallsInfo &Info, const Triple &TT,
69
+ FloatABI::ABIType FloatABIType,
70
+ EABI EABIVersion) {
71
+ if (!TT.isOSDarwin () && !TT.isiOS () && !TT.isWatchOS () && !TT.isDriverKit ()) {
72
+ CallingConv::ID DefaultCC = FloatABIType == FloatABI::Hard
73
+ ? CallingConv::ARM_AAPCS_VFP
74
+ : CallingConv::ARM_AAPCS;
75
+ for (RTLIB::Libcall LC : RTLIB::libcalls ())
76
+ Info.setLibcallCallingConv (LC, DefaultCC);
77
+ }
78
+
69
79
// Register based DivRem for AEABI (RTABI 4.2)
70
80
if (TT.isTargetAEABI () || TT.isAndroid () || TT.isTargetGNUAEABI () ||
71
81
TT.isTargetMuslAEABI () || TT.isOSWindows ()) {
@@ -346,7 +356,9 @@ static void setLongDoubleIsF128Libm(RuntimeLibcallsInfo &Info,
346
356
347
357
// / Set default libcall names. If a target wants to opt-out of a libcall it
348
358
// / should be placed here.
349
- void RuntimeLibcallsInfo::initLibcalls (const Triple &TT) {
359
+ void RuntimeLibcallsInfo::initLibcalls (const Triple &TT,
360
+ FloatABI::ABIType FloatABI,
361
+ EABI EABIVersion) {
350
362
initSoftFloatCmpLibcallPredicates ();
351
363
352
364
initSoftFloatCmpLibcallPredicates ();
@@ -539,7 +551,7 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) {
539
551
if (TT.isAArch64 ())
540
552
setAArch64LibcallNames (*this , TT);
541
553
else if (TT.isARM () || TT.isThumb ())
542
- setARMLibcallNames (*this , TT);
554
+ setARMLibcallNames (*this , TT, FloatABI, EABIVersion );
543
555
else if (TT.getArch () == Triple::ArchType::avr) {
544
556
// Division rtlib functions (not supported), use divmod functions instead
545
557
setLibcallName (RTLIB::SDIV_I8, nullptr );
0 commit comments