From 9de57265ce8453de0f773c48550ca05460844dd1 Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sun, 19 Apr 2020 16:31:52 -0700 Subject: Use a dynamic array for phi arguments --- amd64/sysv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'amd64') diff --git a/amd64/sysv.c b/amd64/sysv.c index ea9b2d2..286300a 100644 --- a/amd64/sysv.c +++ b/amd64/sysv.c @@ -590,9 +590,13 @@ selvaarg(Fn *fn, Blk *b, Ins *i) *b0->phi = (Phi){ .cls = Kl, .to = loc, .narg = 2, - .blk = {bstk, breg}, - .arg = {lstk, lreg}, + .blk = vnew(2, sizeof b0->phi->blk[0], Pfn), + .arg = vnew(2, sizeof b0->phi->arg[0], Pfn), }; + b0->phi->blk[0] = bstk; + b0->phi->blk[1] = breg; + b0->phi->arg[0] = lstk; + b0->phi->arg[1] = lreg; r0 = newtmp("abi", Kl, fn); r1 = newtmp("abi", Kw, fn); b->jmp.type = Jjnz; -- cgit 1.4.1