The BEAM virtual machine uses two kinds of instructions. The first — generic — kind is used by BEAM modules. Generic instructions are dumped when a BEAM module is disassembled. When a module gets loaded, generic instructions are transformed into a second — true — kind, which are subsequently executed by the emulator.
The present semi-formal specification defines semantics of the true instruction set. The specification is derived from the BEAM v5.9.1 source code.
The Ling virtual machine does all code transformation during compile time. The Ling instruction set is quite similar. We were able to introduce a number of enhancements that reflect different optimization targets of Ling.
The following rare/unused/obscure instructions are not documented: