diff options
author | Austin Clements <austin@google.com> | 2014-10-28 15:08:09 -0400 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2014-10-28 15:08:09 -0400 |
commit | ef12babfae569c89d7045b6daac218fa15c93312 (patch) | |
tree | d78c25a2613f84fd5a5060efdb2a67d0ecea8b45 /src/cmd | |
parent | 8777610f3b35969d2f52acc32056ea08549b0ba1 (diff) | |
download | go-ef12babfae569c89d7045b6daac218fa15c93312.tar.gz |
[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://codereview.appspot.com/160690043
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/9a/lex.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cmd/9a/lex.c b/src/cmd/9a/lex.c index bd38493d5..26f21f743 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); |