[powerpc] fegetenv_status: simplify instruction generation
commit0b3c9e57a41d9f7c26fb6aa45b99f671bef9c7e0
authorPaul A. Clarke <pc@us.ibm.com>
Tue, 20 Aug 2019 20:57:35 +0000 (20 15:57 -0500)
committerPaul A. Clarke <pc@us.ibm.com>
Wed, 28 Aug 2019 18:53:09 +0000 (28 13:53 -0500)
tree17e86cc4b838006df6a22738a4d48f6e8f2e51e8
parentfec2bd2c2d31bc731cf61623e150d047746954bd
[powerpc] fegetenv_status: simplify instruction generation

fegetenv_status() wants to use the lighter weight instruction 'mffsl'
for reading the Floating-Point Status and Control Register (FPSCR).
It currently will use it directly if compiled '-mcpu=power9', and will
perform a runtime check (cpu_supports("arch_3_00")) otherwise.

Nicely, it turns out that the 'mffsl' instruction will decode to
'mffs' on architectures older than "arch_3_00" because the additional
bits set for 'mffsl' are "don't care" for 'mffs'.  'mffs' is a superset
of 'mffsl'.

So, just generate 'mffsl'.
ChangeLog
sysdeps/powerpc/fpu/fenv_libc.h