Commit 62be24d9 authored by Ken Thompson's avatar Ken Thompson

6g code gen bug

R=rsc
https://golang.org/cl/166052
parent f3d63bea
......@@ -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);
......
......@@ -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;
......
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