From 3a46902b3ede49116522992793d3ececef53c5a8 Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 31 Dec 2025 09:26:37 +0100 Subject: aarch64 isel syms with offset --- ir/stack.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'ir') diff --git a/ir/stack.c b/ir/stack.c index 2420fdb..45023d1 100644 --- a/ir/stack.c +++ b/ir/stack.c @@ -10,20 +10,17 @@ lowerstack(struct function *fn) struct block *blk = fn->entry; do { for (int i = 0; i < blk->ins.n; ++i) { - uint alignlog2, siz; int t = blk->ins.p[i]; struct instr *ins = &instrtab[t]; - switch (ins->op) { - case Oalloca1: case Oalloca2: case Oalloca4: case Oalloca8: case Oalloca16: - alignlog2 = ins->op - Oalloca1; + if (oisalloca(ins->op)) { + uint alignlog2 = ins->op - Oalloca1; assert(ins->l.i > 0); - siz = ins->l.i << alignlog2; + uint siz = ins->l.i << alignlog2; fn->stksiz += siz; fn->stksiz = alignup(fn->stksiz, 1 << alignlog2); if (fn->stksiz > (1<<16)-1) error(NULL, "'%s' stack frame too big", fn->name); *ins = mkinstr(Onop,0,); replcuses(mkref(RTMP, t), mkref(RSTACK, fn->stksiz)); - continue; } } } while ((blk = blk->lnext) != fn->entry); -- cgit v1.2.3