diff options
Diffstat (limited to 'ports/sysdeps/hppa/fpu/fegetround.c')
-rw-r--r-- | ports/sysdeps/hppa/fpu/fegetround.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/ports/sysdeps/hppa/fpu/fegetround.c b/ports/sysdeps/hppa/fpu/fegetround.c index 70d2e476fe..d603e66f13 100644 --- a/ports/sysdeps/hppa/fpu/fegetround.c +++ b/ports/sysdeps/hppa/fpu/fegetround.c @@ -1,5 +1,5 @@ /* Return current rounding direction. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Huggins-Daines <dhd@debian.org>, 2000 @@ -17,17 +17,10 @@ License along with the GNU C Library. If not, see <http://www.gnu.org/licenses/>. */ -#include <fenv.h> +#include <get-rounding-mode.h> int fegetround (void) { - union { unsigned long long l; unsigned int sw[2] } s; - - /* Get the current status word. */ - __asm__ ("fstd %%fr0,0(%1) \n\t" - "fldd 0(%1),%%fr0 \n\t" - : "=m" (s.l) : "r" (&s.l)); - - return (s.sw[0] & FE_DOWNWARD); + return get_rounding_mode (); } |