PATCH: Use short for fnstsw

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

PATCH: Use short for fnstsw

H.J. Lu-27
I am checking this x86 assembler patch:

http://sourceware.org/ml/binutils/2008-01/msg00148.html

to check operand size. fnstsw stores 16bit into %ax. The upper
16bit of %eax is unchanged.  The new assembler will disallow
"fnstsw %eax".  Here is a patch for glibc.


H.J.
---
2008-01-12  H.J. Lu  <[hidden email]>

        * sysdeps/i386/fpu/ftestexcept.c (fetestexcept): Use short
        for fnstsw.

--- sysdeps/i386/fpu/ftestexcept.c.foo 2004-03-05 02:14:48.000000000 -0800
+++ sysdeps/i386/fpu/ftestexcept.c 2008-01-12 07:36:22.000000000 -0800
@@ -26,7 +26,7 @@
 int
 fetestexcept (int excepts)
 {
-  int temp;
+  short temp;
   int xtemp = 0;
 
   /* Get current exceptions.  */
Reply | Threaded
Open this post in threaded view
|

Re: PATCH: Use short for fnstsw

Ulrich Drepper
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Applied.

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHljeJ2ijCOnn/RHQRAuw8AJ9xX++4Nd+Ax3XdXPMK1qsxd92NxACffdcU
ghb6cLC/aCsivmlk1+Yiuiw=
=dgvY
-----END PGP SIGNATURE-----