This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ICE with delayed-branch targets after epilogue-unwind patch
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Adam Nemet <anemet at caviumnetworks dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 8 Jun 2009 09:03:10 -0400
- Subject: Re: [PATCH] Fix ICE with delayed-branch targets after epilogue-unwind patch
- References: <18986.43617.466045.279657@ropi.home>
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);
> ?}
>
>