patches/glibc/2.7/170-use_short_for_fnstsw.patch
changeset 747 d3e603e7c17c
parent 612 fc9588d57c0f
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/glibc/2.7/170-use_short_for_fnstsw.patch	Mon Jul 28 21:32:33 2008 +0000
     1.3 @@ -0,0 +1,18 @@
     1.4 +Original patch from H.J. Lu, as reported there:
     1.5 +http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html
     1.6 +
     1.7 +fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged.
     1.8 +The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax".
     1.9 +
    1.10 +diff -dur glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.7/sysdeps/i386/fpu/ftestexcept.c
    1.11 +--- glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c	2004-03-05 11:14:48.000000000 +0100
    1.12 ++++ glibc-2.7/sysdeps/i386/fpu/ftestexcept.c	2008-06-24 10:54:43.000000000 +0200
    1.13 +@@ -26,7 +26,7 @@
    1.14 + int
    1.15 + fetestexcept (int excepts)
    1.16 + {
    1.17 +-  int temp;
    1.18 ++  short temp;
    1.19 +   int xtemp = 0;
    1.20 + 
    1.21 +   /* Get current exceptions.  */