Track stack slot kinds.

Add a StackSlotKind enumeration to help keep track of the different
kinds of stack slots supported:

- Incoming and outgoing function arguments on the stack.
- Spill slots and locals.

Change the text format syntax for declaring a stack slot to use a kind
keyword rather than just 'stack_slot'.
This commit is contained in:
Jakob Stoklund Olesen
2017-06-16 10:35:01 -07:00
parent db62f435f8
commit 7b97933996
9 changed files with 110 additions and 38 deletions

View File

@@ -465,9 +465,9 @@ frame. The stack frame is divided into fixed-size stack slots that are
allocated in the :term:`function preamble`. Stack slots are not typed, they
simply represent a contiguous sequence of bytes in the stack frame.
.. inst:: SS = stack_slot Bytes, Flags...
.. inst:: SS = local Bytes, Flags...
Allocate a stack slot in the preamble.
Allocate a stack slot for a local variable in the preamble.
If no alignment is specified, Cretonne will pick an appropriate alignment
for the stack slot based on its size and access patterns.