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

--- Comment #15 from Anitha Boyapati <anitha.boyapati at atmel dot com> 
2010-11-09 10:26:04 UTC ---
(In reply to comment #13)
> Implement TARGET_CANNOT_MODIFY_JUMPS_P and respect epilogue_completed and
> cfun->machine->is_naked. This will stop BB reorder and similar post-epilogue
> passes from moving the non-code-producing return-insn up.

Yes, BB reordering pass is shifting jump blocks. Attached patch solves the
issue. The output is: 

.brsh .L11        |     brlo .L5
                  >     ldi r24, lo8(0)
                  >     ldi r25, hi8(0)
                  >     rjmp .L6
                  >     L5:
.L11:             <
 ldi r24, lo8(0)  <
 ldi r25, hi8(0)  <
 rjmp .L6         <

Reply via email to