This is the mail archive of the 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: i386.h fix for 4.0 branch (pr16888 fallout)

> Hi,
> On Mon, 9 May 2005, Richard Henderson wrote:
> > On Mon, May 09, 2005 at 11:09:26PM +0200, Michael Matz wrote:
> > > 2005-04-28  James E Wilson  <>
> > > 
> > > 	* config/i386/i386.h (HI_REGISTER_NAMES): Fix typos in comment.
> > > 	(ADDITIONAL_REGISTER_NAMES): Delete obsolete mmx register entries.
> > 
> > Ok to backport anywhere you like.
> In 4.0 now.  In retrospect I actually think that Alexandres change might 
> not have been such a good idea after all.  The problem is, that now you 
> can't compile anymore programs which do the checking for MMX capability at 
> runtime, i.e. something like:
>    if (cpu_supports_mmx()) {
>      asm do_stuff_with_mmx;
>    } else {
>      do_stuff_in_plain_c();
>    }
> like is done in some media code.  With Alexandres changes you have to 
> specify -mmmx (or another option of that effect) now to even compile the 
> above.  The problem being that this activates TARGET_MMX (or _SSE{,2} for 
> that matter), and hence activates that instruction set also generally, 
> i.e. potentially on code paths not guarded by the above if written by the 
> programmer.  Hence you are now unable to compile such code which still 
> runs (slower) on non-mmx/sse capable processors.

On the powerpc side with respect with altivec, it has always recomened that you
put the altivec code in a seperate file and only enable altivec for that file.
I don't know if this was recomened here also but it seems like a good idea.

Andrew Pinski

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