mirror of
https://github.com/golang/go
synced 2024-11-20 05:04:43 -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:
parent
53e342f648
commit
b73a1a8e32
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user