<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Run llvm-gcc with "-save-temps" and it will keep the .s file for you to look at.<div><br><div><div>On Jul 8, 2009, at 12:52 PM, Won J Jeon wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>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?</div>

<div> </div>
<div>Regards,</div>
<div>Won<br><br></div>
<div class="gmail_quote">On Wed, Jul 8, 2009 at 1:28 PM, Dale Johannesen <span dir="ltr"><<a href="mailto:dalej@apple.com">dalej@apple.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>
<div></div>
<div class="h5"><br>On Jul 8, 2009, at 11:04 AMPDT, Won J Jeon wrote:<br><br>> Hello,<br>><br>> I built a llvm toolchain for ARM and I'm trying to build a simple<br>> application on ARM using LLVM. When I compiled the code, it has the<br>
> following message and the binary code has a segmentation fault when<br>> it is executed.<br>><br>> /tmp/ccJPjMe4.s: Assembler messages:<br>> /tmp/ccJPjMe4.s:4250: rdhi, rdlo and rm must all be different<br>
> /tmp/ccJPjMe4.s:4589: rdhi, rdlo and rm must all be different<br>> /tmp/ccJPjMe4.s:4694: rdhi, rdlo and rm must all be different<br>> /tmp/ccJPjMe4.s:4899: rdhi, rdlo and rm must all be different<br>> /tmp/ccJPjMe4.s:4915: rdhi, rdlo and rm must all be different<br>
<br></div></div>Make sure you've told the compiler the correct version of ARM;<br>different generations of the architecture have different restrictions<br>of this sort.<br>Look at the .s file to see what instruction it's complaining about.<br>
(MUL had such a restriction in early versions of ARM, but I'd expect<br>the message to read differently if that's it.)<br>If you've told the compiler the right version of ARM and you think the<br>compiler is wrong, file a bug with reproducible example.<br>
<br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></div></body></html>