From: George Koehler Date: Wed, 8 Nov 2017 04:52:52 +0000 (-0500) Subject: Restore an assignment deleted in commit 789f79b. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=0fc0faef082ac51b74793a3dc6b29616df38092c;p=ack.git Restore an assignment deleted in commit 789f79b. Because of the accidental deletion, mcgg on my machine followed a garbage pointer, and never wrote calls to emit_fragment. A wrong call to `data->emit_reg(0, 0)` instead of the correct `data->emit_fragment(0)` caused PowerPC mcg to emit an empty string instead of `8(fp)`, causing a syntax error in PowerPC as. The wrong `data->emit_reg(0, 0)` called the function emit_reg() in mach/proto/mcg/pass_instructionselection.c, but that function unfortunately has `if (vreg) { ... }`. The call had vreg == NULL because the fragment wasn't a vreg, but emit_reg() ignored the problem and emit nothing. --- diff --git a/util/mcgg/iburg.c b/util/mcgg/iburg.c index 4441b6a4a..0477f216b 100644 --- a/util/mcgg/iburg.c +++ b/util/mcgg/iburg.c @@ -1280,6 +1280,7 @@ static void emitinsndata(Rule rules) if (!find_child_index(r->pattern, label, &index, &node)) label_not_found(r, label); + nt = node->op; if (nt->kind == NONTERM) { if (nt->is_fragment)