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]

Re: glibc 2.1.92 make check results under Linux PPC


On Thu, 17 Aug 2000, Franz Sirl wrote:

> > On Wed, 16 Aug 2000, Geoff Keating wrote:
> > > From: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
> > > Date: Thu, 17 Aug 2000 00:51:26 +0200
> > >
> > > 	* sysdeps/powerpc/fpu_control.h: Clobber the right amount of memory.
> >
> > I think this won't work the way you might like, because of type-based
> > alias analysis.  Instead, we need a union:
> >
> > union { double d; fpu_control_t c[2]; } tmp;
>
> Ah, yes, sure, I forgot about that. Find appended a new version of the
> patch.

Argh, make being smart about .i and .s files tricked me in thinking this 
passes with gcc-2.96 too. But due to better optimization (eg. glibc22 is 
about 5% smaller with 2.96) gcc now creates an auto-inc address. This 
requires a small additional patch.

Franz.
Index: sysdeps/powerpc/fpu_control.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/powerpc/fpu_control.h,v
retrieving revision 1.5
diff -u -p -r1.5 fpu_control.h
--- sysdeps/powerpc/fpu_control.h	2000/08/17 20:30:24	1.5
+++ sysdeps/powerpc/fpu_control.h	2000/08/20 11:19:39
@@ -51,14 +51,14 @@ 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))); \
-  __asm__ ("mffs 0; stfd 0,%0" : "=m" (tmp.d) : : "fr0"); \
+  __asm__ ("mffs 0; stfd%U0 0,%0" : "=m" (tmp.d) : : "fr0"); \
   (cw)=tmp.cw[1]; \
   tmp.cw[1]; } )
 #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; \
-  __asm__ ("lfd 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
+  __asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
 }
 
 /* Default control word set at startup.  */

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