This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] ppc64 changes to common powerpc headers
- From: Geoff Keating <geoffk at geoffk dot org>
- To: sjmunroe at vnet dot ibm dot com
- Cc: libc-alpha at sources dot redhat dot com, aj at suse dot de, roland at frob dot com
- Date: Fri, 20 Sep 2002 11:24:12 -0700
- Subject: Re: [PATCH] ppc64 changes to common powerpc headers
- References: <200209201642.g8KGgcu16376@brule.rchland.ibm.com>
> Date: Fri, 20 Sep 2002 11:42:38 -0500
> From: Steve Munroe <sjmunroe@vnet.ibm.com>
> * sysdeps/powerpc/fpu_control.h (_FPU_GETCW): Make union volitile
> to convince gcc to load int value for storage.
Could you explain the motivation behind this change? It shouldn't be
necessary; most likely you hit a compiler bug.
> diff -rupPN libc23-cvstip-20020918/sysdeps/powerpc/fpu/fpu_control.h libc23/sysdeps/powerpc/fpu/fpu_control.h
> --- libc23-cvstip-20020918/sysdeps/powerpc/fpu/fpu_control.h Wed Dec 5 18:12:11 2001
> +++ libc23/sysdeps/powerpc/fpu/fpu_control.h Fri Sep 20 11:36:49 2002
> @@ -50,7 +50,8 @@ typedef unsigned int fpu_control_t __att
>
> /* Macros for accessing the hardware control word. */
> #define _FPU_GETCW(cw) ( { \
> - union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
> + volatile 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]; \
> tmp.cw[1]; } )
> <<<<<<< ppc64-powerpc-bits.patch
>
--
- Geoffrey Keating <geoffk@geoffk.org>