This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [patches] Re: recognize x86 CPU variants and default SSE/MMX/3dNOW support


Re:

> > Jan Hubicka <jh@suse.cz> 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.

Brad


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