tags:

views:

282

answers:

3

I'm looking for the most portable JIT compiler library, like asmjit or jitasm.

When I say 'most portable' I mean, that has the most support for a wide verity of architectures. Language doesn't matter so much, but C++ would be the best solution, especially when coupled with GCC.

Important architectures for me, are x86/64, PowerPC and ARM.

A: 

"x86/64, PowerPC and ARM" is not a very wide range of architectures. Many open source VMs should support that set, including Mono for one. What are you looking to do with it?

Mono's supported platforms for JIT include (partial list here - full list in link):

  • X86
  • X86-64
  • IA64 (Itanium)
  • Power PC
  • ARM
  • MIPS
  • Alpha
280Z28
jitasm will let you generate asm code on the fly with the option to execute it. Mono will compile code offline. Not really what I want.
LiraNuna
Mono pre-compiles C# to IL and JITs the IL on the fly.
Franci Penov
then I'd have to code a wrapper that compiles to IL. Not exactly efficient and is far off from what I requested.
LiraNuna
A: 

Well GNU offers you libjit. Highly portable to your architectures of choice, well documented and offering a C++ interface. Being GCC your compiler, I can't think of a better offer.

Krugar
libjit seems to be x86/x86_64 only too...
LiraNuna
A: 

After extensive searching and research, I found LLVM to be the best JIT library. All of them support only x86/x86_64, and LLVM is the only one with x86/x86_64 and PPC/PPC64.

So I hereby declare it the most portable... If anyone finds a better one, please - oh please share.

LiraNuna