This is the mail archive of the
mailing list for the GCC project.
Re: [patches] Re: recognize x86 CPU variants and default SSE/MMX/3dNOW support
- From: Brad Lucier <lucier at math dot purdue dot edu>
- To: jh at suse dot cz
- Cc: lucier at math dot purdue dot edu (Brad Lucier), aj at suse dot de, gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Dec 2001 13:57:22 -0500 (EST)
- Subject: Re: [patches] Re: recognize x86 CPU variants and default SSE/MMX/3dNOW support
> > Jan Hubicka <firstname.lastname@example.org> writes:
> > > What is wrong with defaulting to SSE math on these CPUs? It is faster so I
> > > believe it is similar as when we enable conditional moves or other use of given
> > > architecture. We probably can have switch for backward compatibility with
> > > i386 80bit temporaries, but I would still like to see SSE math to default
> > > on SSE, mainly SSE2 enabled chips.
> > > We cannot switch to SSE math since for ia32 since it would violate
> > some assumptions people make about floating point precission (all
> > evolution done in 80-bit) on Linux. This would give different
> > numeric results depending on the switch.
> Yes, but we already do give different results depending on -O switches
> and gcc version, so I still don't think it is much worse.
Just because gcc fp is, in some sense, broken now using x87 instructions on
i386, doesn't mean that it's OK to make it more broken.
I, personally, may prefer to use SSE arithmetic because of the greater
predictability it gives me when using gcc, but I can imagine situations
where I'd be mighty irritated if I carefully wrote some code that
assumed extended double intermediate calculations and gcc changed it
to double precision without telling me.
> Gcc is allowed to truncate the value anytime it wants to.
Gcc *does* truncate the value anytime it wants to. Whether it is
*allowed to* is another matter. I would say no.