Index: compiler-rt/cmake/Modules/CompilerRTUtils.cmake =================================================================== --- compiler-rt/cmake/Modules/CompilerRTUtils.cmake +++ compiler-rt/cmake/Modules/CompilerRTUtils.cmake @@ -167,6 +167,8 @@ check_symbol_exists(__i386__ "" __I386) check_symbol_exists(__mips__ "" __MIPS) check_symbol_exists(__mips64__ "" __MIPS64) + check_symbol_exists(__powerpc64__ "" __PPC64) + check_symbol_exists(__powerpc64le__ "" __PPC64LE) check_symbol_exists(__s390x__ "" __S390X) check_symbol_exists(__wasm32__ "" __WEBASSEMBLY32) check_symbol_exists(__wasm64__ "" __WEBASSEMBLY64) @@ -184,6 +186,10 @@ add_default_target_arch(mips64) elseif(__MIPS) add_default_target_arch(mips) + elseif(__PPC64) + add_default_target_arch(powerpc64) + elseif(__PPC64LE) + add_default_target_arch(powerpc64le) elseif(__S390X) add_default_target_arch(s390x) elseif(__WEBASSEMBLY32) Index: compiler-rt/cmake/base-config-ix.cmake =================================================================== --- compiler-rt/cmake/base-config-ix.cmake +++ compiler-rt/cmake/base-config-ix.cmake @@ -4,6 +4,7 @@ # runtime libraries. include(CheckIncludeFile) +include(TestBigEndian) check_include_file(unwind.h HAVE_UNWIND_H) # Top level target used to build all compiler-rt libraries. @@ -180,6 +181,10 @@ test_target_arch(aarch32 "" "-march=armv8-a") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch64") test_target_arch(aarch64 "" "-march=armv8-a") + elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc64") + test_target_arch(powerpc64 "" "--target=powerpc64-unknown-unknown") + elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "powerpc64le") + test_target_arch(powerpc64le "" "--target=powerpc64le-unknown-unknown") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "wasm32") test_target_arch(wasm32 "" "--target=wasm32-unknown-unknown") elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "wasm64") Index: compiler-rt/cmake/builtin-config-ix.cmake =================================================================== --- compiler-rt/cmake/builtin-config-ix.cmake +++ compiler-rt/cmake/builtin-config-ix.cmake @@ -40,7 +40,7 @@ endif() set(ALL_BUILTIN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} - ${MIPS32} ${MIPS64} ${WASM32} ${WASM64}) + ${MIPS32} ${MIPS64} ${PPC64} ${WASM32} ${WASM64}) include(CompilerRTUtils) include(CompilerRTDarwinUtils) Index: compiler-rt/lib/builtins/CMakeLists.txt =================================================================== --- compiler-rt/lib/builtins/CMakeLists.txt +++ compiler-rt/lib/builtins/CMakeLists.txt @@ -458,6 +458,20 @@ set(mips64el_SOURCES ${GENERIC_TF_SOURCES} ${mips_SOURCES}) +set(powerpc64_SOURCES + ppc/divtc3.c + ppc/fixtfdi.c + ppc/fixunstfdi.c + ppc/floatditf.c + ppc/floatunditf.c + ppc/gcc_qadd.c + ppc/gcc_qdiv.c + ppc/gcc_qmul.c + ppc/gcc_qsub.c + ppc/multc3.c + ${GENERIC_SOURCES}) +set(powerpc64le_SOURCES ${powerpc64_SOURCES}) + set(wasm32_SOURCES ${GENERIC_SOURCES}) set(wasm64_SOURCES ${GENERIC_SOURCES}) Index: compiler-rt/test/builtins/Unit/fixunsxfti_test.c =================================================================== --- compiler-rt/test/builtins/Unit/fixunsxfti_test.c +++ compiler-rt/test/builtins/Unit/fixunsxfti_test.c @@ -2,7 +2,7 @@ // XFAIL: aarch64 // test fails for aarch64 (see pr32260) -// UNSUPPORTED: mips +// UNSUPPORTED: mips, powerpc64, powerpc64le //===-- fixunsxfti_test.c - Test __fixunsxfti -----------------------------===// // Index: compiler-rt/test/builtins/Unit/fixxfti_test.c =================================================================== --- compiler-rt/test/builtins/Unit/fixxfti_test.c +++ compiler-rt/test/builtins/Unit/fixxfti_test.c @@ -2,7 +2,7 @@ // XFAIL: aarch64 // test fails for aarch64 (see pr32260) -// UNSUPPORTED: mips +// UNSUPPORTED: mips, powerpc64, powerpc64le //===-- fixxfti_test.c - Test __fixxfti -----------------------------------===// // Index: compiler-rt/test/builtins/Unit/floattixf_test.c =================================================================== --- compiler-rt/test/builtins/Unit/floattixf_test.c +++ compiler-rt/test/builtins/Unit/floattixf_test.c @@ -2,7 +2,7 @@ // XFAIL: aarch64 // test fails for aarch64 (see pr32260) -// UNSUPPORTED: mips +// UNSUPPORTED: mips, powerpc64, powerpc64le //===-- floattixf.c - Test __floattixf ------------------------------------===// // Index: compiler-rt/test/builtins/Unit/floatuntixf_test.c =================================================================== --- compiler-rt/test/builtins/Unit/floatuntixf_test.c +++ compiler-rt/test/builtins/Unit/floatuntixf_test.c @@ -2,7 +2,7 @@ // XFAIL: aarch64 // test fails for aarch64 (see pr32260) -// UNSUPPORTED: mips +// UNSUPPORTED: mips, powerpc64, powerpc64le //===-- floatuntixf.c - Test __floatuntixf --------------------------------===// //