@@ -439,26 +439,21 @@ let IsDefault = true in {
439
439
def __ashlhi3 : RuntimeLibcallImpl<SHL_I16>;
440
440
def __ashlsi3 : RuntimeLibcallImpl<SHL_I32>;
441
441
def __ashldi3 : RuntimeLibcallImpl<SHL_I64>;
442
- def __ashlti3 : RuntimeLibcallImpl<SHL_I128>;
443
442
444
443
def __lshrhi3 : RuntimeLibcallImpl<SRL_I16>;
445
444
def __lshrsi3 : RuntimeLibcallImpl<SRL_I32>;
446
445
def __lshrdi3 : RuntimeLibcallImpl<SRL_I64>;
447
- def __lshrti3 : RuntimeLibcallImpl<SRL_I128>;
448
446
449
447
def __ashrhi3 : RuntimeLibcallImpl<SRA_I16>;
450
448
def __ashrsi3 : RuntimeLibcallImpl<SRA_I32>;
451
449
def __ashrdi3 : RuntimeLibcallImpl<SRA_I64>;
452
- def __ashrti3 : RuntimeLibcallImpl<SRA_I128>;
453
450
454
451
def __mulqi3 : RuntimeLibcallImpl<MUL_I8>;
455
452
def __mulhi3 : RuntimeLibcallImpl<MUL_I16>;
456
453
def __mulsi3 : RuntimeLibcallImpl<MUL_I32>;
457
454
def __muldi3 : RuntimeLibcallImpl<MUL_I64>;
458
- def __multi3 : RuntimeLibcallImpl<MUL_I128>;
459
455
460
456
def __mulosi4 : RuntimeLibcallImpl<MULO_I32>;
461
- def __mulodi4 : RuntimeLibcallImpl<MULO_I64>;
462
457
463
458
def __divqi3 : RuntimeLibcallImpl<SDIV_I8>;
464
459
def __divhi3 : RuntimeLibcallImpl<SDIV_I16>;
@@ -935,10 +930,29 @@ def calloc : RuntimeLibcallImpl<CALLOC>;
935
930
} // End let IsDefault = true
936
931
937
932
//--------------------------------------------------------------------
938
- // compiler-rt, not available for most architectures
933
+ // compiler-rt/libgcc but 64-bit only , not available by default
939
934
//--------------------------------------------------------------------
940
935
941
- def __muloti4 : RuntimeLibcallImpl<MULO_I128>;
936
+ // Exist in libgcc and compiler-rt for 64-bit targets, or if
937
+ // COMPILER_RT_ENABLE_SOFTWARE_INT128.
938
+ defset list<RuntimeLibcallImpl> Int128RTLibcalls = {
939
+ def __ashlti3 : RuntimeLibcallImpl<SHL_I128>;
940
+ def __lshrti3 : RuntimeLibcallImpl<SRL_I128>;
941
+ def __ashrti3 : RuntimeLibcallImpl<SRA_I128>;
942
+ def __multi3 : RuntimeLibcallImpl<MUL_I128>;
943
+ }
944
+
945
+ //--------------------------------------------------------------------
946
+ // compiler-rt only, not available by default
947
+ //--------------------------------------------------------------------
948
+
949
+ defset list<RuntimeLibcallImpl> CompilerRTOnlyInt64Libcalls = {
950
+ def __mulodi4 : RuntimeLibcallImpl<MULO_I64>;
951
+ }
952
+
953
+ defset list<RuntimeLibcallImpl> CompilerRTOnlyInt128Libcalls = {
954
+ def __muloti4 : RuntimeLibcallImpl<MULO_I128>;
955
+ }
942
956
943
957
//--------------------------------------------------------------------
944
958
// Define implementation other libcalls
@@ -1034,21 +1048,6 @@ defset list<RuntimeLibcallImpl> LibmF128FiniteLibcalls = {
1034
1048
defvar AllDefaultRuntimeLibcallImpls
1035
1049
= !filter(entry, !instances<RuntimeLibcallImpl>(), entry.IsDefault);
1036
1050
1037
- // Exist in libgcc and compiler-rt for 64-bit targets, or if
1038
- // COMPILER_RT_ENABLE_SOFTWARE_INT128.
1039
- defvar Int128RTLibcalls = [
1040
- __ashlti3, __lshrti3, __ashrti3, __multi3
1041
- ];
1042
-
1043
- // Only available in compiler-rt
1044
- defvar CompilerRTOnlyInt64Libcalls = [
1045
- __mulodi4
1046
- ];
1047
-
1048
- defvar CompilerRTOnlyInt128Libcalls = [
1049
- __muloti4
1050
- ];
1051
-
1052
1051
defvar DefaultRuntimeLibcallImpls_f80 =
1053
1052
!filter(entry, AllDefaultRuntimeLibcallImpls,
1054
1053
!match(!cast<string>(entry.Provides), "F80"));
@@ -1064,12 +1063,9 @@ defvar DefaultRuntimeLibcallImpls_f128 =
1064
1063
defvar DefaultRuntimeLibcallImpls =
1065
1064
!listremove(
1066
1065
!listremove(
1067
- !listremove(
1068
- !listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls),
1069
- !listconcat(CompilerRTOnlyInt64Libcalls,
1070
- CompilerRTOnlyInt128Libcalls)),
1071
- DefaultRuntimeLibcallImpls_f80),
1072
- DefaultRuntimeLibcallImpls_ppcf128);
1066
+ !listremove(AllDefaultRuntimeLibcallImpls, Int128RTLibcalls),
1067
+ DefaultRuntimeLibcallImpls_f80),
1068
+ DefaultRuntimeLibcallImpls_ppcf128);
1073
1069
1074
1070
/// Default set of libcall impls for 32-bit architectures.
1075
1071
defvar DefaultLibcallImpls32 = DefaultRuntimeLibcallImpls;
0 commit comments