This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/14412] Removal of sysdeps/x86_64/fpu/s_sincos.S causes regressions
- From: "markus at trippelsdorf dot de" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 29 Apr 2013 13:15:02 +0000
- Subject: [Bug math/14412] Removal of sysdeps/x86_64/fpu/s_sincos.S causes regressions
- Auto-submitted: auto-generated
- References: <bug-14412-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=14412
--- Comment #30 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2013-04-29 13:15:02 UTC ---
(In reply to comment #25)
> I've posted a patch to implement __sincos_finite:
>
> http://sourceware.org/ml/libc-alpha/2013-04/msg00720.html
>
> This should allow you to compile with -ffast-math or -ffinite-math-only to use
> this fast implementation of sincos.
Your patch doesn't work for me. I've re-build glibc and then
re-compiled poppler with "-ffinite-math-only". But I still
only see calls to __sin and __cos with "perf top".
The poppler code in question can be found here:
http://cgit.freedesktop.org/poppler/poppler/tree/poppler/Gfx.cc#n3112
When I just add the following file to glibc:
markus@x4 glibc % cat sysdeps/x86_64/fpu/s_sincos.S
#include <machine/asm.h>
.text
ENTRY (__sincos)
movsd %xmm0, -8(%rsp)
fldl -8(%rsp)
fsincos
fnstsw %ax
testl $0x400,%eax
jnz 1f
fstpl (%rsi)
fstpl (%rdi)
retq
1: fldpi
fadd %st(0)
fxch %st(1)
2: fprem1
fnstsw %ax
testl $0x400,%eax
jnz 2b
fstp %st(1)
fsincos
fstpl (%rsi)
fstpl (%rdi)
retq
END (__sincos)
weak_alias (__sincos,sincos)
poppler gets fast again and uses __sincos.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.