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 23:11:19 +0100
- Subject: Re: GCC build failed for native with your patch on 2002-03-06T23:16:26Z.
Richard Henderson wrote:
>Your genextract patch isn't quite right. You'd also need
>
>- newpath[depth] = '0' + i;
>+ newpath[depth] = (code == MATCH_OP_DUP ? '0' : 'a') + i;
>
>at line 230.
Oops, right.
>Ok with that change.
I've committed the following patch to branch and trunk
(bootstrapped and regtested on the trunk on s390-ibm-linux
and s390x-ibm-linux).
ChangeLog:
* genextract.c (walk_rtx): Recurse into MATCH_PAR_DUP.
genoutput.c (scan_operands): Recurse into MATCH_PAR_DUP
and MATCH_OP_DUP.
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:49: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);
*************** walk_rtx (x, path)
*** 227,233 ****
for (i = XVECLEN (x, 1) - 1; i >= 0; i--)
{
! newpath[depth] = '0' + i;
walk_rtx (XVECEXP (x, 1, i), newpath);
}
free (newpath);
--- 227,233 ----
for (i = XVECLEN (x, 1) - 1; i >= 0; i--)
{
! newpath[depth] = (code == MATCH_OP_DUP ? '0' : 'a') + i;
walk_rtx (XVECEXP (x, 1, i), newpath);
}
free (newpath);
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:49: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