Skip to content

Commit 502e690

Browse files
committed
compiler-rt: Enable __int128 for ppc32
Upstream-Status: Pending Signed-off-by: Khem Raj <[email protected]>
1 parent 6b5371b commit 502e690

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

compiler-rt/lib/builtins/CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -812,11 +812,9 @@ set(mips64el_SOURCES ${GENERIC_TF_SOURCES}
812812

813813
set(nvptx64_SOURCES ${GENERIC_SOURCES})
814814

815-
set(powerpc_SOURCES ${GENERIC_SOURCES})
816-
817815
set(powerpcspe_SOURCES ${GENERIC_SOURCES})
818816

819-
set(powerpc64_SOURCES
817+
set(powerpc_SOURCES
820818
ppc/divtc3.c
821819
ppc/fixtfdi.c
822820
ppc/fixunstfdi.c
@@ -831,14 +829,15 @@ set(powerpc64_SOURCES
831829
)
832830
# These routines require __int128, which isn't supported on AIX.
833831
if (NOT OS_NAME MATCHES "AIX")
834-
set(powerpc64_SOURCES
832+
set(powerpc_SOURCES
835833
ppc/floattitf.c
836834
ppc/fixtfti.c
837835
ppc/fixunstfti.c
838-
${powerpc64_SOURCES}
836+
${powerpc_SOURCES}
839837
)
840838
endif()
841-
set(powerpc64le_SOURCES ${powerpc64_SOURCES})
839+
set(powerpc64le_SOURCES ${powerpc_SOURCES})
840+
set(powerpc64_SOURCES ${powerpc_SOURCES})
842841

843842
set(riscv_SOURCES
844843
cpu_model/riscv.c
@@ -1013,7 +1012,7 @@ else ()
10131012

10141013
# For RISCV32 and 32-bit SPARC, we must force enable int128 for compiling long
10151014
# double routines.
1016-
if (COMPILER_RT_ENABLE_SOFTWARE_INT128 OR ("${arch}" MATCHES "riscv32|sparc$"
1015+
if (COMPILER_RT_ENABLE_SOFTWARE_INT128 OR ("${arch}" MATCHES "riscv32|powerpc|sparc$"
10171016
AND NOT CMAKE_COMPILER_IS_GNUCC))
10181017
list(APPEND BUILTIN_CFLAGS_${arch} -fforce-enable-int128)
10191018
endif()

compiler-rt/lib/builtins/int_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ typedef union {
6464
} udwords;
6565

6666
#if defined(__LP64__) || defined(__wasm__) || defined(__mips64) || \
67-
defined(__SIZEOF_INT128__) || defined(_WIN64)
67+
defined(__SIZEOF_INT128__) || defined(_WIN64) || defined(__powerpc__)
6868
#define CRT_HAS_128BIT
6969
#endif
7070

0 commit comments

Comments
 (0)