Commit 809ffa71 by Richard Kenner

(insn_name_ptr): Define for debugging.

(walk_rtx, case MATCH_OP_DUP): Expand recog_dup_loc using XEXP not XVECEXP.

From-SVN: r5269
parent ccf5f342
/* Generate code from machine description to extract operands from insn as rtl. /* 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. This file is part of GNU CC.
...@@ -33,6 +33,9 @@ struct obstack *rtl_obstack = &obstack; ...@@ -33,6 +33,9 @@ struct obstack *rtl_obstack = &obstack;
extern void free (); extern void free ();
extern rtx read_rtx (); 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 /* This structure contains all the information needed to describe one
set of extractions methods. Each method may be used by more than set of extractions methods. Each method may be used by more than
one pattern if the operands are in the same place. one pattern if the operands are in the same place.
...@@ -216,13 +219,28 @@ walk_rtx (x, path) ...@@ -216,13 +219,28 @@ walk_rtx (x, path)
break; break;
case MATCH_DUP: case MATCH_DUP:
case MATCH_OP_DUP:
case MATCH_PAR_DUP: case MATCH_PAR_DUP:
duplocs[dup_count] = copystr (path); duplocs[dup_count] = copystr (path);
dupnums[dup_count] = XINT (x, 0); dupnums[dup_count] = XINT (x, 0);
dup_count++; dup_count++;
break; 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: case MATCH_OPERATOR:
oplocs[XINT (x, 0)] = copystr (path); oplocs[XINT (x, 0)] = copystr (path);
op_count = MAX (op_count, XINT (x, 0) + 1); op_count = MAX (op_count, XINT (x, 0) + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment