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 12/28] math: Use wordsize-64 version for isnan


Hi Gabriel,

> I don't actually understand what the impact on 32-bits platforms would
> be, so I can't comment on that, but, if this patch turns out to be
> problematic for 32-bits, we could patch sysdeps/ieee754/ldbl-opt files
> to be mindful of __WORDSIZE and selectively include files from
> sysdeps/ieee754/dbl-64 or sysdeps/ieee754/dbl-64/wordsize-64 (see
> attached patch for an explanation of what I mean).

I don't believe using simple masking, compares and fixed shifts can
result in a noticeable difference on 32-bit targets. It could make a
difference if it involves full 64-bit multiply, division or non-constant shift.

However rather than making the already complex scheme even more
complex, I would suggest to have if (WORDSIZE == 4) special paths
if there are cases where it helps. That way we can merge all wordsize-64
code into the generic variant and remove the wordsize-64 directories
completely.

Having only one variant of each function actually makes it reasonable to
optimise it.

Wilco


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