Add support for emergency spill slots.

- Create a new kind of stack slot: emergency_slot.
- Add a get_emergency_slot() method which finds a suitable emergency
  slot given a list of slots already in use.
- Use emergency spill slots when schedule_moves needs them.
This commit is contained in:
Jakob Stoklund Olesen
2017-10-06 09:11:51 -07:00
parent d0b4c76262
commit b3fa47cacc
7 changed files with 154 additions and 10 deletions

View File

@@ -117,6 +117,7 @@ function %stack() {
ss2 = local 4
ss3 = incoming_arg 4, offset 8
ss4 = outgoing_arg 4
ss5 = emergency_slot 4
ebb0:
v1 = stack_load.i32 ss10
@@ -129,6 +130,7 @@ ebb0:
; nextln: $ss2 = local 4
; nextln: $ss3 = incoming_arg 4, offset 8
; nextln: $ss4 = outgoing_arg 4
; nextln: $ss5 = emergency_slot 4
; check: ebb0:
; nextln: $v1 = stack_load.i32 $ss10