1
0
mirror of https://github.com/golang/go synced 2024-11-20 05:14:41 -07:00

cmd/6g, cmd/8g: Allow optimization of return registers.

The peephole optimizer would keep hands off AX and X0 during returns, even though go doesn't return through registers.

R=dave, rsc
CC=golang-dev
https://golang.org/cl/7030046
This commit is contained in:
Daniel Morsing 2013-01-11 15:44:42 +01:00
parent 53e342f648
commit b73a1a8e32
2 changed files with 0 additions and 4 deletions

View File

@ -1157,8 +1157,6 @@ copyu(Prog *p, Adr *v, Adr *s)
return 0; return 0;
case ARET: /* funny */ case ARET: /* funny */
if(v->type == REGRET || v->type == FREGRET)
return 2;
if(s != A) if(s != A)
return 1; return 1;
return 3; return 3;

View File

@ -886,8 +886,6 @@ copyu(Prog *p, Adr *v, Adr *s)
return 0; return 0;
case ARET: /* funny */ case ARET: /* funny */
if(v->type == REGRET || v->type == FREGRET)
return 2;
if(s != A) if(s != A)
return 1; return 1;
return 3; return 3;