diff options
Diffstat (limited to 'sysdeps/arm/fegetenv.c')
-rw-r--r-- | sysdeps/arm/fegetenv.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/sysdeps/arm/fegetenv.c b/sysdeps/arm/fegetenv.c index a45c1af3cf..f390c0fdf7 100644 --- a/sysdeps/arm/fegetenv.c +++ b/sysdeps/arm/fegetenv.c @@ -24,17 +24,14 @@ int fegetenv (fenv_t *envp) { - if (ARM_HAVE_VFP) - { - unsigned long int temp; - _FPU_GETCW (temp); - envp->__cw = temp; - - /* Success. */ - return 0; - } - - /* Unsupported, so fail. */ - return 1; + fpu_control_t fpscr; + + /* Fail if a VFP unit isn't present. */ + if (!ARM_HAVE_VFP) + return 1; + + _FPU_GETCW (fpscr); + envp->__cw = fpscr; + return 0; } libm_hidden_def (fegetenv) |