This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fwd: Re: Cleanup REG_VTABLE_REF, some old warn_notreached tricks]
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- To: Andreas Tobler <toa at pop dot agri dot ch>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 17 Jul 2004 11:25:06 +0200
- Subject: Re: [Fwd: Re: Cleanup REG_VTABLE_REF, some old warn_notreached tricks]
- References: <40F8AD69.8060009@pop.agri.ch>
> Doh, it's not mentioned in this patch, but on cvs you removed
>
>
> --- gcc/gcc/final.c 2004/07/15 01:07:49 1.321
> +++ gcc/gcc/final.c 2004/07/17 00:31:06 1.322
> @@ -1999,7 +1999,6 @@
> rtx body = PATTERN (insn);
> int insn_code_number;
> const char *template;
> - rtx note;
>
> Which breaks bootstrap on darwin here.
>
> Accidental ??
Yes. I broke all targets that use define_peephole and all cc0
targets. Shame on me! ;)
I'll test the attached patch on powerpc, and with a cross build
for a cc0 target. You should only need the second hunk for ppc.
Gr.
Steven
Index: final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.322
diff -u -3 -p -r1.322 final.c
--- final.c 17 Jul 2004 00:31:06 -0000 1.322
+++ final.c 17 Jul 2004 09:08:42 -0000
@@ -2008,17 +2008,19 @@ final_scan_insn (rtx insn, FILE *file, i
break;
#ifdef HAVE_cc0
- /* If there is a REG_CC_SETTER note on this insn, it means that
- the setting of the condition code was done in the delay slot
- of the insn that branched here. So recover the cc status
- from the insn that set it. */
+ {
+ /* If there is a REG_CC_SETTER note on this insn, it means that
+ the setting of the condition code was done in the delay slot
+ of the insn that branched here. So recover the cc status
+ from the insn that set it. */
- note = find_reg_note (insn, REG_CC_SETTER, NULL_RTX);
- if (note)
- {
- NOTICE_UPDATE_CC (PATTERN (XEXP (note, 0)), XEXP (note, 0));
- cc_prev_status = cc_status;
- }
+ rtx note = find_reg_note (insn, REG_CC_SETTER, NULL_RTX);
+ if (note)
+ {
+ NOTICE_UPDATE_CC (PATTERN (XEXP (note, 0)), XEXP (note, 0));
+ cc_prev_status = cc_status;
+ }
+ }
#endif
/* Detect insns that are really jump-tables
@@ -2401,7 +2403,7 @@ final_scan_insn (rtx insn, FILE *file, i
emit them before the peephole. */
if (next != 0 && next != NEXT_INSN (insn))
{
- rtx prev = PREV_INSN (insn);
+ rtx note, prev = PREV_INSN (insn);
for (note = NEXT_INSN (insn); note != next;
note = NEXT_INSN (note))