mirror of
https://github.com/golang/go
synced 2024-11-20 05:44:44 -07:00
8c: only refer to extern register variables in MOVL instructions
R=ken2 https://golang.org/cl/183136
This commit is contained in:
parent
616394b177
commit
ee7c64efe5
@ -55,6 +55,12 @@ cgen(Node *n, Node *nn)
|
|||||||
l = n->left;
|
l = n->left;
|
||||||
r = n->right;
|
r = n->right;
|
||||||
o = n->op;
|
o = n->op;
|
||||||
|
|
||||||
|
if(n->op == OEXREG || (nn != Z && nn->op == OEXREG)) {
|
||||||
|
gmove(n, nn);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(n->addable >= INDEXED) {
|
if(n->addable >= INDEXED) {
|
||||||
if(nn == Z) {
|
if(nn == Z) {
|
||||||
switch(o) {
|
switch(o) {
|
||||||
|
@ -98,6 +98,7 @@ indexshift(Node *n)
|
|||||||
* (20) * (X) ==> 7 multiplier in indexing
|
* (20) * (X) ==> 7 multiplier in indexing
|
||||||
* (X,7) + (13,1) ==> 8 adder in indexing (addresses)
|
* (X,7) + (13,1) ==> 8 adder in indexing (addresses)
|
||||||
* (8) ==> &9(OINDEX) index, almost addressable
|
* (8) ==> &9(OINDEX) index, almost addressable
|
||||||
|
* 100 extern register
|
||||||
*
|
*
|
||||||
* calculate complexity (number of registers)
|
* calculate complexity (number of registers)
|
||||||
*/
|
*/
|
||||||
@ -125,7 +126,7 @@ xcom(Node *n)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OEXREG:
|
case OEXREG:
|
||||||
n->addable = 10;
|
n->addable = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OREGISTER:
|
case OREGISTER:
|
||||||
|
Loading…
Reference in New Issue
Block a user