aboutsummaryrefslogtreecommitdiff
path: root/parse.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 /parse.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 'parse.c')
-rw-r--r--parse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index caab452..e896679 100644
--- a/parse.c
+++ b/parse.c
@@ -694,6 +694,7 @@ parseline(PState ps)
goto Ins;
}
if (op == Tcall) {
+ curf->leaf = 0;
arg[0] = parseref();
parserefl(1);
op = Ocall;
@@ -910,6 +911,7 @@ parsefn(Lnk *lnk)
curf->con[0].bits.i = 0xdeaddead; /* UNDEF */
curf->con[1].type = CBits;
curf->lnk = *lnk;
+ curf->leaf = 1;
blink = &curf->start;
curf->retty = Kx;
if (peek() != Tglo)