1
0
mirror of https://github.com/golang/go synced 2024-10-03 07:21:21 -06: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;
case ARET: /* funny */
if(v->type == REGRET || v->type == FREGRET)
return 2;
if(s != A)
return 1;
return 3;

View File

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