Problem with -mcpu option for GAS on Linux/Alpha

Sergey Tikhonov tsv@solvo.ru
Mon Jan 9 19:39:00 GMT 2006


Nick Clifton wrote:

> Hi Sergey,
>
>
>> Am I right that ".arch" directive in a .s file has higher priority 
>> than "-mcpu" command option.
>
>
> Yes.
>
>> The source file has inline assembler that adds some "ev56" 
>> instructions Unfortunatelly, gcc 4.1 (gcc version 4.1.0 20051214 (Red 
>> Hat 4.1.0-0.8)) adds ".arch ev5" into output assembler
>> file and command line option is overwriten by in-file ".arch" directive.
>> What should be correct behavior?
>
>
> Add your own ".arch ev6" directive to the inline assembler just before 
> the ev56 instructions are used.  (Ideally you would want to save the 
> current architecture, switch to ev6, assemble the required 
> instructions and then switch back.  But currently the Alpha port of 
> GAS does not support anything like a .push_arch/.pop_arch pair of 
> pseudos).
>
> Better yet, move the inline assembler out into its own source file and 
> assemble it independently of the rest of the program.  That way you 
> should be able to ensure that the correct architecture is set from the 
> command line and that you will not be attempting to assemble gcc 
> generated code with the wrong architecture set.

Thank you for answer. Unfortunatelly, the source code I was talking 
about is Linux kernel. It was compiled without problem by
gcc 4.0.1 compiler, because for some reasons it din't add ".arch" 
directives and command line option had effect.
I wish alpha gas had those pseudos you were talking about (for now I 
would modify my gas to have command line option to have higher
priority).

Thank you,
Sergey.

tsv@solvo.ru




More information about the Binutils mailing list