This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add a new macro to mask a float


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]