1
0
mirror of https://github.com/golang/go synced 2024-11-19 02:04:42 -07:00

code gen error for

lv += f()
fixes asn1 and maybe more

R=rsc
CC=golang-dev
https://golang.org/cl/2341042
This commit is contained in:
Ken Thompson 2010-09-30 18:02:38 -07:00
parent 52d619cfdf
commit 57858b70fb

View File

@ -446,10 +446,10 @@ cgen_asop(Node *n)
case OOR:
a = optoas(n->etype, nl->type);
if(nl->addable) {
regalloc(&n2, nl->type, N);
regalloc(&n3, nr->type, N);
cgen(nl, &n2);
cgen(nr, &n3);
regalloc(&n2, nl->type, N);
cgen(nl, &n2);
gins(a, &n3, &n2);
cgen(&n2, nl);
regfree(&n2);
@ -459,9 +459,9 @@ cgen_asop(Node *n)
if(nr->ullman < UINF)
if(sudoaddable(a, nl, &addr, &w)) {
regalloc(&n2, nl->type, N);
regalloc(&n3, nr->type, N);
p1 = gins(AMOVW, N, &n2);
p1->from = addr;
regalloc(&n3, nr->type, N);
cgen(nr, &n3);
gins(a, &n3, &n2);
p1 = gins(AMOVW, &n2, N);