------- Comment #4 from ro at CeBiTec dot Uni-Bielefeld dot DE  2010-05-12 
11:50 -------
Subject: Re:  Solaris 2.9 x86 Sun assembler doesn't like rep/lock prefixes on
same line

> ------- Comment #3 from jay dot krell at cornell dot edu  2010-05-12 10:50 
> -------
>  > Using something like TARGET_SOLARIS is wrong: this is just a bug in older
> Sun
>
> I don't completely agree.
>  - I regularly do cross builds.
>    What will you do for that? Assume the old version? I think so. Since the
> result works the same on all versions. So you might as well just do that for
> cross and native imho.

No, I just test if rep <insn> works or if rep; <insn> is required
instead and use the result of that test.  It works in both native and
cross environments.

>  - I want to build a gcc on 2.10 that works on 2.9..er..well, that's not quite
> right. For that I'll build it on 2.9. But the cross build scenario is 
> relevant.

That's not going to work in the general case: the Solaris 10 gcc may
well use features that just don't exist in the Solaris 9 assembler
and/or linker, so you're out of luck.

>  - Look at what Darwin/Macho does -- that is also only for older versions, but
> they just do it unconditionally. (Might be good to check for TARGET_64BIT
> though, since that probably implies a new enough assembler?)

This hardcoding is wrong in the general case, even if the Mach-O guys
did otherwise.  Why follow a bad example?  And why use implicit tests if
you can explicitly test for the feature (or bug) you're looking for?

        Rainer


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44074

Reply via email to