This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Make ieee754 fma tolerate architectures without exceptionsupport.
On Mon, 5 Nov 2012, Chris Metcalf wrote:
> On 11/5/2012 5:09 PM, Joseph S. Myers wrote:
> > On Mon, 5 Nov 2012, Chris Metcalf wrote:
> >> Meanwhile, does my proposed change seem plausible? It unbreaks the libm
> >> build for tile, and the tests continue to report 0 or 1 ULP for all the fma
> >> tests, much better than the generic fma.
> > I'd have thought that putting something in your math_private.h to allow
> > this file to build, when it's used outside the circumstances for which it
> > was designed, would be better.
>
> How does the appended diff look?
It seems plausible for this purpose.
> Is it worth trying to use the libc_fesetround() prefix naming for things
> like feraiseexcept() and feclearexcept() as well? (This would also imply
> fixing up the test code, since tile needs to fix those API symbol names for
> the test code currently as well.)
The libc_* variants are optimized variants - specifically, variants based
on a function only using a single floating-point type, so that on x86_64
they can work (in float and double functions) only with SSE state and
don't need to deal with 387 state as well (and vice versa when running on
32-bit x86). I suppose that such optimizations would be possible for the
way fma uses feclearexcept, if someone wishes to implement them - and
optimizations with the existing macros would probably be possible for
more functions than currently use them.
--
Joseph S. Myers
joseph@codesourcery.com