Skip to content

Commit 19c269f

Browse files
committed
Fix __mulodi4 in int128 calls
1 parent 5903548 commit 19c269f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

llvm/include/llvm/IR/RuntimeLibcalls.td

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,14 +1037,18 @@ defvar AllDefaultRuntimeLibcallImpls
10371037
// Exist in libgcc and compiler-rt for 64-bit targets, or if
10381038
// COMPILER_RT_ENABLE_SOFTWARE_INT128.
10391039
defvar Int128RTLibcalls = [
1040-
__ashlti3, __lshrti3, __ashrti3, __multi3, __mulodi4
1040+
__ashlti3, __lshrti3, __ashrti3, __multi3
10411041
];
10421042

10431043
// Only available in compiler-rt
10441044
defvar CompilerRTOnlyInt64Libcalls = [
10451045
__mulodi4
10461046
];
10471047

1048+
defvar CompilerRTOnlyInt128Libcalls = [
1049+
__muloti4
1050+
];
1051+
10481052
defvar DefaultRuntimeLibcallImpls_f80 =
10491053
!filter(entry, AllDefaultRuntimeLibcallImpls,
10501054
!match(!cast<string>(entry.Provides), "F80"));
@@ -1062,7 +1066,8 @@ defvar DefaultRuntimeLibcallImpls =
10621066
!listremove(
10631067
!listremove(
10641068
!listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls),
1065-
CompilerRTOnlyInt64Libcalls),
1069+
!listconcat(CompilerRTOnlyInt64Libcalls,
1070+
CompilerRTOnlyInt128Libcalls)),
10661071
DefaultRuntimeLibcallImpls_f80),
10671072
DefaultRuntimeLibcallImpls_ppcf128);
10681073

@@ -2152,5 +2157,5 @@ def isWasm : RuntimeLibcallPredicate<"TT.isWasm()">;
21522157
def WasmSystemLibrary
21532158
: SystemRuntimeLibrary<isWasm,
21542159
(add DefaultRuntimeLibcallImpls, Int128RTLibcalls,
2155-
CompilerRTOnlyInt64Libcalls, __muloti4,
2160+
CompilerRTOnlyInt64Libcalls, CompilerRTOnlyInt128Libcalls,
21562161
emscripten_return_address)>;

0 commit comments

Comments
 (0)