From 8b79b61ae78c91c069447331ed64d400187bdd77 Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 8 Apr 2026 10:26:18 +0200 Subject: 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. --- src/ir_regalloc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/ir_regalloc.c') diff --git a/src/ir_regalloc.c b/src/ir_regalloc.c index 31f03c2..26b90a6 100644 --- a/src/ir_regalloc.c +++ b/src/ir_regalloc.c @@ -111,9 +111,7 @@ typedef struct RegAlloc { stktop; } RegAlloc; -#define stkslotref(fn, off) \ - mkaddr((IRAddr){.base = mkref(RREG, mctarg->bpr), \ - .disp = -(fn)->stksiz - 8 - (off)}) +#define stkslotref(fn, off) mkref(RSTACK, (fn)->stksiz + (off)) /* Parallel moves algorithm from QBE * */ -- cgit v1.2.3