From: Richard Kenner Date: Mon, 6 Sep 1993 18:42:55 +0000 (-0400) Subject: (insn_name_ptr): Define for debugging. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=809ffa71e15de5579f7f36b595994b7dc82de5c8;p=platform%2Fupstream%2Fgcc.git (insn_name_ptr): Define for debugging. (walk_rtx, case MATCH_OP_DUP): Expand recog_dup_loc using XEXP not XVECEXP. From-SVN: r5269 --- diff --git a/gcc/genextract.c b/gcc/genextract.c index 97ce57d..3234d4e 100644 --- a/gcc/genextract.c +++ b/gcc/genextract.c @@ -1,5 +1,5 @@ /* Generate code from machine description to extract operands from insn as rtl. - Copyright (C) 1987, 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1987, 1991, 1992, 1993 Free Software Foundation, Inc. This file is part of GNU CC. @@ -33,6 +33,9 @@ struct obstack *rtl_obstack = &obstack; extern void free (); extern rtx read_rtx (); +/* Names for patterns. Need to allow linking with print-rtl. */ +char **insn_name_ptr; + /* This structure contains all the information needed to describe one set of extractions methods. Each method may be used by more than one pattern if the operands are in the same place. @@ -216,13 +219,28 @@ walk_rtx (x, path) break; case MATCH_DUP: - case MATCH_OP_DUP: case MATCH_PAR_DUP: duplocs[dup_count] = copystr (path); dupnums[dup_count] = XINT (x, 0); dup_count++; break; + case MATCH_OP_DUP: + duplocs[dup_count] = copystr (path); + dupnums[dup_count] = XINT (x, 0); + dup_count++; + + newpath = (char *) alloca (depth + 2); + strcpy (newpath, path); + newpath[depth + 1] = 0; + + for (i = XVECLEN (x, 1) - 1; i >= 0; i--) + { + newpath[depth] = '0' + i; + walk_rtx (XVECEXP (x, 1, i), newpath); + } + return; + case MATCH_OPERATOR: oplocs[XINT (x, 0)] = copystr (path); op_count = MAX (op_count, XINT (x, 0) + 1);