This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: powerpc gcc option -many passed to assembler


Am 10.04.2011 um 03:40 schrieb Khem Raj:

> On 3/31/2011 6:13 AM, Titus von Boxberg wrote:
>> Hi,
>> 
>> just in case someone is interested:
>> Calling as with option -many is hardcoded in gcc.
>> 
>> A colleague found those links which might be helpful
>> for seeing the "reasoning" behind:
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21091
>> http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01244.html
>> http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01247.html
>> http://sources.redhat.com/ml/binutils/2004-05/msg00376.html
>> http://sources.redhat.com/ml/binutils/2004-05/msg00357.html
>> 
>> The problem I had was that the compiler/assemler accepts
>> e.g. dcbzl for an e500v2 which leads to a SIGILL.
>> 
>> The solution for me is up to now
>> - to patch away -many in gcc
>> - to allow sync / eieio (in addition to equivalent msync/mbar) in as
>>   for e500 because otherwise you cannot compile almost nothing
>>   of the tool chain.
>> 
>> Aditionally, in binutils 2.20 there is the mistake that
>> an e500 was believed to be an e500mc (but this has apparently
>> been corrected in 2.21).
>> 
>> Regards
>> Titus
>> 
>> Am Di, 22.03.2011, 14:49 schrieb Titus von Boxberg:
>>> Hi,
>>> 
>>> I'm using ct-ng generated tool chains (gcc 4.5.1, binutils 2.20)
>>> for PowerPCs, a 603e and a e500v2.
>>> 
>>> Both compilers pass -many to the assembler which disables
>>> checking the assembly code for cpu specific instructions
>>> (or better, for instructions the cpu does NOT provide).
>>> 
>>> Does someone know what the reasoning is and if there's
>>> some knob to turn it off?
>> 
> 
> Whats your target ? try to use powerpc-linux-gnuspe see if that helps
> otherwise you can also add --with-arch option to gcc configure otherwise
> what happens if you use -mcpu=<cpu> option ?

powerpc-unknown-linux-gnuspe is selected as the target, spe is enabled.

-mcpu=xx does what it is expected to do (e.g. for this target
passes -me500 to as).

Problem is that in addition to the correct -mflag also 
-many is unconditionally passed to the assembler regardless of -mcpu=xx
This seems to be hardwired (in gcc 4.5.1) in gcc/config/rs6000/rs6000.h:163

I did not try --with-arch but from what I could see in the code
that should not give much difference. I used --with-cpu= instead.

Regards
Titus


--
For unsubscribe information see http://sourceware.org/lists.html#faq


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