[LLVMdev] arm code generation

Evan Cheng evan.cheng at apple.com
Thu Mar 20 12:58:50 PDT 2008


On Mar 19, 2008, at 8:08 PM, Amichi Amar wrote:

> Hello,
>
> I'm trying to do the following and encountering problems with the  
> generated arm assembly code:
>
> I've got an application in two parts that i've compiled into llvm  
> bitcode using:
> llvm-gcc -emit-llvm -c part1.c -o part1.bc
> llvm-gcc -emit-llvm -c part2.c -o part2.bc
>
> Then I link them together:
> llvm-ld part1.bc part2.bc -o combined.bc
>
> Now I use the ARM backend via llc to generate the assembly for my  
> target processor from combined.bc:
> llc -march=arm -mcpu=arm7tdmi combined.bc
>
> The problem is when I run the generated file (combined.s) through an  
> arm cross compiler for my target (arm-elf gcc toolchain) I get the  
> following errors below. Has anybody encountered this before? Is  
> there a way to do this?
>
>
> combined.s: Assembler messages:
> combined.s:216: rd and rm should be different in mul
> ... repeated a few times
> combined.s:969: rd and rm should be different in mla
> ... repeated a few times

Your assembler is probably outdated. This restriction is not present  
in newish ARM incarnations.

Evan

> combined.s:1330: Error: unknown pseudo-op: `.cstring'
> combined.s:1335: Error: junk at end of line, first unrecognized  
> character is `,'
> .. repeated many times
> combined.s:1366: Error: character following name is not '#'
> combined.s:1370: Error: unknown pseudo-op: `.indirect_symbol'
> combined.s:1375: Error: unknown pseudo-op: `.lazy_symbol_pointer'
> combined.s:1377: Error: unknown pseudo-op: `.indirect_symbol'
> .. repeated a few times
> combined.s:1393: Error: unknown pseudo-op: `.subsections_via_symbols'
>
>
> Thank you,
>
> -aa
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080320/3e29b839/attachment.html>


More information about the llvm-dev mailing list