This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] PPC fpu_control.h clean up
- From: Steven Munroe <sjmunroe at us dot ibm dot com>
- To: libc-alpha <libc-alpha at sources dot redhat dot com>
- Cc: Franz-Sirl <Franz-Sirl at lauterbach dot com>, paulus <paulus at samba dot org>, anton <anton at samba dot org>
- Date: Thu, 27 Feb 2003 09:47:08 -0600
- Subject: [PATCH] PPC fpu_control.h clean up
- Organization: IBM Linux Developement
- Reply-to: sjmunroe at vnet dot ibm dot com
General PPC cleanup, Rename the macro arguement to avoid conflict with
field name within the union tmp. Reformat for line length.
2003-02-26 Steven Munroe <sjmunroe at us dot ibm dot com>
* sysdeps/powerpc/fpu/fpu_control.h (_FPU_GETCW, _FPU_SETCW):
Rename argument to avoid symbol conflict.
--
Steven Munroe
sjmunroe at us dot ibm dot com
Linux on PowerPC-64 Development
GLIBC for PowerPC-64 Development
diff -urN libc23-cvstip-20030226/sysdeps/powerpc/fpu/fpu_control.h libc23/sysdeps/powerpc/fpu/fpu_control.h
--- libc23-cvstip-20030226/sysdeps/powerpc/fpu/fpu_control.h 2001-12-05 18:12:11.000000000 -0600
+++ libc23/sysdeps/powerpc/fpu/fpu_control.h 2003-02-27 09:25:03.000000000 -0600
@@ -49,15 +49,17 @@
typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
/* Macros for accessing the hardware control word. */
-#define _FPU_GETCW(cw) ( { \
- union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
+#define _FPU_GETCW(__cw) ( { \
+ union { double d; fpu_control_t cw[2]; } \
+ tmp __attribute__ ((__aligned__(8))); \
__asm__ ("mffs 0; stfd%U0 0,%0" : "=m" (tmp.d) : : "fr0"); \
- (cw)=tmp.cw[1]; \
+ (__cw)=tmp.cw[1]; \
tmp.cw[1]; } )
-#define _FPU_SETCW(cw) { \
- union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
+#define _FPU_SETCW(__cw) { \
+ union { double d; fpu_control_t cw[2]; } \
+ tmp __attribute__ ((__aligned__(8))); \
tmp.cw[0] = 0xFFF80000; /* More-or-less arbitrary; this is a QNaN. */ \
- tmp.cw[1] = cw; \
+ tmp.cw[1] = __cw; \
__asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
}