diff options
author | Uros Bizjak <uros@kss-loka.si> | 2005-10-14 13:06:11 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2005-10-14 13:06:11 +0200 |
commit | 771c0562b56432ea64558329688a8281bc1e9996 (patch) | |
tree | 2b42f882979ceb19a50970e05a58ae46dcc218a2 /libgfortran/config | |
parent | 76f5f4414f0565e5753802a7dee10b88eef9d08c (diff) | |
download | gcc-771c0562b56432ea64558329688a8281bc1e9996.zip gcc-771c0562b56432ea64558329688a8281bc1e9996.tar.gz gcc-771c0562b56432ea64558329688a8281bc1e9996.tar.bz2 |
fpu-387.h (set_fpu): Remove extra ":" in stmxcsr.
* config/fpu-387.h (set_fpu): Remove extra ":" in stmxcsr.
Change cw and cw_sse variables to unsigned.
(SSE): New definition.
(has_sse): Use it.
From-SVN: r105402
Diffstat (limited to 'libgfortran/config')
-rw-r--r-- | libgfortran/config/fpu-387.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libgfortran/config/fpu-387.h b/libgfortran/config/fpu-387.h index e7f3518..bf9fbc8 100644 --- a/libgfortran/config/fpu-387.h +++ b/libgfortran/config/fpu-387.h @@ -28,6 +28,7 @@ License along with libgfortran; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#define SSE (1 << 25) static int has_sse (void) @@ -58,7 +59,7 @@ has_sse (void) : "=a" (eax), "=r" (ebx), "=c" (ecx), "=d" (edx) : "0" (1)); - if (edx & (1 << 25)) + if (edx & SSE) return 1; return 0; @@ -67,8 +68,8 @@ has_sse (void) void set_fpu (void) { - short cw; - int cw_sse; + unsigned short cw; + unsigned int cw_sse; /* i387 -- see linux <fpu_control.h> header file for details. */ #define _FPU_MASK_IM 0x01 @@ -90,7 +91,7 @@ void set_fpu (void) if (has_sse()) { /* SSE */ - asm volatile ("stmxcsr %0" : : "=m" (cw_sse)); + asm volatile ("stmxcsr %0" : "=m" (cw_sse)); cw_sse &= 0xFFFF0000; if (options.fpe & GFC_FPE_INVALID) cw_sse |= 1 << 7; if (options.fpe & GFC_FPE_DENORMAL) cw_sse |= 1 << 8; |