6c: extern registers must be considered used on return
the peephole optimizer would remove stores to extern register before a return statement as it would think they are only set, but not used.
This commit is contained in:
parent
3473fa237c
commit
fc412aef3d
1 changed files with 2 additions and 0 deletions
|
@ -890,6 +890,8 @@ copyu(Prog *p, Adr *v, Adr *s)
|
|||
return 0;
|
||||
|
||||
case ARET: /* funny */
|
||||
if(REGEXT && v->type <= REGEXT && v->type > exregoffset)
|
||||
return 2;
|
||||
if(v->type == REGRET || v->type == FREGRET)
|
||||
return 2;
|
||||
if(s != A)
|
||||
|
|
Loading…
Reference in a new issue