about summary refs log tree commit diff
path: root/sysdeps/alpha/fpu/fegetenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/alpha/fpu/fegetenv.c')
-rw-r--r--sysdeps/alpha/fpu/fegetenv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c
index 51ce1c21ab..d6b3f70897 100644
--- a/sysdeps/alpha/fpu/fegetenv.c
+++ b/sysdeps/alpha/fpu/fegetenv.c
@@ -18,7 +18,7 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#include <fenv.h>
+#include <fenv_libc.h>
 
 int
 __fegetenv (fenv_t *envp)
@@ -31,10 +31,8 @@ __fegetenv (fenv_t *envp)
   swcr = __ieee_get_fp_control ();
   __asm__ __volatile__ ("mf_fpcr %0" : "=f" (fpcr));
 
-  /* Merge the two bits of information.  The magic number at the end is
-     the exception enable mask.  */
-
-  *envp = (fpcr & (3UL << 58)) | (swcr & (FE_ALL_EXCEPT | 0x3e));
+  /* Merge the two bits of information.  */
+  *envp = ((fpcr & FPCR_ROUND_MASK) | (swcr & SWCR_ALL_MASK));
 
   /* Success.  */
   return 0;