Skip to content

Commit 2cff07b

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

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

721721
set(nvptx64_SOURCES ${GENERIC_SOURCES})
722722

723-
set(powerpc_SOURCES ${GENERIC_SOURCES})
724-
725723
set(powerpcspe_SOURCES ${GENERIC_SOURCES})
726724

727-
set(powerpc64_SOURCES
725+
set(powerpc_SOURCES
728726
ppc/divtc3.c
729727
ppc/fixtfdi.c
730728
ppc/fixunstfdi.c
@@ -739,14 +737,15 @@ set(powerpc64_SOURCES
739737
)
740738
# These routines require __int128, which isn't supported on AIX.
741739
if (NOT OS_NAME MATCHES "AIX")
742-
set(powerpc64_SOURCES
740+
set(powerpc_SOURCES
743741
ppc/floattitf.c
744742
ppc/fixtfti.c
745743
ppc/fixunstfti.c
746-
${powerpc64_SOURCES}
744+
${powerpc_SOURCES}
747745
)
748746
endif()
749-
set(powerpc64le_SOURCES ${powerpc64_SOURCES})
747+
set(powerpc64le_SOURCES ${powerpc_SOURCES})
748+
set(powerpc64_SOURCES ${powerpc_SOURCES})
750749

751750
set(riscv_SOURCES
752751
cpu_model/riscv.c
@@ -904,9 +903,9 @@ else ()
904903
list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET)
905904
endif()
906905

907-
# For RISCV32, we must force enable int128 for compiling long
906+
# For RISCV32/PPC32, we must force enable int128 for compiling long
908907
# double routines.
909-
if(COMPILER_RT_ENABLE_SOFTWARE_INT128 OR "${arch}" STREQUAL "riscv32")
908+
if(COMPILER_RT_ENABLE_SOFTWARE_INT128 OR "${arch}" STREQUAL "riscv32" OR "${arch}" STREQUAL "powerpc")
910909
list(APPEND BUILTIN_CFLAGS_${arch} -fforce-enable-int128)
911910
endif()
912911

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)