This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] ppc64 changes to common powerpc headers


> 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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]