@@ -29,6 +29,9 @@ def isNotOSWindowsOrIsCygwinMinGW
29
29
def isGNUEnvironment : RuntimeLibcallPredicate<"TT.isGNUEnvironment()">;
30
30
def darwinHasSinCosStret : RuntimeLibcallPredicate<"darwinHasSinCosStret(TT)">;
31
31
def darwinHasExp10 : RuntimeLibcallPredicate<"darwinHasExp10(TT)">;
32
+
33
+ def hasExp10 : RuntimeLibcallPredicate<[{!TT.isOSDarwin()}]>;
34
+
32
35
def hasSinCos : RuntimeLibcallPredicate<"hasSinCos(TT)">;
33
36
34
37
// FIXME: Way to combine predicates
@@ -786,12 +789,6 @@ def __exp2l_finite_f80 : RuntimeLibcallImpl<EXP2_FINITE_F80, "__exp2l_finite">;
786
789
def __exp2l_finite_f128 : RuntimeLibcallImpl<EXP2_FINITE_F128, "__exp2l_finite">;
787
790
def __exp2l_finite_ppcf128 : RuntimeLibcallImpl<EXP2_FINITE_PPCF128, "__exp2l_finite">;
788
791
789
- def exp10f : RuntimeLibcallImpl<EXP10_F32>;
790
- def exp10 : RuntimeLibcallImpl<EXP10_F64>;
791
- def exp10l_f80 : RuntimeLibcallImpl<EXP10_F80, "exp10l">;
792
- def exp10l_f128 : RuntimeLibcallImpl<EXP10_F128, "exp10l">;
793
- def exp10l_ppcf128 : RuntimeLibcallImpl<EXP10_PPCF128, "exp10l">;
794
-
795
792
def sinf : RuntimeLibcallImpl<SIN_F32>;
796
793
def sin : RuntimeLibcallImpl<SIN_F64>;
797
794
defm sin : LibmLongDoubleLibCall;
@@ -952,6 +949,12 @@ def calloc : RuntimeLibcallImpl<CALLOC>;
952
949
953
950
} // End let IsDefault = true
954
951
952
+ def exp10f : RuntimeLibcallImpl<EXP10_F32>;
953
+ def exp10 : RuntimeLibcallImpl<EXP10_F64>;
954
+ def exp10l_f80 : RuntimeLibcallImpl<EXP10_F80, "exp10l">;
955
+ def exp10l_f128 : RuntimeLibcallImpl<EXP10_F128, "exp10l">;
956
+ def exp10l_ppcf128 : RuntimeLibcallImpl<EXP10_PPCF128, "exp10l">;
957
+
955
958
//--------------------------------------------------------------------
956
959
// compiler-rt/libgcc but 64-bit only, not available by default
957
960
//--------------------------------------------------------------------
@@ -1113,6 +1116,17 @@ defvar LibmHasSinCosF80 = LibcallImpls<(add sincos_f80), hasSinCos>;
1113
1116
defvar LibmHasSinCosF128 = LibcallImpls<(add sincos_f128), hasSinCos>;
1114
1117
defvar LibmHasSinCosPPCF128 = LibcallImpls<(add sincos_ppcf128), hasSinCos>;
1115
1118
1119
+ defvar LibmHasExp10F32 = LibcallImpls<(add exp10f), hasExp10>;
1120
+ defvar LibmHasExp10F64 = LibcallImpls<(add exp10), hasExp10>;
1121
+ defvar LibmHasExp10F80 = LibcallImpls<(add exp10l_f80), hasExp10>;
1122
+ defvar LibmHasExp10F128 = LibcallImpls<(add exp10l_f128), hasExp10>;
1123
+ defvar LibmHasExp10PPCF128 = LibcallImpls<(add exp10l_ppcf128), hasExp10>;
1124
+
1125
+ defvar DefaultLibmExp10 = [
1126
+ LibmHasExp10F32, LibmHasExp10F64, LibmHasExp10F128
1127
+ ];
1128
+
1129
+
1116
1130
defvar WindowsMathRemovals = [
1117
1131
ldexpf, ldexp_f80, ldexp_f128, ldexp_ppcf128,
1118
1132
frexpf, frexp_f80, frexp_f128, frexp_ppcf128
@@ -1135,7 +1149,6 @@ defvar LibmHasLdexpF80 = LibcallImpls<(add ldexp_f80), isNotOSWindowsOrIsCygwinM
1135
1149
defvar LibmHasFrexpF128 = LibcallImpls<(add frexp_f128), isNotOSWindowsOrIsCygwinMinGW>;
1136
1150
defvar LibmHasLdexpF128 = LibcallImpls<(add ldexp_f128), isNotOSWindowsOrIsCygwinMinGW>;
1137
1151
1138
-
1139
1152
//===----------------------------------------------------------------------===//
1140
1153
// Objective-C Runtime Libcalls
1141
1154
//===----------------------------------------------------------------------===//
@@ -1211,7 +1224,8 @@ def AArch64SystemLibrary : SystemRuntimeLibrary<
1211
1224
LibcallImpls<(add Int128RTLibcalls), isAArch64_ILP64>,
1212
1225
LibcallImpls<(add bzero), isOSDarwin>,
1213
1226
DarwinExp10, DarwinSinCosStret,
1214
- LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128)
1227
+ LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
1228
+ DefaultLibmExp10)
1215
1229
>;
1216
1230
1217
1231
// Prepend a # to every name
@@ -1482,6 +1496,7 @@ def ARMSystemLibrary
1482
1496
AEABIDivRemCalls,
1483
1497
DarwinSinCosStret, DarwinExp10,
1484
1498
LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
1499
+ DefaultLibmExp10,
1485
1500
1486
1501
// Use divmod compiler-rt calls for iOS 5.0 and later.
1487
1502
LibcallImpls<(add __divmodsi4, __udivmodsi4),
@@ -1983,6 +1998,7 @@ def PPCSystemLibrary
1983
1998
DefaultRuntimeLibcallImpls_f128),
1984
1999
__extendkftf2, __trunctfkf2,
1985
2000
DefaultRuntimeLibcallImpls_ppcf128,
2001
+ exp10f, exp10, exp10l_ppcf128,
1986
2002
LibmF128Libcalls, AIX32Calls, AIX64Calls,
1987
2003
LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
1988
2004
LibmHasSinCosPPCF128,
@@ -1998,7 +2014,9 @@ def isRISCV64 : RuntimeLibcallPredicate<"TT.isRISCV64()">;
1998
2014
1999
2015
def RISCVSystemLibrary
2000
2016
: SystemRuntimeLibrary<isRISCV,
2001
- (add DefaultRuntimeLibcallImpls, __riscv_flush_icache,
2017
+ (add DefaultRuntimeLibcallImpls,
2018
+ exp10f, exp10, exp10l_f128,
2019
+ __riscv_flush_icache,
2002
2020
LibcallImpls<(add Int128RTLibcalls), isRISCV64>)>;
2003
2021
2004
2022
//===----------------------------------------------------------------------===//
@@ -2104,7 +2122,7 @@ def isX86 : RuntimeLibcallPredicate<"TT.isX86()">;
2104
2122
def darwinHas__bzero : RuntimeLibcallPredicate<"TT.isMacOSX() && !TT.isMacOSXVersionLT(10, 6)">;
2105
2123
2106
2124
// FIXME: This is has ldexpl/frexpl plus use f128 for long double.
2107
- def hasFrexplLdexplF128
2125
+ def hasExpFrexplLdexplF128
2108
2126
: RuntimeLibcallPredicate<[{(!TT.isOSWindows() || TT.isOSCygMing()) && !TT.isGNUEnvironment()}]>;
2109
2127
2110
2128
// Use the f128 variants of math functions on x86
@@ -2120,12 +2138,13 @@ defvar X86CommonLibcalls =
2120
2138
LibcallImpls<(add __bzero), darwinHas__bzero>,
2121
2139
LibmHasFrexpF32, LibmHasLdexpF32,
2122
2140
LibmHasFrexpF80, LibmHasLdexpF80,
2123
- LibcallImpls<(add frexp_f128, ldexp_f128), hasFrexplLdexplF128 >,
2141
+ LibcallImpls<(add frexp_f128, ldexp_f128, exp10l_f128 ), hasExpFrexplLdexplF128 >,
2124
2142
DefaultRuntimeLibcallImpls_f80,
2143
+ LibmHasExp10F32, LibmHasExp10F64, LibmHasExp10F80,
2144
+ LibcallImpls<(add MostPowI), isNotOSMSVCRT>,
2125
2145
// FIXME: MSVCRT doesn't have powi. The f128 case is added as a
2126
2146
// hack for one test relying on it.
2127
- __powitf2_f128,
2128
- LibcallImpls<(add MostPowI), isNotOSMSVCRT>
2147
+ __powitf2_f128
2129
2148
);
2130
2149
2131
2150
defvar Windows32DivRemMulCalls =
@@ -2265,4 +2284,5 @@ def WasmSystemLibrary
2265
2284
: SystemRuntimeLibrary<isWasm,
2266
2285
(add DefaultRuntimeLibcallImpls, Int128RTLibcalls,
2267
2286
CompilerRTOnlyInt64Libcalls, CompilerRTOnlyInt128Libcalls,
2287
+ exp10f, exp10,
2268
2288
emscripten_return_address)>;
0 commit comments