Assign stack slots to incoming function arguments.

Function arguments that don't fit in registers are passed on the stack.

Create "incoming_arg" stack slots representing the stack arguments, and
assign them to the value arguments during spilling.
This commit is contained in:
Jakob Stoklund Olesen
2017-06-28 14:59:59 -07:00
parent ed3157f508
commit 2a600b3632
5 changed files with 53 additions and 17 deletions

View File

@@ -109,3 +109,15 @@ ebb0(v0: i32):
; check: call_indirect $sig0, $v0($v0, $c)
return
}
; Two arguments on the stack.
function %stackargs(i32, i32, i32, i32, i32, i32, i32, i32) -> i32 {
; check: ss0 = incoming_arg 4
; check: ss1 = incoming_arg 4, offset 4
; not: incoming_arg
ebb0(v0: i32, v1: i32, v2: i32, v3: i32, v4: i32, v5: i32, v6: i32, v7: i32):
; unordered: fill $v6
; unordered: fill $v7
v10 = iadd v6, v7
return v10
}