aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ir_stack.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2026-04-08 10:26:18 +0200
committerlemon <lsof@mailbox.org>2026-04-08 10:26:18 +0200
commit8b79b61ae78c91c069447331ed64d400187bdd77 (patch)
tree57a5d9b04c1514ac59c18286cb08393ecd0b1e69 /src/ir_stack.c
parentb8dea129488959adeadc2e444d769f2a2ac709d8 (diff)
Implement basic aarch64 struct arg passing ABI
- Missing: vaargs, >2 member HFAs - Reworked the way stack allocation references are lowered. Now RSTACK persists throughout all passes until emit. This allows deferring stack frame layouting until the end in a less messy way than before, which was emiting frame-pointer relative addresses @ isel time and patching them up later in emit to account for actual stack frame layout.
Diffstat (limited to 'src/ir_stack.c')
-rw-r--r--src/ir_stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir_stack.c b/src/ir_stack.c
index ff49805..a9acc61 100644
--- a/src/ir_stack.c
+++ b/src/ir_stack.c
@@ -19,7 +19,7 @@ lowerstack(Function *fn)
fn->stksiz = alignup(fn->stksiz, 1 << alignlog2);
if (fn->stksiz > (1<<20)-1) error(NULL, "'%s' stack frame too big", fn->name);
*ins = mkinstr0(Onop,0);
- replcuses(mkref(RTMP, t), mkref(RSTACK, fn->stksiz));
+ replcuses(mkref(RTMP, t), mkref(RSTACK, fn->stksiz-siz));
}
}
} while ((blk = blk->lnext) != fn->entry);