summaryrefslogtreecommitdiff
path: root/sysdeps/sh/sh4/fpu/feholdexcpt.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2010-05-20 10:27:56 +0200
committerAndreas Schwab <schwab@redhat.com>2010-05-20 10:27:56 +0200
commit7da8ce2c67668ed4b3f3070e405271d2040bcd6b (patch)
tree8eb78034f8550695aa44131bd5f37cdb1b00dd1b /sysdeps/sh/sh4/fpu/feholdexcpt.c
parentf0806ad101f05ae7738470272d494b8e5b56acca (diff)
parentf2020c64596a90ca8d7d93afa1b8ad155d716f0e (diff)
Merge commit 'glibc-2.11.2' into fedora/2.11/master
Diffstat (limited to 'sysdeps/sh/sh4/fpu/feholdexcpt.c')
-rw-r--r--sysdeps/sh/sh4/fpu/feholdexcpt.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sysdeps/sh/sh4/fpu/feholdexcpt.c b/sysdeps/sh/sh4/fpu/feholdexcpt.c
index 7aac5a0d39..87d6420891 100644
--- a/sysdeps/sh/sh4/fpu/feholdexcpt.c
+++ b/sysdeps/sh/sh4/fpu/feholdexcpt.c
@@ -1,5 +1,6 @@
/* Store current floating-point environment and clear exceptions.
- Copyright (C) 1997, 1998, 1999, 2000, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000, 2005, 2010
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,10 +30,15 @@ feholdexcept (fenv_t *envp)
_FPU_GETCW (temp);
envp->__fpscr = temp;
- /* Now set all exceptions to non-stop. */
+ /* Clear the status flags. */
temp &= ~FE_ALL_EXCEPT;
+
+ /* Now set all exceptions to non-stop. */
+ temp &= ~(FE_ALL_EXCEPT << 5);
+
_FPU_SETCW (temp);
- return 1;
+ /* Success. */
+ return 0;
}
libm_hidden_def (feholdexcept)