DynASM Toolchain Features

DynASM Assembler Features


Currently the x86, x64, ARM, ARM64, PowerPC and MIPS instruction sets are supported. This includes most user-mode instructions available on modern CPUs. For x86/x64 this includes SSE, SSE2, SSE3, SSSE3, SSE4a, SSE4.1, SSE4.2, AVX, AVX2, BMI, ADX, AES-NI and FMA3. For PPC this also includes the e500 instruction set extension.

The whole toolchain has been designed to support multiple CPU architectures. As LuaJIT gets support for more architectures, DynASM will be extended with new CPU-specific modules.

Note that runtime conditionals are not really needed, since you can just use plain C code for that (and LuaJIT does this a lot). It's not going to be more (time-) efficient if conditionals are done by the embedded C library (maybe a bit more space-efficient).

DynASM Dependencies

Please don't be shied away because DynASM itself is written in Lua. This only applies to the pre-processor. This is pure text-processing and writing such stuff in C would be a waste of time. Pre-processing is done only once while your code generator itself is compiled. There are no dependencies on Lua during runtime, i.e. when your code generator is in action.

Apart from that, a full Lua distribution is around 200K and can be compiled in a few seconds. Consider it a part of the toolchain, if you want.

Or bundle src/host/minilua.c from the LuaJIT source tree, which is a minified Lua 5.1 + BitOp in a single file (45K compressed).