Generate shorter code for ret 4 and ret 8.

This commit is contained in:
George Koehler 2017-12-22 20:37:39 -05:00
parent 5867ca2f2c
commit f96f918a29

View file

@ -2108,11 +2108,22 @@ PATTERNS
pat ret $1==4 /* Return from procedure, word */ pat ret $1==4 /* Return from procedure, word */
with REG3 with REG3
leaving ret 0 leaving ret 0
with STACK
gen lwz r3, {IND_RC_W, sp, 0}
leaving ret 0
pat ret $1==8 /* Return from proc, double-word */ pat ret $1==8 /* Return from proc, double-word */
with REG3 REG with REG3 INT_W
gen move %2, r4 gen move %2, r4
leaving ret 0 leaving ret 0
with REG3 STACK
gen lwz r4, {IND_RC_W, sp, 0}
leaving ret 0
with STACK
gen
lwz r3, {IND_RC_W, sp, 0}
lwz r4, {IND_RC_W, sp, 4}
leaving ret 0
/* /*
* These rules for blm/bls are wrong if length is zero. * These rules for blm/bls are wrong if length is zero.