[PATCH][BZ #14412] Define __sincos_finite as a fast version of sincos

Ondřej Bílka neleai@seznam.cz
Tue Apr 30 15:59:00 GMT 2013


On Mon, Apr 29, 2013 at 03:57:40PM +0530, Siddhesh Poyarekar wrote:
> Hi,
> 
> The assembly implementation of sincos on x86_64 was removed in favour
> of the default implementation since the former was inaccurate for some
> inputs.  This led to BZ #14412 being reported for a performance
> regression in sincos.
> 
> This patch brings back the assembly implementation of sincos (with
> some changes) to give a fast alternative to the default sincos
> implementation.  This is defined as __sincos_finite and is used if the
> implementing program is compiled with the -ffinite-math-only gcc flag.
> 
Could you add test that input is less than 1000 and 1/1000 away from
multiple of pi? If so call precise version.
Assembly should be precise on these inputs so you do not have to add
-ffast math hack.

> I have tested that this works correctly for x86_64 and i686, where the
> former uses the assembly implementation of __sincos_finite and the
> latter uses the weak alias to sincos.  I have also verified that there
> are no regressions in the testsuite on x86_64.
> 
> The patch also has changes to m68k and ia64 (in addition to the
> abilist update) since they have custom implementations of sincos.  I
> have not tested those, so I would request the maintainers to let me
> know if the changes break anything on their architectures.
> 
> Siddhesh
> 



More information about the Libc-alpha mailing list