aboutsummaryrefslogtreecommitdiffhomepage
path: root/amd64/isel.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-10-10 22:34:17 +0200
committerlemon <lsof@mailbox.org>2025-10-10 22:34:17 +0200
commit0fb2b5712cc98ea993f37bd86eeed89fddc5d6d9 (patch)
treede9fce7ad0212b54c3de3a72dbe67038e8dd7936 /amd64/isel.c
parent0cb0dd0d23386a6a6ff4e981bb633b9e34a87c65 (diff)
bugfixes
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 fefd8ea..44f0ff4 100644
--- a/amd64/isel.c
+++ b/amd64/isel.c
@@ -271,6 +271,7 @@ sel(struct function *fn, struct instr *ins, struct block *blk, int *curi)
case Onop: break;
case Oalloca1: case Oalloca2: case Oalloca4: case Oalloca8: case Oalloca16:
alignlog2 = ins->op - Oalloca1;
+ assert(ins->l.i > 0);
siz = ins->l.i << alignlog2;
fn->stksiz += siz;
fn->stksiz = alignup(fn->stksiz, 1 << alignlog2);