diff mbox

[6/13] AArch64: Cleanup fenv implementation

Message ID 001001cfeee7$a8536f10$f8fa4d30$@com
State New
Headers show

Commit Message

Wilco Oct. 23, 2014, 5:34 p.m. UTC
Cleanup feenableexcept to use the same logic as the ARM version. No functional changes.

ChangeLog:
2014-10-23  Wilco Dijkstra  <wdijkstr@arm.com>

	* sysdeps/aarch64/fpu/feenablxcpt.c (feenableexcept):
	Simplify logic.

---
 sysdeps/aarch64/fpu/feenablxcpt.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Marcus Shawcroft Oct. 24, 2014, 9:03 a.m. UTC | #1
On 23 October 2014 18:34, Wilco Dijkstra <wdijkstr@arm.com> wrote:
> Cleanup feenableexcept to use the same logic as the ARM version. No functional changes.
>
> ChangeLog:
> 2014-10-23  Wilco Dijkstra  <wdijkstr@arm.com>
>
>         * sysdeps/aarch64/fpu/feenablxcpt.c (feenableexcept):
>         Simplify logic.

OK /Marcus
diff mbox

Patch

diff --git a/sysdeps/aarch64/fpu/feenablxcpt.c b/sysdeps/aarch64/fpu/feenablxcpt.c
index 70e413c..763248f 100644
--- a/sysdeps/aarch64/fpu/feenablxcpt.c
+++ b/sysdeps/aarch64/fpu/feenablxcpt.c
@@ -24,14 +24,9 @@  feenableexcept (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)
@@ -50,5 +45,5 @@  feenableexcept (int excepts)
 	return -1;
     }
 
-  return original_excepts;
+  return (fpcr >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
 }