Skip to content

Commit 463145c

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 0537f17 commit 463145c

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
@@ -1040,6 +1040,10 @@ defvar CompilerRTOnlyInt128Libcalls = [
10401040
__mulodi4
10411041
];
10421042

1043+
defvar DefaultRuntimeLibcallImpls_f80 =
1044+
!filter(entry, AllDefaultRuntimeLibcallImpls,
1045+
!match(!cast<string>(entry.Provides), "F80"));
1046+
10431047
defvar DefaultRuntimeLibcallImpls_ppcf128 =
10441048
!filter(entry, AllDefaultRuntimeLibcallImpls,
10451049
!match(!cast<string>(entry.Provides), "PPCF128"));
@@ -1049,10 +1053,12 @@ defvar DefaultRuntimeLibcallImpls_f128 =
10491053
!match(!cast<string>(entry.Provides), "_F128"));
10501054

10511055
defvar DefaultRuntimeLibcallImpls =
1056+
!listremove(
10521057
!listremove(
10531058
!listremove(
10541059
!listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls),
10551060
CompilerRTOnlyInt128Libcalls),
1061+
DefaultRuntimeLibcallImpls_f80),
10561062
DefaultRuntimeLibcallImpls_ppcf128);
10571063

10581064
defvar DefaultRuntimeLibcallImpls_atomic =
@@ -1986,6 +1992,21 @@ def _allrem : RuntimeLibcallImpl<SREM_I64>;
19861992
def _aullrem : RuntimeLibcallImpl<UREM_I64>;
19871993
def _allmul : RuntimeLibcallImpl<MUL_I64>;
19881994

1995+
//===----------------------------------------------------------------------===//
1996+
// X86 Runtime Libcalls
1997+
//===----------------------------------------------------------------------===//
1998+
1999+
def isX86_32 : RuntimeLibcallPredicate<"TT.getArch() == Triple::x86">;
2000+
def isX86_64 : RuntimeLibcallPredicate<"TT.getArch() == Triple::x86_64">;
2001+
2002+
def X86_32SystemLibrary
2003+
: SystemRuntimeLibrary<isX86_32,
2004+
(add DefaultLibcallImpls32, DefaultRuntimeLibcallImpls_f80)>;
2005+
2006+
def X86_64SystemLibrary
2007+
: SystemRuntimeLibrary<isX86_64,
2008+
(add DefaultLibcallImpls64, DefaultRuntimeLibcallImpls_f80)>;
2009+
19892010
//===----------------------------------------------------------------------===//
19902011
// XCore Runtime Libcalls
19912012
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)