diff options
Diffstat (limited to 'sysdeps/arm/get-rounding-mode.h')
-rw-r--r-- | sysdeps/arm/get-rounding-mode.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sysdeps/arm/get-rounding-mode.h b/sysdeps/arm/get-rounding-mode.h index 7d6054c..a1ecf51 100644 --- a/sysdeps/arm/get-rounding-mode.h +++ b/sysdeps/arm/get-rounding-mode.h @@ -28,15 +28,15 @@ static inline int get_rounding_mode (void) { - if (ARM_HAVE_VFP) - { - fpu_control_t fc; - - _FPU_GETCW (fc); - return fc & FE_TOWARDZERO; - } - else + 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; } #endif /* get-rounding-mode.h */ |