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] tile: create new math-tests.h header


On 11/17/2016 6:28 PM, Joseph Myers wrote:
On Thu, 17 Nov 2016, Chris Metcalf wrote:

All the tile sfp-machine.h files in libgcc seem to define _FP_KEEPNANFRACP
to 1, so not preserving NaN payloads seems odd here.
So perhaps it's some kind of testing bug, or I'm otherwise
confused.  The following small program seems to suggest
Indeed, you'll need to investigate why the test fails in more detail.
(The rest of your math-tests.h generically makes sense for any system
without exceptions / rounding modes support.)

I drilled into libm-test enough to create a single reproducer, which
then inspired me to go back to look at the little test program I
emailed yesterday, which turned out to have had a typo.  Oh well.

In any case, the hardware on tilegx appears not to preserve the
payload when you add nans of any kind, so we see this manifest in the
code for canonicalize(__builtin_nans) only because that's the only
case where we actually ask the hardware to do some math for us.

We clearly should also tell libgcc not to bother preserving nan
payloads given that the hardware doesn't do it in any case; I'll pass
that along to the compiler team, but I'll also commit my original
patch since it seems to match the hardware behavior.

Thanks!

--
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com


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