mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-11 03:40:06 +00:00
Cleanup fedisableexcept to use the same logic as the ARM version. No functional changes.
This commit is contained in:
parent
ea9a7c8b06
commit
3a84f1a651
@ -1,3 +1,8 @@
|
|||||||
|
2014-10-24 Wilco Dijkstra <wdijkstr@arm.com>
|
||||||
|
|
||||||
|
* sysdeps/aarch64/fpu/fedisblxcpt.c (fedisableexcept):
|
||||||
|
Simplify logic.
|
||||||
|
|
||||||
2014-10-24 Joseph Myers <joseph@codesourcery.com>
|
2014-10-24 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
[BZ #14138]
|
[BZ #14138]
|
||||||
|
@ -24,18 +24,13 @@ fedisableexcept (int excepts)
|
|||||||
{
|
{
|
||||||
fpu_control_t fpcr;
|
fpu_control_t fpcr;
|
||||||
fpu_control_t fpcr_new;
|
fpu_control_t fpcr_new;
|
||||||
int original_excepts;
|
|
||||||
|
|
||||||
_FPU_GETCW (fpcr);
|
_FPU_GETCW (fpcr);
|
||||||
|
|
||||||
original_excepts = (fpcr >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
|
|
||||||
|
|
||||||
excepts &= FE_ALL_EXCEPT;
|
excepts &= FE_ALL_EXCEPT;
|
||||||
|
|
||||||
fpcr_new = fpcr & ~(excepts << FE_EXCEPT_SHIFT);
|
fpcr_new = fpcr & ~(excepts << FE_EXCEPT_SHIFT);
|
||||||
|
|
||||||
if (fpcr != fpcr_new)
|
if (fpcr != fpcr_new)
|
||||||
_FPU_SETCW (fpcr_new);
|
_FPU_SETCW (fpcr_new);
|
||||||
|
|
||||||
return original_excepts;
|
return (fpcr >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user