]> sourceware.org Git - glibc.git/commit
ARC: fp: (micro)optimize FPU_STATUS read by eliding FWE bit clearing
authorVineet Gupta <vgupta@synopsys.com>
Fri, 9 Jul 2021 21:56:18 +0000 (14:56 -0700)
committerVineet Gupta <vgupta@synopsys.com>
Wed, 21 Jul 2021 20:13:44 +0000 (13:13 -0700)
commit31aefa93f3e9a49b7a493d410acb70108e176d61
tree2f561d4720e94a127809be94dee5c85af16abaec
parent77ede5f010f1b144e067ec035e422a13bb57c55d
ARC: fp: (micro)optimize FPU_STATUS read by eliding FWE bit clearing

Any FPU_STATUS write needs setting the FWE bit (31) whcih just provides
a "control signal" to enable explicit write (vs. the side-effect of FPU
instructions).  However this bit is RAZ and write-only, thus effectively
never stored in FPU_STATUS register. Thus when reading the register
there is no need to clear it. This shaves off a BCLR instruction from
the fe*exceptino family of functions and while no big deal still makes
sense to do.

This came up when debugging a race in math/test-fenv-tls [1]

[1]: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/54

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
sysdeps/arc/fpu_control.h
This page took 0.037835 seconds and 5 git commands to generate.