[LLVMdev] problem with lli (llvm 1.3)

Misha Brukman brukman at uiuc.edu
Thu Oct 7 15:37:11 PDT 2004


On Thu, Oct 07, 2004 at 06:22:34PM -0400, Shukang Zhou wrote:
> I am working with llvm 1.3 on a sparcv9 machine. I have successfully
> built llvm and llvm-gcc frontend. I can run many tools including
> llvmgcc, llvm-dis, and llc. After using /opt/SUNWspro/bin/cc to
> assemble .s file into a program binary, I can run the binary correctly
> as well.
> 
> I am interested in the JIT compiler (lli). When I directly run the
> LLVM bytecode using interpretation ("lli -force-interpreter=true
> test.bc), it works fine. But if I use the JIT compiler ("lli
> -force-interpreter=false test.bc"), I got a Segmentation Fault error,
> even for a small program like helloworld.

Is your compiler configured to define __sparcv9 when it compiles?
The following should tell you:

% touch /tmp/file.c
% gcc -dM -E /tmp/file.c | grep __sparcv9

If the output is similar to the below, you're fine:
#define __sparcv9 1

If the above command gives no output, then you need to specify -mcpu=v9
or reconfigure/recompile GCC to default to outputting V9 code.

-- 
Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu




More information about the llvm-dev mailing list