aboutsummaryrefslogtreecommitdiff
path: root/amd64/isel.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <[email protected]>2024-08-20 15:20:42 +0200
committerQuentin Carbonneaux <[email protected]>2024-08-23 18:31:53 +0200
commit626f0b278137ff6f8b7d910d9b3fc3cbdfbb39fc (patch)
treef404b1ef7a963abbf12ecf2c91240f8161e2cded /amd64/isel.c
parentbb8de8c63362b7234db02482240d5600203225d9 (diff)
skip preludes for some leaf fns
When rbp is not necessary to compile a leaf function, we skip saving and restoring it.
Diffstat (limited to 'amd64/isel.c')
-rw-r--r--amd64/isel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/amd64/isel.c b/amd64/isel.c
index 2b92878..bd645ce 100644
--- a/amd64/isel.c
+++ b/amd64/isel.c
@@ -808,6 +808,7 @@ amd64_isel(Fn *fn)
die("alloc too large");
fn->tmp[i->to.val].slot = fn->slot;
fn->slot += sz;
+ fn->salign = 2 + al - Oalloc;
*i = (Ins){.op = Onop};
}