Skip to content

Commit b862027

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

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

compiler-rt/lib/builtins/CMakeLists.txt

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

764764
set(nvptx64_SOURCES ${GENERIC_SOURCES})
765765

766-
set(powerpc_SOURCES ${GENERIC_SOURCES})
767-
768766
set(powerpcspe_SOURCES ${GENERIC_SOURCES})
769767

770-
set(powerpc64_SOURCES
768+
set(powerpc_SOURCES
771769
ppc/divtc3.c
772770
ppc/fixtfdi.c
773771
ppc/fixunstfdi.c
@@ -782,14 +780,15 @@ set(powerpc64_SOURCES
782780
)
783781
# These routines require __int128, which isn't supported on AIX.
784782
if (NOT OS_NAME MATCHES "AIX")
785-
set(powerpc64_SOURCES
783+
set(powerpc_SOURCES
786784
ppc/floattitf.c
787785
ppc/fixtfti.c
788786
ppc/fixunstfti.c
789-
${powerpc64_SOURCES}
787+
${powerpc_SOURCES}
790788
)
791789
endif()
792-
set(powerpc64le_SOURCES ${powerpc64_SOURCES})
790+
set(powerpc64le_SOURCES ${powerpc_SOURCES})
791+
set(powerpc64_SOURCES ${powerpc_SOURCES})
793792

794793
set(riscv_SOURCES
795794
cpu_model/riscv.c
@@ -960,9 +959,9 @@ else ()
960959
list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET)
961960
endif()
962961

963-
# For RISCV32, we must force enable int128 for compiling long
962+
# For RISCV32/PPC32, we must force enable int128 for compiling long
964963
# double routines.
965-
if(COMPILER_RT_ENABLE_SOFTWARE_INT128 OR "${arch}" STREQUAL "riscv32")
964+
if(COMPILER_RT_ENABLE_SOFTWARE_INT128 OR "${arch}" STREQUAL "riscv32" OR "${arch}" STREQUAL "powerpc")
966965
list(APPEND BUILTIN_CFLAGS_${arch} -fforce-enable-int128)
967966
endif()
968967

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)