[LLVMdev] ARM cross compiling causes segmentation fault

Dale Johannesen dalej at apple.com
Wed Jul 8 11:28:31 PDT 2009


On Jul 8, 2009, at 11:04 AMPDT, Won J Jeon wrote:

> Hello,
>
> I built a llvm toolchain for ARM and I'm trying to build a simple  
> application on ARM using LLVM. When I compiled the code, it has the  
> following message and the binary code has a segmentation fault when  
> it is executed.
>
> /tmp/ccJPjMe4.s: Assembler messages:
> /tmp/ccJPjMe4.s:4250: rdhi, rdlo and rm must all be different
> /tmp/ccJPjMe4.s:4589: rdhi, rdlo and rm must all be different
> /tmp/ccJPjMe4.s:4694: rdhi, rdlo and rm must all be different
> /tmp/ccJPjMe4.s:4899: rdhi, rdlo and rm must all be different
> /tmp/ccJPjMe4.s:4915: rdhi, rdlo and rm must all be different

Make sure you've told the compiler the correct version of ARM;  
different generations of the architecture have different restrictions  
of this sort.
Look at the .s file to see what instruction it's complaining about.   
(MUL had such a restriction in early versions of ARM, but I'd expect  
the message to read differently if that's it.)
If you've told the compiler the right version of ARM and you think the  
compiler is wrong, file a bug with reproducible example.




More information about the llvm-dev mailing list