This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GCC build failed for native with your patch on 2002-03-06T23:16:26Z.
- From: "Ulrich Weigand" <Ulrich dot Weigand at de dot ibm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 7 Mar 2002 21:05:10 +0100
- Subject: Re: GCC build failed for native with your patch on 2002-03-06T23:16:26Z.
Richard Henderson wrote:
>MATCH_PAR_DUP needs the same treatment, and since it's safe to
>recurse into MATCH_DUP (trivially), I think you should just
>replace the return with a break.
However, genextract.c does not recurse into MATCH_PAR_DUP either.
(I primarily wanted to make sure that insn-extract.c and insn-output.c
are consistent with each other ...)
I wasn't sure whether a match_dup inside a match_par_dup was legal
in the first place, so I let this as is.
If you say we should recurse into MATCH_PAR_DUP, then I guess we'll
need something like this:
Index: gcc/genextract.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/genextract.c,v
retrieving revision 1.50
diff -c -p -r1.50 genextract.c
*** genextract.c 2001/12/02 00:04:19 1.50
--- genextract.c 2002/03/07 20:00:05
*************** walk_rtx (x, path)
*** 210,221 ****
break;
case MATCH_DUP:
- case MATCH_PAR_DUP:
duplocs[dup_count] = xstrdup (path);
dupnums[dup_count] = XINT (x, 0);
dup_count++;
break;
case MATCH_OP_DUP:
duplocs[dup_count] = xstrdup (path);
dupnums[dup_count] = XINT (x, 0);
--- 210,221 ----
break;
case MATCH_DUP:
duplocs[dup_count] = xstrdup (path);
dupnums[dup_count] = XINT (x, 0);
dup_count++;
break;
+ case MATCH_PAR_DUP:
case MATCH_OP_DUP:
duplocs[dup_count] = xstrdup (path);
dupnums[dup_count] = XINT (x, 0);
Index: gcc/genoutput.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/genoutput.c,v
retrieving revision 1.68
diff -c -p -r1.68 genoutput.c
*** genoutput.c 2001/12/02 00:04:19 1.68
--- genoutput.c 2002/03/07 20:00:05
*************** scan_operands (d, part, this_address_p,
*** 530,536 ****
case MATCH_OP_DUP:
case MATCH_PAR_DUP:
++num_dups;
! return;
case ADDRESS:
scan_operands (d, XEXP (part, 0), 1, 0);
--- 530,536 ----
case MATCH_OP_DUP:
case MATCH_PAR_DUP:
++num_dups;
! break;
case ADDRESS:
scan_operands (d, XEXP (part, 0), 1, 0);
Mit freundlichen Gruessen / Best Regards
Ulrich Weigand
--
Dr. Ulrich Weigand
Linux for S/390 Design & Development
IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
Phone: +49-7031/16-3727 --- Email: Ulrich.Weigand@de.ibm.com