[PATCH] Add a new macro to mask a float
Joseph Myers
joseph@codesourcery.com
Tue Jun 28 20:52:00 GMT 2016
On Tue, 28 Jun 2016, Tulio Magno Quites Machado Filho wrote:
> Defining a new macro allows architectures to provide more efficient
> implementations than using a GET_FLOAT_WORD/SET_FLOAT_WORD pair.
> As an example, POWER8 is able to mask the float directly in the VSX
> without copying the data to a GPR and copying it back.
>
> This patch introduces the new macro MASK_FLOAT. The generic
> implementation remains unchanged.
I think this would better be implemented as a compiler optimization that
recognizes the pattern of masking a float value.
Note that language runtimes sometimes include code derived from fdlibm (to
ensure system-independent results rather than results depending on system
libm), so the optimization wouldn't be purely for building glibc.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list