Commit 6b6ca844 by Richard Kenner

(gen_insn): Ignore insns whose names begin with '*'.

From-SVN: r8742
parent 7eb23718
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- some macros CODE_FOR_... giving the insn_code_number value - some macros CODE_FOR_... giving the insn_code_number value
for each of the defined standard insn names. for each of the defined standard insn names.
Copyright (C) 1987, 1991 Free Software Foundation, Inc. Copyright (C) 1987, 1991, 1995 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -45,9 +45,10 @@ static void ...@@ -45,9 +45,10 @@ static void
gen_insn (insn) gen_insn (insn)
rtx insn; rtx insn;
{ {
/* Don't mention instructions whose names are the null string. /* Don't mention instructions whose names are the null string
They are in the machine description just to be recognized. */ or begin with '*'. They are in the machine description just
if (strlen (XSTR (insn, 0)) != 0) to be recognized. */
if (XSTR (insn, 0)[0] != 0 && XSTR (insn, 0)[0] != '*')
printf (" CODE_FOR_%s = %d,\n", XSTR (insn, 0), printf (" CODE_FOR_%s = %d,\n", XSTR (insn, 0),
insn_code_number); insn_code_number);
} }
......
/* Generate code from machine description to emit insns as rtl. /* Generate code from machine description to emit insns as rtl.
Copyright (C) 1987, 1988, 1991, 1994 Free Software Foundation, Inc. Copyright (C) 1987, 1988, 1991, 1994, 1995 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -335,9 +335,10 @@ gen_insn (insn) ...@@ -335,9 +335,10 @@ gen_insn (insn)
} }
} }
/* Don't mention instructions whose names are the null string. /* Don't mention instructions whose names are the null string
They are in the machine description just to be recognized. */ or begin with '*'. They are in the machine description just
if (strlen (XSTR (insn, 0)) == 0) to be recognized. */
if (XSTR (insn, 0)[0] == 0 || XSTR (insn, 0)[0] == '*')
return; return;
/* Find out how many operands this function has, /* Find out how many operands this function has,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- some flags HAVE_... saying which simple standard instructions are - some flags HAVE_... saying which simple standard instructions are
available for this machine. available for this machine.
Copyright (C) 1987, 1991 Free Software Foundation, Inc. Copyright (C) 1987, 1991, 1995 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -123,12 +123,14 @@ gen_insn (insn) ...@@ -123,12 +123,14 @@ gen_insn (insn)
struct obstack *obstack_ptr; struct obstack *obstack_ptr;
int len; int len;
/* Don't mention instructions whose names are the null string. /* Don't mention instructions whose names are the null string
They are in the machine description just to be recognized. */ or begin with '*'. They are in the machine description just
len = strlen (name); to be recognized. */
if (len == 0) if (name[0] == 0 || name[0] == '*')
return; return;
len = strlen (name);
if (len > max_id_len) if (len > max_id_len)
max_id_len = len; max_id_len = len;
......
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