This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: SSE and x86 FP ABI (again)



----- Original Message -----
From: "Drew Hess" <dhess@ilm.com>
To: <gcc@gcc.gnu.org>
Sent: Friday, March 02, 2001 12:55 AM
Subject: SSE and x86 FP ABI (again)


>
> Has there been any resolution on the issue of whether -msse and -msse2
> break the x86 FP ABI?  I didn't think there was a consensus after the
last
> thread on this topic.

I thought that linux people had long since accepted the idea of
supporting alignments; 16-byte alignment support has been needed since
the Pentium Pro, and 32-byte alignments are needed for performance on
the current generation architectures.  The compilers I've used didn't
pass arguments in SSE registers, so there is no problem inter-mixing SSE
and non-SSE objects.  Are you talking about changing that?  I doubt that
people running gcc/g77 on Windows, as I do, will be standing in the way
of SSE, although the alignment problems in gcc-2.95 g++ seem severe.
>
> Some of us don't require the extra precision of x87 extended double,
and
> would prefer the speedup (on Pentium 4, at least)  and predictable
> behavior of the SSE modes.  But we still need IEEE-compliant FP, so
> throwing them into the -ffast-math option along with the other
> non-compliant optimizations seems severe.
Now that the major bugs in -ffast-math seem to be out, I'm much happier
with it.  AFAIK the major implication is the unpredictable behavior of
comparisons involving NaN.  That hasn't been such a problem for me as it
was on notorious NaN-generating architectures like R8000.
>
> I suspect that those who run math-intensive codes on multiple
platforms
> would agree, since x86 with -msse and -msse2 behaves a lot more like
other
> architectures than x87 FP does.  Yes, we can use -ffloat-store, but it
> sometimes comes with considerable performance loss.
The major Windows compilers are happy with setting 53-bit precision
mode; then, the behavior must resemble some rs6k implementations; and
the performance of sqrt() and divide increases.  I myself prefer to see
it left to default, only to change when the programmer requests it.
> The SSE modes give us
> the best of both worlds.
>
It's got a long way to go; the loss of out-of-order with SSE can kill
the performance when it is applied with conditional branching.

> I'm not arguing that SSE should be the default FP mode on x86,

No, I don't expect you to be that rabid a supporter of my employer.

> I'm just
> hoping to maintain the status quo.

In which way?  Do you mean to support high performance without
necessarily using -ffast-math, or continuing not to support more than
4-byte alignments in Windows?
>
> Thanks to Jan and the others for their work.
>
YES!
>
> -dwh-
>
>
>


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