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 Any idea? Regards, Won -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090708/324cbd0d/attachment.html>
Dale Johannesen
2009-Jul-08 18:28 UTC
[LLVMdev] ARM cross compiling causes segmentation fault
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 differentMake 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.
I tried a couple of options (-mcpu=arm1136j-s, -mcpu=arm1136jf-s, -march=armv6, ...) to let the compile know the specific ARM processor, but the same issue is still there. I tried to take a look at .s file in /tmp directory, but it's already cleaned up. Is it because I enabled the optimization option when I compiled llvm? Regards, Won On Wed, Jul 8, 2009 at 1:28 PM, Dale Johannesen <dalej at apple.com> wrote:> > 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. > > _______________________________________________ > 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/20090708/25bece08/attachment.html>
S. Bharadwaj Yadavalli
2009-Jul-08 20:10 UTC
[LLVMdev] ARM cross compiling causes segmentation fault
These messages are from the Code Sourcery assembler in toolchain 2007q3 (which I presume you are using). We have been living with these warnings for quite sometime now and have proven to be harmless on v6 and may be ignored [Refer: http://www.mail-archive.com/linux-omap at vger.kernel.org/msg00059.html]. This bug has been fixed in the assembler that is part of 2008q3 toolchain. Hope that helps. Bharadwaj On Wed, Jul 8, 2009 at 2:04 PM, Won J Jeon<wjjeon at gmail.com> 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 > > Any idea? > > Regards, > Won > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >
Apparently Analagous Threads
- [LLVMdev] ARM cross compiling causes segmentation fault
- [LLVMdev] ARM cross compiling causes segmentation fault
- [LLVMdev] ARM cross compiling causes segmentation fault
- [LLVMdev] ARM cross compiling causes segmentation fault
- [LLVMdev] [ARM backend] adding pattern for SMLALBB