diff options
author | Michael Forney <mforney@mforney.org> | 2020-04-19 16:31:52 -0700 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2020-08-06 09:51:12 +0200 |
commit | 9de57265ce8453de0f773c48550ca05460844dd1 (patch) | |
tree | c6950680b590eb1cb698bed97cc5ef20dda794fa /arm64/abi.c | |
parent | 190263f1b628ba3171309147120fd3ba0e370b42 (diff) | |
download | roux-9de57265ce8453de0f773c48550ca05460844dd1.tar.gz |
Use a dynamic array for phi arguments
Diffstat (limited to 'arm64/abi.c')
-rw-r--r-- | arm64/abi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arm64/abi.c b/arm64/abi.c index 8bc9c20..f5b605a 100644 --- a/arm64/abi.c +++ b/arm64/abi.c @@ -583,9 +583,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; |