[LLVMdev] Question::ARM simulation and cross compilation.

陳韋任 chenwj at iis.sinica.edu.tw
Thu Apr 12 09:02:15 PDT 2012


> I'm trying to evaluate the performance improvement of instruction scheduling on one of the inorder ARM processor, I was looking for ARM simulator and I found two (Simplescalar/ARM and SimIt-ARM)
> The code generated using llvm-2.9 and llvm-gcc and gcc 3.2.
> I used these command :
> 
> $ llvm-gcc -O3 -o test1.bc -c --emit-llvm test1.c
> $ llc -O3 -o test1.s -march=arm test1.bc -mcpu=strongarm110
> $ arm-linux-gcc test1.s  -mcpu=strongarm110 -static -O3 -o test1 
> $ ./sim-uop test1

  Looks good to me, but I would rather use LLVM/Clang 3.0. The flow is nearly
the same. You can use clang like this,

$ clang -ccc-host-triple armv7-none-linux-gnueabi -c hello.c -emit-llvm -o hello.bc

> Unfortunately, got this message : 
> 
> bogus opcode detected @ 0x00008370 [sim_main:sim-uop.c, line 497]

Have you try to run the binary on a ARM machine or emulator like QEMU to see if
the binary work or not?
 
Regards,
chenwj

-- 
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




More information about the llvm-dev mailing list