Lua

DynASM Toolchain Features

DynASM Assembler Features

Restrictions

Currently only a subset of x86 (i386+) instructions is supported. Unsupported instructions are either not usable in user-mode or are slow on modern CPUs (i.e. not suited for a code generator). SSE, SSE2, SSE3 and SSSE3 are fully supported. MMX is not supported.

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.

The assembler itself will be extended with more features on an as-needed basis. E.g. I'm thinking about vararg macros.

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

In case you are visiting only this page and have not been referred from LuaJIT:

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.