Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 24 Jul 2020 12:49:42 -0500
From: <>
To: "'Szabolcs Nagy'" <>
Cc: "'Rich Felker'" <>,
Subject: RE: Hexagon DSP support

> -----Original Message-----
> From: Szabolcs Nagy <>
> Sent: Thursday, July 23, 2020 4:56 PM
> To:
> Cc: 'Rich Felker' <>;
> Subject: Re: [musl] Hexagon DSP support
> * <> [2020-07-20
> 16:26:58 -0500]:
> > I removed fma/fmal/fmax/fmin/fabs from compiler-rt-builtins,
> >
> > The comparison with musl can be found here:
> > but I've also attached
> > the patch.
> >
> > An assert in clang when building both musl and libc-test for hexagon
> > was fixed by, prior to this change
> > -frounding-math had to be used.
> >
> > The test-results are also attached.  Everything is built with the
> > tip-of-tree llvm so sometimes results vary but these are the results I
> > got from this morning's clone.  The only notable difference in the
> > results would be that both fma and fmal fail and this is because of
> > the compiler-rt change.  I didn't add fma to musl because it require
> > more complex assembly, along the lines you saw in an earlier version
> sqrt.
> the fma and sqrt failures are still not fully explained, e.g. this looks
> src/math/special/fma.h:42: RN fma(0x1p+0,0x1p+0,-0x1p-1074) want 0x1p+0
> got -0x1.fffffp-43 ulperr -4503599627370496.000 = -0x1p+52 + 0x0p+0
> the only target specific bit in fma is a_clz_64 so i would check that.
> e.g. a_clz_64(1ULL << 42) should give 21 (this computation happens during
> the fma test case above).

Hexagon didn't have a_clz_64 implemented however I added this morning it and
noticed no differences.  I will update the patch with that routine included.

I did notice a compiler regression in how it compiled fma and have asked a
compiler person to take a look.  An older version of our internally
maintained compiler does produce the expected results for the values I used
but later versions do not.  Unfortunately changing optimization levels will
produce different results as well.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.