[PATCH] Fix ICE with delayed-branch targets after epilogue-unwind patch
Richard Guenther
richard.guenther@gmail.com
Mon Jun 8 13:03:00 GMT 2009
On Sat, Jun 6, 2009 at 1:41 PM, Adam Nemet<anemet@caviumnetworks.com> wrote:
> This fixes the new ICEs in:
>
> http://gcc.gnu.org/ml/gcc-testresults/2009-06/msg00327.html
>
> The gcc_assert in dwarf2out_begin_epilogue fires because returnjump_p fails to
> recognize a return inside a SEQUENCE.
>
> Bootstrapped and regtested on mips64octeon-linux.
>
> OK?
Ok.
Thanks,
Richard.
> Adam
>
>
> * jump.c (returnjump_p): Handle delayed branches. Add missing
> function comment.
>
> Index: jump.c
> ===================================================================
> --- jump.c (revision 148223)
> +++ jump.c (working copy)
> @@ -886,11 +886,18 @@ returnjump_p_1 (rtx *loc, void *data ATT
> }
> }
>
> +/* Return TRUE if INSN is a return jump. */
> +
> int
> returnjump_p (rtx insn)
> {
> + /* Handle delayed branches. */
> + if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == SEQUENCE)
> + insn = XVECEXP (PATTERN (insn), 0, 0);
> +
> if (!JUMP_P (insn))
> return 0;
> +
> return for_each_rtx (&PATTERN (insn), returnjump_p_1, NULL);
> }
>
>
More information about the Gcc-patches
mailing list