On Sun, Feb 21, 2010 at 09:27:13AM -0800, H.J. Lu wrote:
> On Sun, Feb 21, 2010 at 9:15 AM, Geert Bosch <bo...@adacore.com> wrote:
> 
> >> As I understand it, whether -mfpmath=387 (with excess precision) or
> >> -mfpmath=sse is the default is also considered part of the platform API
> >> (like whether char is signed or unsigned by default, for example), in
> >> addition to the ABI issues that can slow things down when SSE is used.
> >
> > No, this is not a new ABI. The ABI stays exactly the same. The I of
> > ABI stands for Interface. That is, the ABI has nothing to say about
> > how a function will compute any results. That is the area of language
> > standards. The only way we'd violate the ABI is the reliance on SSE2
> > instructions being available and SSE2 registers being saved by the OS.
> >
> > However, since any other compiler uses SSE2 instructions by default,
> > I don't see why GCC should be any different. If anything, since the
> > GCC target audience is more focused on Free and open source software,
> > we could be more aggressive in taking advantage of newer hardware.

One of the great advantages of much free/open software is the way it
will work just fine even on older hardware.

> > What about an autoconf test for availability of 486 atomic instructions,
> > and SSE2 instructions in order, and choosing the default target based
> > on the host? Not too crazy, is it?

Actually that is too crazy.  Assuming that the binaries produced by any
given compiler installation will only be used on the machine the
compiler runs on is not a safe assumption.


> >
> 
> I agreed that gcc for x86 should choose a sensible default for 95% of
> current x86 processors in use. People with those old processors can
> use older gcc or -march=.
> 
> Default to SSE2 is a good first step.

I think you vastly underestimate the number of older x86 processors in
use.


-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1...@student.uu.se

Reply via email to