WAX
WAX is a fantasy instruction set designed to function as the basis for a model backend for all Anselm compilers. It's a highly orthogonal VAX-like (thus the name) CISC architecture.
Programming Model
WAX has 32 integer registers, named R0-R31. R0 is the zero register and is hardcoded to zero. R1 is the program counter.
Addressing Modes
WAX has a rich set of addressing modes
Register Direct
The operand is the value contained with a register
Predication
Rather than relying on branches for control flow, every WAX instruction may be optionally predicated
Instruction Set
Integer (I32/I64)
add
addc
sub
subc
mul
imul
mmul
and
ior
xor
lsh
ash
rot
mov
lea
Single Precision Floating Point (F)
Double Precision Floating Point (D)
Quadruple Precision Floating Point + Packed SIMD (Q)
Hypervisor (H)
Vector (V)
Atomic (A)
Allows lock
bit to be set (cf. x86, makes memory access ops atomic)
Advanced Integer (X)
Includes bit-manipulation and division