diff options
author | Wilco <wdijkstr@arm.com> | 2014-05-15 15:18:40 +0100 |
---|---|---|
committer | Marcus Shawcroft <marcus.shawcroft@arm.com> | 2014-05-15 15:23:27 +0100 |
commit | 1a2f40e5d14ed6450696feacf04fca5eeceae7ef (patch) | |
tree | f08d34c9426d8833b6daef1509a1ac431e0b3c0b /sysdeps/arm/fgetexcptflg.c | |
parent | cf26a0cb6a0bbaca46a01ddad6662e5e5159a32a (diff) | |
download | glibc-1a2f40e5d14ed6450696feacf04fca5eeceae7ef.tar.gz glibc-1a2f40e5d14ed6450696feacf04fca5eeceae7ef.tar.xz glibc-1a2f40e5d14ed6450696feacf04fca5eeceae7ef.zip |
ARM: Improve fenv implementation
Diffstat (limited to 'sysdeps/arm/fgetexcptflg.c')
-rw-r--r-- | sysdeps/arm/fgetexcptflg.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sysdeps/arm/fgetexcptflg.c b/sysdeps/arm/fgetexcptflg.c index beb43be748..63fdfbf747 100644 --- a/sysdeps/arm/fgetexcptflg.c +++ b/sysdeps/arm/fgetexcptflg.c @@ -25,19 +25,14 @@ int fegetexceptflag (fexcept_t *flagp, int excepts) { - if (ARM_HAVE_VFP) - { - unsigned long temp; + fpu_control_t fpscr; - /* Get the current exceptions. */ - _FPU_GETCW (temp); + /* Fail if a VFP unit isn't present. */ + if (!ARM_HAVE_VFP) + return 1; - *flagp = temp & excepts & FE_ALL_EXCEPT; + _FPU_GETCW (fpscr); - /* Success. */ - return 0; - } - - /* Unsupported, so fail. */ - return 1; + *flagp = fpscr & excepts & FE_ALL_EXCEPT; + return 0; } |