LLVM virtual machine

Is there possible to run the llvm byte code purely interpreted with lli?
I know there is this option but in the documentation is stated also that the option is not working and is not maintained.
Did I understand wrong? Is it working?
Is anyone working on this option?
I would like to make something similar to q-emu or bochs.
best regards,

In this case you probably need to interpret machine code (or assembly language) instead of llvm bitcode.

Hi Konstantin,
good point.
but I my intention is to have something like the llva project.
Basically I would like to define a machine that looks as if it has processors running natively llvm code.
And when that runs enhance the llvm byte code with some specific instructions.
Besides this if I make my measurements on the running of llvm bytecode I can test several platforms simultaneously because I can translate the enhancements done on llvm code in optimizations specific for each platform without having to redo the research.

If you want something like the LLVA project for user-space applications, then you basically want to use LLVM as-is. The only things missing are the instructions that replace certain in-line assembly sequences that cannot be represented by regular LLVM instructions or LLVM intrinsics (e.g., context switching), and chances are good that you don’t need them unless you’re supporting kernel code or something like a user-space pthreads library (or you are really pedantic about not using inline assembly code). As an FYI, I’m building a new version of SVA (LLVA) that works on 64-bit x86 processors. It supports the FreeBSD 9.0 kernel. I probably won’t replace all the inline assembly code in the FreeBSD kernel like I did for Linux 2.4.22 years ago, but most of the important features will be there (and are, in fact, already implemented). We plan to release this version as open-source software within the next year (I suppose we could release the old version, too, but nobody uses Linux 2.4 on x86 anymore), but I don’t have a timeline for that yet. My first order of business is to use the new SVA system to graduate. :slight_smile: – John T.

Hi John,
maybe if I help you I can get faster into my own problem.
So may I?
Maybe in two we could replace the inline assembly too.