[LLVMdev] Global variables on LLVM JIT on ARM (Android)
tnorthover at apple.com
Tue May 28 09:29:06 PDT 2013
> UNREACHABLE executed!
> Stack dump:
> 0. Running pass 'ARM Machine Code Emitter' on function '@method'
LLVM currently has two completely independent JIT implementations, and this fault indicates you're trying to use the legacy one which can just about be relied on not to fail horribly for x86 (usually).
The newer system is called the MCJIT, and *should* work on ARM. If you look at how lli is implemented (tools/lli/lli.cpp) you should be able to see calls to "setUseMCJIT" which you'll want to duplicate in your code.
Your .ll code looks fine.
More information about the llvm-dev