[LLVMdev] ARM cross compiling causes segmentation fault

Won J Jeon wjjeon at gmail.com
Wed Jul 8 13:15:13 PDT 2009


Thanks. I could take a look at the lines and all of them have smull
instruction like 'smull r0, r1, r0, r1'.

Won

On Wed, Jul 8, 2009 at 2:54 PM, Dale Johannesen <dalej at apple.com> wrote:

>
>  On Jul 8, 2009, at 12:52 PMPDT, Won J Jeon wrote:
>
>  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?
>
>
> Use -S to keep the assembly file around.
>
> You don't seem to be very familiar with compilers, please try to figure
> things like this out from the documentation first.
>
>
>  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
>>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
> _______________________________________________
> 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/2ae6d687/attachment.html>


More information about the llvm-dev mailing list