From efc0cf8039cbff5e0f0d52fd7414c7186129b6ac Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 5 Jun 2023 09:32:17 +0200 Subject: command line switch for debug options --- abi0.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'abi0.c') diff --git a/abi0.c b/abi0.c index 099364a..3236e63 100644 --- a/abi0.c +++ b/abi0.c @@ -217,8 +217,8 @@ abi0(struct function *fn) struct call *call = &calltab.p[ins->r.idx]; static union ref newargsbuf[32]; static union irtype newtypsbuf[32]; - vec_of(union ref) newargs; - vec_of(union irtype) newtyps; + vec_of(union ref) newargs = VINIT(newargsbuf, arraylength(newargsbuf)); + vec_of(union irtype) newtyps = VINIT(newtypsbuf, arraylength(newtypsbuf)); bool structbyval; int vararg; @@ -226,8 +226,6 @@ abi0(struct function *fn) vararg = call->vararg; vinit(&abiargs, abiargsbuf, arraylength(abiargsbuf)); - vinit(&newargs, newargsbuf, arraylength(newargsbuf)); - vinit(&newtyps, newtypsbuf, arraylength(newtypsbuf)); if (!(structbyval = call->sret)) for (int i = 0; i < call->narg; ++i) if ((structbyval = call->typs[i].isagg)) @@ -356,6 +354,11 @@ abi0(struct function *fn) } } } while ((blk = blk->lnext) != fn->entry); + + if (ccopt.dbg.a) { + efmt("after abi0:\n"); + irdump(fn, fn->name); + } } /* vim:set ts=3 sw=3 expandtab: */ -- cgit v1.2.3