aboutsummaryrefslogtreecommitdiff
path: root/gcc/genrecog.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/genrecog.c')
-rw-r--r--gcc/genrecog.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/genrecog.c b/gcc/genrecog.c
index 2c2978b..0ee656f 100644
--- a/gcc/genrecog.c
+++ b/gcc/genrecog.c
@@ -62,8 +62,8 @@ struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_free free
/* Holds an array of names indexed by insn_code_number. */
-char **insn_name_ptr = 0;
-int insn_name_ptr_size = 0;
+static char **insn_name_ptr = 0;
+static int insn_name_ptr_size = 0;
/* Data structure for a listhead of decision trees. The alternatives
to a node are kept in a doublely-linked list so we can easily add nodes
@@ -1991,3 +1991,14 @@ from the machine description file `md'. */\n\n");
/* NOTREACHED */
return 0;
}
+
+/* Define this so we can link with print-rtl.o to get debug_rtx function. */
+const char *
+get_insn_name (code)
+ int code;
+{
+ if (code < insn_name_ptr_size)
+ return insn_name_ptr[code];
+ else
+ return NULL;
+}