14

I'm looking for the most portable assembler 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.

user7610
  • 25,267
  • 15
  • 124
  • 150
LiraNuna
  • 64,916
  • 15
  • 117
  • 140

5 Answers5

13

DynASM, used by LuaJIT, supports x86, x64, ARM, MIPS and PowerPC.

greatwolf
  • 20,287
  • 13
  • 71
  • 105
Vladimir Panteleev
  • 24,651
  • 6
  • 70
  • 114
7

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
  • 64,916
  • 15
  • 117
  • 140
  • 1
    It once was, but the success killed it for general JIT purposes. It is now way to fat, too complicated and too bound to static languages including C++ – Lothar Dec 04 '15 at 23:12
4

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.

Alexandre Bell
  • 3,141
  • 3
  • 30
  • 43
2

You might find NanoJit interesting. It's lighter than LLVM, although horribly underdocumented (there's a nice tutorial here...and that's about it). Supported architectures:

  • x86
  • x64
  • ARM
  • MIPS
  • PowerPC
kirbyfan64sos
  • 10,377
  • 6
  • 54
  • 75
-6

"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
Sam Harwell
  • 97,721
  • 20
  • 209
  • 280