I have compiled lli to run on qemu-system-mips and got the error "Illegal
instruction" as follows.
*ecl$ ./llis mipshello.bc*
*0 0x7f836770 + 2139318128*
*1 lli 0x01879918*
*Stack dump:*
*0. Program arguments: ./lli mipshello.bc*
*Illegal instruction*
*
*
I used gdb to trace the execution and saw that in JIT::runFunction()
(JIT.cpp), after compiling the "main" function, the JIT failed to
execute it
* else if (BitWidth <= 32)*
* rv.IntVal = APInt(BitWidth, ((int(*)())(intptr_t)FPtr)());*
Seems like the code emitter produced a wrong binary for MIPS? It's weird
because the release notes state that the old-style JIT for MIPS is
complete.
I compiled hello.c using this command:
$ clang -emit-llvm -c -o mipshello.bc -ccc-host-triple mips-unkown-linux
-ccc-clang-archs mips hello.c
Did I do anything wrong or miss something?
Is there any guide or example for running JIT on MIPS?
Thanks,
On Tue, May 1, 2012 at 12:53 PM, 陳韋任 <chenwj at iis.sinica.edu.tw> wrote:
> On Tue, May 01, 2012 at 11:11:44AM +0900, Toan Mai wrote:
> > Could you tell me the current status of MIPS JIT?
>
> According to [1], the support for "old-style" JIT is complete.
> You can give it a shot.
>
> > I'm afraid it's not straightforward to fix it, Chen.
>
> Well, no pain no gain. ;)
>
> Regards,
> chenwj
>
> [1] http://llvm.org/releases/3.0/docs/ReleaseNotes.html#whatsnew
>
> --
> Wei-Ren Chen (陳韋任)
> Computer Systems Lab, Institute of Information Science,
> Academia Sinica, Taiwan (R.O.C.)
> Tel:886-2-2788-3799 #1667
> Homepage: http://people.cs.nctu.edu.tw/~chenwj
>
--
Toan Mai
School of ECE, UNIST, Korea
http://ecl.unist.ac.kr/~tmai
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20120502/cb0a5808/attachment.html>