3 ms·
Interesting. This seems to be more or less a C++ equivalent of DynASM (http://luajit.org/dynasm.html http://luajit.org/dynasm.html). Like DynASM, it lets you
by haberman 12y ago
Interesting. This seems to be more or less a C++ equivalent of DynASM (http://luajit.org/dynasm.html http://luajit.org/dynasm.html). Like DynASM, it lets you generate machine code at runtime. The library handles instruction encoding and linking of jump targets.
Like DynASM, it exposes the underlying architecture/instructions directly. It does not have an architecture-agnostic IR like LLVM.
It does do a little more than DynASM though. It provides (as an option) a higher-level interface that abstracts away ABI calling conventions and physical registers. It has a register allocator that assigns virtual registers to physical ones. It must also then be able to spill registers to the stack when necessary? It is interesting; I have not come across any assemblers that take this particular approach (native CPU instructions with virtual registers).
One thing that confused me about the title: the project exposes a C++ API, but it is not a JIT for compiling C++ programs themselves.
- tiffanyh 12y agoMore information on DynASM can be found in the unofficial reference guide. http://corsix.github.io/dynasm-doc/ http://corsix.github.io/dynasm-doc/