From: Stan Shebs Date: Fri, 27 Aug 2021 23:42:33 +0000 (-0700) Subject: Make powerpc .machine directives be gcc-only X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e21102f77ea0d18e55eba343acd7b2af6bdf648f;p=thirdparty%2Fglibc.git Make powerpc .machine directives be gcc-only --- diff --git a/sysdeps/powerpc/powerpc64/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/fpu/s_isnan.S index 12d23969ee1..b7d9f0840f2 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_isnan.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_isnan.S @@ -24,7 +24,11 @@ ENTRY_TOCLESS (__isnan, 4) CALL_MCOUNT 0 mffs fp0 +#if defined __clang__ + mtfsb0 30 /* reset_fpscr_bit (FPSCR_VE) */ +#else mtfsb0 4*cr6+lt /* reset_fpscr_bit (FPSCR_VE) */ +#endif fcmpu cr7,fp1,fp1 mtfsf 255,fp0 li r3,0 @@ -53,4 +57,3 @@ compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0); compat_symbol (libc, isnan, isnanl, GLIBC_2_0); # endif #endif - diff --git a/sysdeps/powerpc/sysdep.h b/sysdeps/powerpc/sysdep.h index 8a6d236caa4..40398645b10 100644 --- a/sysdeps/powerpc/sysdep.h +++ b/sysdeps/powerpc/sysdep.h @@ -166,6 +166,12 @@ #define ALIGNARG(log2) log2 #define ASM_SIZE_DIRECTIVE(name) .size name,.-name +#if defined __clang__ +#define DOT_MACHINE(str) +#else +#define DOT_MACHINE(str) .machine str +#endif + #else /* Linux kernel powerpc documentation [1] states issuing a syscall inside a diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S index c95e3a14db2..239af286ce2 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S @@ -503,7 +503,7 @@ L(error_exit): R1 pointing at the dummy frame) state. We do have the ucontext address in R3, so simply copy R3 to R1 before the syscall. */ L(do_sigret): - mr r1,r3, + mr r1,r3 li r0,SYS_ify(rt_sigreturn) sc /* No return. */ diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S index 50f72330805..4caa76b6a3c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S @@ -787,7 +787,7 @@ L(error_exit): R1 pointing at the dummy frame) state. We do have the ucontext address in R3, so simply copy R3 to R1 before the syscall. */ L(do_sigret): - mr r1,r3, + mr r1,r3 li r0,SYS_ify(rt_sigreturn) sc /* No return. */