summary refs log tree commit diff
path: root/lisc/slot.txt
blob: 9212cde6ec42859c13e30afde9d7db86d85729a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Plan for new slot computations:

- reverse the allocation of all stack slots
  so that isel slots go below spill locations
- the fast allocs must be allocated by decreasing
  alignment constraints
- instead of the svec vector, we simply need two
  numbers that contain the size of both the locals
  and spills (stk0, stk1)
- maybe it's time to include small alignments
- use Tmp.spill == -1 to mark unallocated slots
- issue: how do we reach for the arguments?
  1. an answer to that could be proper support
     for memory references accesses
  2. a more hackish solution is to keep using
     negative numbers (but not -1) for argument
     slots and add a special case in emit.c
- could be time to clean the tests on the size
  of allocs (there are two and they are non-
  uniform)

Layout:

  ---------- rbp = 0 [16]
  | << padding 1 >>
  | .. spills   ..
  |                <- enforce align 16
  | .. align 16 ..
  | .. align  8 ..
  | .. align  4 ..
  | << padding 0 >>
  ---------- rsp = 0 [16]

  padding 0: inserted at last minute by the code
             emitter to respect the ABI
  padding 1: inserted at the end of spill it can
             be 4 or 0

Examples:

  if the first local is aligned 4 of size 4, its slot
  number will be set 0, to emit the proper offset to