Commit bc687833 authored by Russ Cox's avatar Russ Cox

8g: fix out of register bug in byte(x) code

R=ken2
CC=golang-dev
https://golang.org/cl/223070
parent e6443f62
......@@ -215,14 +215,9 @@ cgen(Node *n, Node *res)
break;
}
mgen(nl, &n1, res);
if(n->type->width > widthptr)
tempname(&n2, n->type);
else
regalloc(&n2, n->type, res);
tempname(&n2, n->type);
gmove(&n1, &n2);
gmove(&n2, res);
if(n2.op == OREGISTER)
regfree(&n2);
mfree(&n1);
break;
......
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