This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/42240] [4.3/4.4 Regression] wrong epilogue on naked function


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         <


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]