qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit b698584443f17b8d0cfd88e0afe037ce351e0ee6
parent d9f1121763c126316ab338ca8b1b9d51967a33b1
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Tue,  7 Feb 2017 23:03:38 -0500

update minic for new vararg support

We conservatively assume all functions have
variable argument lists.

Diffstat:
Mminic/minic.y | 18++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/minic/minic.y b/minic/minic.y @@ -290,18 +290,12 @@ call(Node *n, Symb *sr) fprintf(of, "\t"); psymb(*sr); fprintf(of, " =%c call $%s(", irtyp(sr->ctyp), f); - a = n->r; - if (a) - for (;;) { - fprintf(of, "%c ", irtyp(a->u.s.ctyp)); - psymb(a->u.s); - a = a->r; - if (a) - fprintf(of, ", "); - else - break; - } - fprintf(of, ")\n"); + for (a=n->r; a; a=a->r) { + fprintf(of, "%c ", irtyp(a->u.s.ctyp)); + psymb(a->u.s); + fprintf(of, ", "); + } + fprintf(of, "...)\n"); } Symb