diff options
Diffstat (limited to 'sysdeps/arm/setfpucw.c')
-rw-r--r-- | sysdeps/arm/setfpucw.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sysdeps/arm/setfpucw.c b/sysdeps/arm/setfpucw.c index 92333eb364..7416377f9e 100644 --- a/sysdeps/arm/setfpucw.c +++ b/sysdeps/arm/setfpucw.c @@ -24,20 +24,19 @@ void __setfpucw (fpu_control_t set) { - if (ARM_HAVE_VFP) - { - fpu_control_t cw; + fpu_control_t fpscr; - /* Fetch the current control word. */ - _FPU_GETCW (cw); + /* Do nothing if a VFP unit isn't present. */ + if (!ARM_HAVE_VFP) + return; - /* Preserve the reserved bits, and set the rest as the user - specified (or the default, if the user gave zero). */ - cw &= _FPU_RESERVED; - cw |= set & ~_FPU_RESERVED; + /* Fetch the current control word. */ + _FPU_GETCW (fpscr); - _FPU_SETCW (cw); - } + /* Preserve the reserved bits, and set the rest as the user + specified (or the default, if the user gave zero). */ + fpscr &= _FPU_RESERVED; + fpscr |= set & ~_FPU_RESERVED; - /* Do nothing if a VFP unit isn't present. */ + _FPU_SETCW (fpscr); } |