about summary refs log tree commit diff
path: root/sysdeps/arm/fegetround.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/arm/fegetround.c')
-rw-r--r--sysdeps/arm/fegetround.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/sysdeps/arm/fegetround.c b/sysdeps/arm/fegetround.c
index 1c9c151a16..fbad0b3078 100644
--- a/sysdeps/arm/fegetround.c
+++ b/sysdeps/arm/fegetround.c
@@ -16,22 +16,12 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <fenv.h>
-#include <fpu_control.h>
-#include <arm-features.h>
+#include <get-rounding-mode.h>
 
 
 int
 fegetround (void)
 {
-  fpu_control_t fpscr;
-
-  /* FE_TONEAREST is the only supported rounding mode
-     if a VFP unit isn't present.  */
-  if (!ARM_HAVE_VFP)
-    return FE_TONEAREST;
-
-  _FPU_GETCW (fpscr);
-  return fpscr & FE_TOWARDZERO;
+  return get_rounding_mode ();
 }
 libm_hidden_def (fegetround)