Commit 57858b70 authored by Ken Thompson's avatar Ken Thompson

code gen error for

	lv += f()
fixes asn1 and maybe more

R=rsc
CC=golang-dev
https://golang.org/cl/2341042
parent 52d619cf
...@@ -446,10 +446,10 @@ cgen_asop(Node *n) ...@@ -446,10 +446,10 @@ cgen_asop(Node *n)
case OOR: case OOR:
a = optoas(n->etype, nl->type); a = optoas(n->etype, nl->type);
if(nl->addable) { if(nl->addable) {
regalloc(&n2, nl->type, N);
regalloc(&n3, nr->type, N); regalloc(&n3, nr->type, N);
cgen(nl, &n2);
cgen(nr, &n3); cgen(nr, &n3);
regalloc(&n2, nl->type, N);
cgen(nl, &n2);
gins(a, &n3, &n2); gins(a, &n3, &n2);
cgen(&n2, nl); cgen(&n2, nl);
regfree(&n2); regfree(&n2);
...@@ -459,9 +459,9 @@ cgen_asop(Node *n) ...@@ -459,9 +459,9 @@ cgen_asop(Node *n)
if(nr->ullman < UINF) if(nr->ullman < UINF)
if(sudoaddable(a, nl, &addr, &w)) { if(sudoaddable(a, nl, &addr, &w)) {
regalloc(&n2, nl->type, N); regalloc(&n2, nl->type, N);
regalloc(&n3, nr->type, N);
p1 = gins(AMOVW, N, &n2); p1 = gins(AMOVW, N, &n2);
p1->from = addr; p1->from = addr;
regalloc(&n3, nr->type, N);
cgen(nr, &n3); cgen(nr, &n3);
gins(a, &n3, &n2); gins(a, &n3, &n2);
p1 = gins(AMOVW, &n2, N); p1 = gins(AMOVW, &n2, N);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment