1
0
mirror of https://github.com/golang/go synced 2024-11-21 19:54:41 -07:00

6g code gen bug

R=rsc
https://golang.org/cl/166052
This commit is contained in:
Ken Thompson 2009-12-03 20:28:24 -08:00
parent f3d63bea42
commit 62be24d949
2 changed files with 6 additions and 11 deletions

View File

@ -80,8 +80,9 @@ compile(Node *fn)
pc->as = ARET; // overwrite AEND
pc->lineno = lineno;
if(!debug['N'] || debug['R'] || debug['P'])
if(!debug['N'] || debug['R'] || debug['P']) {
regopt(ptxt);
}
// fill in argument size
ptxt->to.offset = rnd(curfn->type->argwid, maxround);

View File

@ -80,7 +80,6 @@ compile(Node *fn)
pc->as = ARET; // overwrite AEND
pc->lineno = lineno;
if(0)
if(!debug['N'] || debug['R'] || debug['P']) {
regopt(ptxt);
}
@ -470,15 +469,10 @@ cgen_asop(Node *n)
}
hard:
if(nr->ullman > nl->ullman) {
tempname(&n2, nr->type);
cgen(nr, &n2);
igen(nl, &n1, N);
} else {
igen(nl, &n1, N);
tempname(&n2, nr->type);
cgen(nr, &n2);
}
tempname(&n2, nr->type);
cgen(nr, &n2);
igen(nl, &n1, N);
n3 = *n;
n3.left = &n1;