@@ -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,12 @@ 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
+
1116
1125
defvar WindowsMathRemovals = [
1117
1126
ldexpf, ldexp_f80, ldexp_f128, ldexp_ppcf128,
1118
1127
frexpf, frexp_f80, frexp_f128, frexp_ppcf128
@@ -1211,7 +1220,8 @@ def AArch64SystemLibrary : SystemRuntimeLibrary<
1211
1220
LibcallImpls<(add Int128RTLibcalls), isAArch64_ILP64>,
1212
1221
LibcallImpls<(add bzero), isOSDarwin>,
1213
1222
DarwinExp10, DarwinSinCosStret,
1214
- LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128)
1223
+ LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
1224
+ LibmHasExp10F32, LibmHasExp10F64, LibmHasExp10F128)
1215
1225
>;
1216
1226
1217
1227
// Prepend a # to every name
@@ -1482,6 +1492,7 @@ def ARMSystemLibrary
1482
1492
AEABIDivRemCalls,
1483
1493
DarwinSinCosStret, DarwinExp10,
1484
1494
LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
1495
+ LibmHasExp10F32, LibmHasExp10F64, LibmHasExp10F128,
1485
1496
1486
1497
// Use divmod compiler-rt calls for iOS 5.0 and later.
1487
1498
LibcallImpls<(add __divmodsi4, __udivmodsi4),
@@ -1983,6 +1994,7 @@ def PPCSystemLibrary
1983
1994
DefaultRuntimeLibcallImpls_f128),
1984
1995
__extendkftf2, __trunctfkf2,
1985
1996
DefaultRuntimeLibcallImpls_ppcf128,
1997
+ exp10f, exp10, exp10l_ppcf128,
1986
1998
LibmF128Libcalls, AIX32Calls, AIX64Calls,
1987
1999
LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
1988
2000
LibmHasSinCosPPCF128,
@@ -1998,7 +2010,9 @@ def isRISCV64 : RuntimeLibcallPredicate<"TT.isRISCV64()">;
1998
2010
1999
2011
def RISCVSystemLibrary
2000
2012
: SystemRuntimeLibrary<isRISCV,
2001
- (add DefaultRuntimeLibcallImpls, __riscv_flush_icache,
2013
+ (add DefaultRuntimeLibcallImpls,
2014
+ exp10f, exp10, exp10l_f128,
2015
+ __riscv_flush_icache,
2002
2016
LibcallImpls<(add Int128RTLibcalls), isRISCV64>)>;
2003
2017
2004
2018
//===----------------------------------------------------------------------===//
@@ -2104,7 +2118,7 @@ def isX86 : RuntimeLibcallPredicate<"TT.isX86()">;
2104
2118
def darwinHas__bzero : RuntimeLibcallPredicate<"TT.isMacOSX() && !TT.isMacOSXVersionLT(10, 6)">;
2105
2119
2106
2120
// FIXME: This is has ldexpl/frexpl plus use f128 for long double.
2107
- def hasFrexplLdexplF128
2121
+ def hasExpFrexplLdexplF128
2108
2122
: RuntimeLibcallPredicate<[{(!TT.isOSWindows() || TT.isOSCygMing()) && !TT.isGNUEnvironment()}]>;
2109
2123
2110
2124
// Use the f128 variants of math functions on x86
@@ -2120,12 +2134,13 @@ defvar X86CommonLibcalls =
2120
2134
LibcallImpls<(add __bzero), darwinHas__bzero>,
2121
2135
LibmHasFrexpF32, LibmHasLdexpF32,
2122
2136
LibmHasFrexpF80, LibmHasLdexpF80,
2123
- LibcallImpls<(add frexp_f128, ldexp_f128), hasFrexplLdexplF128 >,
2137
+ LibcallImpls<(add frexp_f128, ldexp_f128, exp10l_f128 ), hasExpFrexplLdexplF128 >,
2124
2138
DefaultRuntimeLibcallImpls_f80,
2139
+ LibmHasExp10F32, LibmHasExp10F64, LibmHasExp10F80,
2140
+ LibcallImpls<(add MostPowI), isNotOSMSVCRT>,
2125
2141
// FIXME: MSVCRT doesn't have powi. The f128 case is added as a
2126
2142
// hack for one test relying on it.
2127
- __powitf2_f128,
2128
- LibcallImpls<(add MostPowI), isNotOSMSVCRT>
2143
+ __powitf2_f128
2129
2144
);
2130
2145
2131
2146
defvar Windows32DivRemMulCalls =
@@ -2265,4 +2280,5 @@ def WasmSystemLibrary
2265
2280
: SystemRuntimeLibrary<isWasm,
2266
2281
(add DefaultRuntimeLibcallImpls, Int128RTLibcalls,
2267
2282
CompilerRTOnlyInt64Libcalls, CompilerRTOnlyInt128Libcalls,
2283
+ exp10f, exp10,
2268
2284
emscripten_return_address)>;
0 commit comments