[5/13] AArch64: Cleanup fenv implementation
Commit Message
Cleanup fedisableexcept to use the same logic as the ARM version. No functional changes.
ChangeLog:
2014-10-23 Wilco Dijkstra <wdijkstr@arm.com>
* sysdeps/aarch64/fpu/fedisblxcpt.c (fedisableexcept):
Simplify logic.
---
sysdeps/aarch64/fpu/fedisblxcpt.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
Comments
On 23 October 2014 18:34, Wilco Dijkstra <wdijkstr@arm.com> wrote:
> Cleanup fedisableexcept to use the same logic as the ARM version. No functional changes.
>
> ChangeLog:
> 2014-10-23 Wilco Dijkstra <wdijkstr@arm.com>
>
> * sysdeps/aarch64/fpu/fedisblxcpt.c (fedisableexcept):
> Simplify logic.
OK /Marcus
@@ -24,18 +24,13 @@ fedisableexcept (int excepts)
{
fpu_control_t fpcr;
fpu_control_t fpcr_new;
- int original_excepts;
_FPU_GETCW (fpcr);
-
- original_excepts = (fpcr >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
-
excepts &= FE_ALL_EXCEPT;
-
fpcr_new = fpcr & ~(excepts << FE_EXCEPT_SHIFT);
if (fpcr != fpcr_new)
_FPU_SETCW (fpcr_new);
- return original_excepts;
+ return (fpcr >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
}