From: Austin Clements Date: Tue, 28 Oct 2014 19:08:09 +0000 (-0400) Subject: [dev.power64] 9a: correct generation of four argument ops X-Git-Tag: go1.5beta1~2684^2~25^2~3 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c8f50b298cdf378889cff2a1b7355f7a1cb08a0a;p=gostls13.git [dev.power64] 9a: correct generation of four argument ops The "to" field was the penultimate argument to outgcode, instead of the last argument, which swapped the third and fourth operands. The argument order was correct in a.y, so just swap the meaning of the arguments in outgcode. This hadn't come up because we hadn't used these more obscure operations in any hand-written assembly until now. LGTM=rsc, dave R=rsc, dave CC=golang-codereviews https://golang.org/cl/160690043 --- diff --git a/src/cmd/9a/lex.c b/src/cmd/9a/lex.c index bd38493d5a..26f21f7436 100644 --- a/src/cmd/9a/lex.c +++ b/src/cmd/9a/lex.c @@ -706,10 +706,9 @@ outgcode(int a, Addr *g1, int reg, Addr *g2, Addr *g3) p->mark |= NOSCHED; p->from = *g1; p->reg = reg; - p->to = *g2; - p->from3 = *g3; + p->from3 = *g2; + p->to = *g3; p->pc = pc; - print("oc: %P\n", p); if(lastpc == nil) { pl = linknewplist(ctxt);