[patch,avr] Fix PR60486: Typo cc_plus against cc_minus in calls of avr_out_plus_1

Georg-Johann Lay avr@gjlay.de
Wed Mar 12 13:43:00 GMT 2014


This fixes a problem because cc_plus and cc_minus are in the wrong places in 
calls of avr_out_plus_1.  This is important when avr_out_plus is called from 
notice_update_cc.  This means that cc_status might be determined incorrectly.

In the vast majority of cases this leads to performance regression because of 
superfluous comparisons when an addition (using SUB instructions) has already 
set the condition code.

But there are also cases where this might lead to wrong code.

No changes in test suite results.

Ok to apply?


I didn't follow this list for some time. Is trunk open for such changes?

If so, I would apply it to trunk and 4.8 branch, otherwise to 4.8, 4.9 and 
trunk once they are open again.

Johann


	PR target/60486
	* config/avr/avr.c (avr_out_plus): Swap cc_plus and cc_minus in
	calls of avr_out_plus_1.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr60486.diff
Type: text/x-patch
Size: 616 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140312/fcc845fd/attachment.bin>


More information about the Gcc-patches mailing list