Skip to content

Commit f904978

Browse files
committed
compiler-rt: Enable __int128 for ppc32
Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 parent 055b99c commit f904978

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
@@ -740,11 +740,9 @@ set(mips64el_SOURCES ${GENERIC_TF_SOURCES}
740740

741741
set(nvptx64_SOURCES ${GENERIC_SOURCES})
742742

743-
set(powerpc_SOURCES ${GENERIC_SOURCES})
744-
745743
set(powerpcspe_SOURCES ${GENERIC_SOURCES})
746744

747-
set(powerpc64_SOURCES
745+
set(powerpc_SOURCES
748746
ppc/divtc3.c
749747
ppc/fixtfdi.c
750748
ppc/fixunstfdi.c
@@ -759,14 +757,15 @@ set(powerpc64_SOURCES
759757
)
760758
# These routines require __int128, which isn't supported on AIX.
761759
if (NOT OS_NAME MATCHES "AIX")
762-
set(powerpc64_SOURCES
760+
set(powerpc_SOURCES
763761
ppc/floattitf.c
764762
ppc/fixtfti.c
765763
ppc/fixunstfti.c
766-
${powerpc64_SOURCES}
764+
${powerpc_SOURCES}
767765
)
768766
endif()
769-
set(powerpc64le_SOURCES ${powerpc64_SOURCES})
767+
set(powerpc64le_SOURCES ${powerpc_SOURCES})
768+
set(powerpc64_SOURCES ${powerpc_SOURCES})
770769

771770
set(riscv_SOURCES
772771
cpu_model/riscv.c
@@ -932,9 +931,9 @@ else ()
932931
list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET)
933932
endif()
934933

935-
# For RISCV32, we must force enable int128 for compiling long
934+
# For RISCV32/PPC32, we must force enable int128 for compiling long
936935
# double routines.
937-
if(COMPILER_RT_ENABLE_SOFTWARE_INT128 OR "${arch}" STREQUAL "riscv32")
936+
if(COMPILER_RT_ENABLE_SOFTWARE_INT128 OR "${arch}" STREQUAL "riscv32" OR "${arch}" STREQUAL "powerpc")
938937
list(APPEND BUILTIN_CFLAGS_${arch} -fforce-enable-int128)
939938
endif()
940939

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)