| Original patch from H.J. Lu, as reported there: |
| http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html |
| |
| fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. |
| The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". |
| |
| diff -dur glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.7/sysdeps/i386/fpu/ftestexcept.c |
| --- glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 |
| +++ glibc-2.7/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:54:43.000000000 +0200 |
| @@ -26,7 +26,7 @@ |
| int |
| fetestexcept (int excepts) |
| { |
| - int temp; |
| + short temp; |
| int xtemp = 0; |
| |
| /* Get current exceptions. */ |