[Patch,AVR]: Fix PR50447 (4/n)

Georg-Johann Lay avr@gjlay.de
Tue Oct 11 12:41:00 GMT 2011


This is a small addendum to PR50447.

It's a change to addsi3 insn; the actual insn sequence printed is still the
same (except for adding +/-1 to l-reg) but the effect on cc0 is worked out so
that it can be used to cancel out comparisons like in long loops.

cc insn attribute gets one more alternative and notice_update_cc calls
respective output function that works out the effect on cc0.

Passed without regressions. Ok for trunk?

Johann

	PR target/50447
	* config/avr/avr.md (cc): Add out_plus attribute alternative.
	(addsi3): Use it.  Adapt avr_out_plus to new prototype.  Use
	avr_out_plus for all CONST_INT addends.
	* config/avr/avr-protos.h (avr_out_plus): Change prototype.
	* config/avr/avr.c (notice_update_cc): Call avr_out_plus on
	CC_OUT_PLUS.
	(avr_out_plus_1): Change prototype and report effect on cc0.
	(avr_out_plus): Ditto.
	(adjust_insn_length): Adapt call to avr_out_plus to new prototype.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr50447-pluscc.diff
Type: text/x-patch
Size: 7731 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111011/e056824e/attachment.bin>


More information about the Gcc-patches mailing list