This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/42240] [4.3/4.4 Regression] wrong epilogue on naked function
- From: "anitha.boyapati at atmel dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 9 Nov 2010 10:26:08 +0000
- Subject: [Bug target/42240] [4.3/4.4 Regression] wrong epilogue on naked function
- Auto-submitted: auto-generated
- References: <bug-42240-4@http.gcc.gnu.org/bugzilla/>
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 <