aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir/abi0.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-11-21 17:07:28 +0100
committerlemon <lsof@mailbox.org>2025-11-21 17:35:55 +0100
commit87f9753fb776a1fa6e59baef759e4687fb9a1ac7 (patch)
tree192e36f06ac1bda63c3dceced36cb9c8562ca713 /ir/abi0.c
parent821adf9e5c962c97e46f3a215c876bc10916e302 (diff)
ir: barebones IR passes checked contracts
Diffstat (limited to 'ir/abi0.c')
-rw-r--r--ir/abi0.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ir/abi0.c b/ir/abi0.c
index 895277c..fe1a7e3 100644
--- a/ir/abi0.c
+++ b/ir/abi0.c
@@ -348,6 +348,8 @@ abi0(struct function *fn)
struct block *blk;
union ref sret = {0};
+ FREQUIRE(FNUSE);
+
if (fn->retty.t == TYVOID) {
fn->nabiret = 0;
} else {
@@ -435,6 +437,9 @@ abi0(struct function *fn)
blk->id = id++;
} while ((blk = blk->lnext) != fn->entry);
+ /* vaargs might break */
+ fn->prop &= ~(FNBLKID | FNRPO);
+
if (ccopt.dbg.a) {
bfmt(ccopt.dbgout, "<< After abi0 >>\n");
irdump(fn);