This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
sysdeps/i386/fpu/bits/mathinline.h
- From: Roland McGrath <roland at hack dot frob dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 9 Apr 2012 12:27:57 -0700 (PDT)
- Subject: sysdeps/i386/fpu/bits/mathinline.h
I just became aware of AMD erratum 573
(http://support.amd.com/us/Processor_TechDocs/41322_10h_Rev_Gd.pdf).
It says that using "fsincos" may be unsafe, and there is little more
information. Previous (unrelated) fixes have already removed nearly
all instances of this instruction from the libc/libm source code.
The one remaining is in sysdeps/i386/fpu/bits/mathinline.h, and that
only for the -ffast-math version of __sincos{,f,l}.
This caused me to notice a few incidental things.
1. __sincos_code was missing a clobber for %eax.
I fixed that with commit 8de131c.
2. sysdeps/i386/fpu/bits/mathinline.h has a ton of stuff that does not
appear in sysdeps/x86_64/fpu/bits/mathinline.h under -m32.
Perhaps some of the i386 code is obsolete or undesireable or
something. But shouldn't this be fully harmonized? This is the
first time I've noticed something where an application built with
x86_64 headers installed and -m32 could come out drastically
different from the same application built with i686 headers
installed.
What should be done about that?
Thanks,
Roland