This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sysdeps/i386/fpu/bits/mathinline.h


On 04/09/2012 09:27 PM, Roland McGrath wrote:
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.
>

Oops, our testsuite does not cover fast-math AFAIK ;-(


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?

This should indeed be fully harmonized.


Andreas
--
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]