The Mach intermediate language: abstract syntax.
Mach is the last intermediate language before generation of assembly
code. This file defines the abstract syntax for Mach; two dynamic
semantics are given in modules Machabstr and Machconcr.
Like Linear, the Mach language is organized as lists of instructions
operating over machine registers, with default fall-through behaviour
and explicit labels and branch instructions.
The main difference with Linear lies in the instructions used to
access the activation record. Mach has three such instructions:
Mgetstack and Msetstack to read and write within the activation
record for the current function, at a given word offset and with a
given type; and Mgetparam, to read within the activation record of
the caller.
These instructions implement a more concrete view of the activation
record than the the Lgetstack and Lsetstack instructions of
Linear: actual offsets are used instead of abstract stack slots, and the
distinction between the caller's frame and the callee's frame is
made explicit.