Skip to content

Commit 9c68b43

Browse files
nikictstellar
authored andcommitted
Revert "[compiler-rt][CMake] Enable TF intrinsics on powerpc32 Linux"
As mentioned in https://reviews.llvm.org/D121379#3690593, this change broke the build of compiler-rt targeting powerpc using GCC. The 32-bit powerpc target is not supposed to emit 128-bit libcalls -- if it does, then that's a backend bug and needs to be fixed there. This reverts commit 8f24a56. Differential Revision: https://reviews.llvm.org/D130988 (cherry picked from commit 542977d)
1 parent bf27137 commit 9c68b43

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

compiler-rt/lib/builtins/CMakeLists.txt

+9-7
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,11 @@ set(mips64_SOURCES ${GENERIC_TF_SOURCES}
621621
set(mips64el_SOURCES ${GENERIC_TF_SOURCES}
622622
${mips_SOURCES})
623623

624+
set(powerpc_SOURCES ${GENERIC_SOURCES})
625+
624626
set(powerpcspe_SOURCES ${GENERIC_SOURCES})
625627

626-
set(powerpc_SOURCES
628+
set(powerpc64_SOURCES
627629
ppc/divtc3.c
628630
ppc/fixtfdi.c
629631
ppc/fixunstfdi.c
@@ -638,15 +640,14 @@ set(powerpc_SOURCES
638640
)
639641
# These routines require __int128, which isn't supported on AIX.
640642
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
641-
set(powerpc_SOURCES
643+
set(powerpc64_SOURCES
642644
ppc/floattitf.c
643645
ppc/fixtfti.c
644646
ppc/fixunstfti.c
645-
${powerpc_SOURCES}
647+
${powerpc64_SOURCES}
646648
)
647649
endif()
648-
set(powerpc64le_SOURCES ${powerpc_SOURCES})
649-
set(powerpc64_SOURCES ${powerpc_SOURCES})
650+
set(powerpc64le_SOURCES ${powerpc64_SOURCES})
650651

651652
set(riscv_SOURCES
652653
riscv/save.S
@@ -753,8 +754,9 @@ else ()
753754
list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET)
754755
endif()
755756

756-
# For some arches, force enable int128 for compiling long double routines.
757-
if("${arch}" STREQUAL "powerpc" OR "${arch}" STREQUAL "riscv32")
757+
# For RISCV32, we must force enable int128 for compiling long
758+
# double routines.
759+
if("${arch}" STREQUAL "riscv32")
758760
list(APPEND BUILTIN_CFLAGS_${arch} -fforce-enable-int128)
759761
endif()
760762

compiler-rt/lib/builtins/int_types.h

+1-1
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(__riscv) || defined(_WIN64) || defined(__powerpc__)
67+
defined(__riscv) || defined(_WIN64)
6868
#define CRT_HAS_128BIT
6969
#endif
7070

0 commit comments

Comments
 (0)