diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-05 19:49:21 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-05 19:49:21 +0000 |
commit | f7cd395fe11095b0641945930cb50b6d493ff95c (patch) | |
tree | 7a562175a133ea0efe10259f136c32396982844f /libgfortran | |
parent | 439cd9b7c2a753a387db542125e4e568d89d9e9e (diff) | |
download | gcc-f7cd395fe11095b0641945930cb50b6d493ff95c.tar.gz |
* config/fpu-387.h (set_fpu): Use __builtin_ia32_stmxcsr and
__builtin_ia32_ldmxcsr intrinsics.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190992 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 5 | ||||
-rw-r--r-- | libgfortran/config/fpu-387.h | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 9f0ed3ec77f..65830870d23 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2012-03-30 Uros Bizjak <ubizjak@gmail.com> + + * config/fpu-387.h (set_fpu): Use __builtin_ia32_stmxcsr and + __builtin_ia32_ldmxcsr intrinsics. + 2012-07-25 Andreas Schwab <schwab@linux-m68k.org> * io/list_read.c (list_formatted_read_scalar): Fix copying real diff --git a/libgfortran/config/fpu-387.h b/libgfortran/config/fpu-387.h index 8bf55b28a61..0e87aab8b9d 100644 --- a/libgfortran/config/fpu-387.h +++ b/libgfortran/config/fpu-387.h @@ -118,7 +118,7 @@ void set_fpu (void) { unsigned int cw_sse; - asm volatile ("stmxcsr %0" : "=m" (cw_sse)); + cw_sse = __builtin_ia32_stmxcsr (); cw_sse &= 0xffff0000; cw_sse |= (_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM | _FPU_MASK_OM @@ -131,6 +131,6 @@ void set_fpu (void) if (options.fpe & GFC_FPE_UNDERFLOW) cw_sse &= ~(_FPU_MASK_UM << 7); if (options.fpe & GFC_FPE_INEXACT) cw_sse &= ~(_FPU_MASK_PM << 7); - asm volatile ("ldmxcsr %0" : : "m" (cw_sse)); + __builtin_ia32_ldmxcsr (cw_sse); } } |