aboutsummaryrefslogtreecommitdiff
path: root/ports/sysdeps/ia64/fpu/fegetround.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-09-24 17:52:18 -0400
committerMike Frysinger <vapier@gentoo.org>2012-09-24 17:56:18 -0400
commit15055a1cd7e2c249093a5f6d57eca817767d8b85 (patch)
treeca69c8480b7860ead4be9fa63613c81f2fcacde8 /ports/sysdeps/ia64/fpu/fegetround.c
parent2d48610df228ee55736f0ad965d28fa1d82ebe2e (diff)
downloadglibc-15055a1cd7e2c249093a5f6d57eca817767d8b85.tar
glibc-15055a1cd7e2c249093a5f6d57eca817767d8b85.tar.gz
glibc-15055a1cd7e2c249093a5f6d57eca817767d8b85.tar.bz2
glibc-15055a1cd7e2c249093a5f6d57eca817767d8b85.zip
ia64: define new get-rounding-mode.h header
The new strtod function wants rounding information from the C lib, so move the guts of the ia64 version into a header file for it to use. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'ports/sysdeps/ia64/fpu/fegetround.c')
-rw-r--r--ports/sysdeps/ia64/fpu/fegetround.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/ports/sysdeps/ia64/fpu/fegetround.c b/ports/sysdeps/ia64/fpu/fegetround.c
index e672f61922..403aadb41b 100644
--- a/ports/sysdeps/ia64/fpu/fegetround.c
+++ b/ports/sysdeps/ia64/fpu/fegetround.c
@@ -1,5 +1,5 @@
/* Return current rounding direction.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Christian Boissat <Christian.Boissat@cern.ch>, 1999.
@@ -17,14 +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)
{
- fenv_t fpsr;
-
- __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (fpsr));
-
- return (fpsr >> 10) & 3;
+ return get_rounding_mode ();
}