[LLVMdev] Solaris (sparc) llc bugs
Nathan Keynes
Nathan.Keynes at Sun.COM
Tue Aug 18 23:47:52 PDT 2009
On 19/08/2009, at 3:49 PM, Fedor Sakharov wrote:
>
> Hello.
>
> I have been trying to check, how llvm works on Solaris recently.
> First I have tested lli, whitch seems to execute the bytecode
> generated
> on Linux without any problems. However, llc has failed to generate
> valid
> SPARC assembler code even on the helloworld example. Here is the
> generated code:
>
>
> sakharov at trillian:~$ cat ./test.s
>
>
> .text
> .align 16
> .globl main
> .type main, #function
> main:
> save %o6, -96, %o6
> sethi %hi(.str), %l0
> add %l0, %lo(.str), %o0
> call puts
> nop
> sethi 0, %i0
> restore %g0, %g0, %g0
> retl
> nop
>
>
> .section .rodata.str1.1,"aMS", at progbits,1
> .align 2
> .type .str,#object
> .size .str,15
> .str:
> .asciz "this is a test"
>
>
> sakharov at trillian:~$ /opt/SUNWspro/bin/cc test.s -o test
> /opt/SUNWspro/prod/bin/fbe: "test.s", line 19: error: invalid
> character (0x40)
> /opt/SUNWspro/prod/bin/fbe: "test.s", line 19: error: quoted-string
> operand required
> /opt/SUNWspro/prod/bin/fbe: "test.s", line 19: error: statement syntax
> cc: assembler failed for test.s
Hi Fedor,
The assembly above is valid (and working) SPARC syntax for GNU
gas, but not for Sun as.
Cheers,
Nathan
More information about the llvm-dev
mailing list