[LLVMdev] Sparc assembly syntax

Chris Lattner clattner at apple.com
Thu Jul 31 10:18:18 PDT 2008


On Jul 31, 2008, at 9:57 AM, Dale Johannesen wrote:

>
> On Jul 31, 2008, at 4:52 AMPDT, Richard Pennington wrote:
>
>> Any code that I generate for the Sparc fails at assembly time using a
>> gas assembler built for the Sparc.
>>
>> I get code like the following from the code generator:
>>
>>        save -96, %o6, %o6
>>
>> and get a syntax error on the save instruction.
>>
>> I think sparc syntax should be:
>>
>> main:
>>        save %o6, -96, %o6
>>
>> Is that correct? Should I file a bug report?
>
>         save %o6, -96, %o6
>
> is the usual syntax for Sparc assemblers.  But this instruction is so
> fundamental nothing could ever have worked if it's broken, so there
> may be something deeper going on.

This is probably a difference between the sun and GNU assemblers.   
There is no current sparc maintainer, so feel free to change it if one  
way works better for you.

-Chris



More information about the llvm-dev mailing list