diff options
author | Andrew Stubbs <ams@codesourcery.com> | 2010-05-12 10:18:26 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-05-12 10:18:26 -0700 |
commit | 21a2b1aeeb9bbf49d76bac632327c19bc937d2d7 (patch) | |
tree | 7698b90ba32bb9a48b7c43c5e27ee6007ebec123 /sysdeps/sh | |
parent | 3f7dcb2b0f9f2e771f2fd0139f032198c2d01ba9 (diff) | |
download | glibc-21a2b1aeeb9bbf49d76bac632327c19bc937d2d7.zip glibc-21a2b1aeeb9bbf49d76bac632327c19bc937d2d7.tar.gz glibc-21a2b1aeeb9bbf49d76bac632327c19bc937d2d7.tar.bz2 |
Fix FP exception control.
Diffstat (limited to 'sysdeps/sh')
-rw-r--r-- | sysdeps/sh/sh4/fpu/feholdexcpt.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sysdeps/sh/sh4/fpu/feholdexcpt.c b/sysdeps/sh/sh4/fpu/feholdexcpt.c index 7aac5a0..87d6420 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) |