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 I think I could fix llc -march=sparc , just tell me where to start and what are other known bugs for 2.5 release. -- Best regards, Fedor Sakharov -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090819/f430f7a5/attachment.html>
On Aug 18, 2009, at 10: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:Can you attach the .s file generated by the sun compiler? -Chris> > > 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 > > > I think I could fix llc -march=sparc , just tell me where to start > and what are other known > bugs for 2.5 release. > > -- > Best regards, > Fedor Sakharov > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
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.sHi Fedor, The assembly above is valid (and working) SPARC syntax for GNU gas, but not for Sun as. Cheers, Nathan