From: Fangrui Song Date: Mon, 7 Nov 2022 01:34:04 +0000 (-0800) Subject: [builtins] Canonicalize PowerPC detection macros to __powerpc__ X-Git-Tag: upstream/17.0.6~28391 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0f91ec243d6ddb1f8b1f80d15f9003e5f06b0a21;p=platform%2Fupstream%2Fllvm.git [builtins] Canonicalize PowerPC detection macros to __powerpc__ The lowercase __ppc__ is not defined by Linux GCC, therefore it lures users to write code which is not portable to GCC. Migrate to __powerpc__ in preparation for undefining __ppc__. __powerpc__ is much more common than __PPC__. --- diff --git a/compiler-rt/lib/builtins/apple_versioning.c b/compiler-rt/lib/builtins/apple_versioning.c index f87b428..83d4194 100644 --- a/compiler-rt/lib/builtins/apple_versioning.c +++ b/compiler-rt/lib/builtins/apple_versioning.c @@ -138,13 +138,13 @@ NOT_HERE_BEFORE_10_6(__udivti3) NOT_HERE_BEFORE_10_6(__umoddi3) NOT_HERE_BEFORE_10_6(__umodti3) -#if __ppc__ +#if __powerpc__ NOT_HERE_BEFORE_10_6(__gcc_qadd) NOT_HERE_BEFORE_10_6(__gcc_qdiv) NOT_HERE_BEFORE_10_6(__gcc_qmul) NOT_HERE_BEFORE_10_6(__gcc_qsub) NOT_HERE_BEFORE_10_6(__trampoline_setup) -#endif // __ppc__ +#endif // __powerpc__ NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange) NOT_HERE_IN_10_8_AND_EARLIER(__atomic_compare_exchange_1) diff --git a/compiler-rt/lib/builtins/trampoline_setup.c b/compiler-rt/lib/builtins/trampoline_setup.c index a624317..844eb27 100644 --- a/compiler-rt/lib/builtins/trampoline_setup.c +++ b/compiler-rt/lib/builtins/trampoline_setup.c @@ -16,7 +16,7 @@ extern void __clear_cache(void *start, void *end); // which loads r11 with a pointer to the outer function's locals // and then jumps to the target nested function. -#if __ppc__ && !defined(__powerpc64__) +#if __powerpc__ && !defined(__powerpc64__) COMPILER_RT_ABI void __trampoline_setup(uint32_t *trampOnStack, int trampSizeAllocated, const void *realFunc, void *localsPtr) { @@ -40,4 +40,4 @@ COMPILER_RT_ABI void __trampoline_setup(uint32_t *trampOnStack, // clear instruction cache __clear_cache(trampOnStack, &trampOnStack[10]); } -#endif // __ppc__ && !defined(__powerpc64__) +#endif // __powerpc__ && !defined(__powerpc64__)