http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60991

--- Comment #3 from Senthil Kumar Selvaraj <senthil_kumar.selvaraj at atmel dot 
com> ---
The OP's suspicion/analysis was right. Here's a "trivial" patch that fixes the
problem.

diff --git gcc/config/avr/avr.c gcc/config/avr/avr.c
index 2edc78a..e96691e 100644
--- gcc/config/avr/avr.c
+++ gcc/config/avr/avr.c
@@ -3993,7 +3993,7 @@ avr_out_store_psi (rtx insn, rtx *op, int *plen)
                                 "std Y+61,%A1"    CR_TAB
                                 "std Y+62,%B1"    CR_TAB
                                 "std Y+63,%C1"    CR_TAB
-                                "sbiw r28,%o0-60", op, plen, -5);
+                                "sbiw r28,%o0-61", op, plen, -5);

           return avr_asm_len ("subi r28,lo8(-%o0)" CR_TAB
                               "sbci r29,hi8(-%o0)" CR_TAB

Reply via email to