Commit ee7c64ef authored by Russ Cox's avatar Russ Cox

8c: only refer to extern register variables in MOVL instructions

R=ken2
https://golang.org/cl/183136
parent 616394b1
......@@ -55,6 +55,12 @@ cgen(Node *n, Node *nn)
l = n->left;
r = n->right;
o = n->op;
if(n->op == OEXREG || (nn != Z && nn->op == OEXREG)) {
gmove(n, nn);
return;
}
if(n->addable >= INDEXED) {
if(nn == Z) {
switch(o) {
......
......@@ -98,6 +98,7 @@ indexshift(Node *n)
* (20) * (X) ==> 7 multiplier in indexing
* (X,7) + (13,1) ==> 8 adder in indexing (addresses)
* (8) ==> &9(OINDEX) index, almost addressable
* 100 extern register
*
* calculate complexity (number of registers)
*/
......@@ -125,7 +126,7 @@ xcom(Node *n)
break;
case OEXREG:
n->addable = 10;
n->addable = 0;
break;
case OREGISTER:
......
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