Skip to content

Commit 1391d1f

Browse files
committed
RuntimeLibcalls: Avoid adding f80 calls to default set
Starts adding a stub X86 configuration which doesn't attempt the system specific pieces yet. This is mostly to have a point to add back in the f80 calls so they can be removed from every other target.
1 parent 5b51c68 commit 1391d1f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

llvm/include/llvm/IR/RuntimeLibcalls.td

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,10 @@ defvar CompilerRTOnlyInt128Libcalls = [
10121012
__mulodi4
10131013
];
10141014

1015+
defvar DefaultRuntimeLibcallImpls_f80 =
1016+
!filter(entry, AllDefaultRuntimeLibcallImpls,
1017+
!match(!cast<string>(entry.Provides), "F80"));
1018+
10151019
defvar DefaultRuntimeLibcallImpls_ppcf128 =
10161020
!filter(entry, AllDefaultRuntimeLibcallImpls,
10171021
!match(!cast<string>(entry.Provides), "PPCF128"));
@@ -1021,10 +1025,12 @@ defvar DefaultRuntimeLibcallImpls_f128 =
10211025
!match(!cast<string>(entry.Provides), "_F128"));
10221026

10231027
defvar DefaultRuntimeLibcallImpls =
1028+
!listremove(
10241029
!listremove(
10251030
!listremove(
10261031
!listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls),
10271032
CompilerRTOnlyInt128Libcalls),
1033+
DefaultRuntimeLibcallImpls_f80),
10281034
DefaultRuntimeLibcallImpls_ppcf128);
10291035

10301036
defvar DefaultRuntimeLibcallImpls_atomic =
@@ -1929,6 +1935,21 @@ def _allrem : RuntimeLibcallImpl<SREM_I64>;
19291935
def _aullrem : RuntimeLibcallImpl<UREM_I64>;
19301936
def _allmul : RuntimeLibcallImpl<MUL_I64>;
19311937

1938+
//===----------------------------------------------------------------------===//
1939+
// X86 Runtime Libcalls
1940+
//===----------------------------------------------------------------------===//
1941+
1942+
def isX86_32 : RuntimeLibcallPredicate<"TT.getArch() == Triple::x86">;
1943+
def isX86_64 : RuntimeLibcallPredicate<"TT.getArch() == Triple::x86_64">;
1944+
1945+
def X86_32SystemLibrary
1946+
: SystemRuntimeLibrary<isX86_32,
1947+
(add DefaultLibcallImpls32, DefaultRuntimeLibcallImpls_f80)>;
1948+
1949+
def X86_64SystemLibrary
1950+
: SystemRuntimeLibrary<isX86_64,
1951+
(add DefaultLibcallImpls64, DefaultRuntimeLibcallImpls_f80)>;
1952+
19321953
//===----------------------------------------------------------------------===//
19331954
// XCore Runtime Libcalls
19341955
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)