aboutsummaryrefslogtreecommitdiff
path: root/gcc/genrecog.c
diff options
context:
space:
mode:
authorClinton Popetz <cpopetz@cygnus.com>2000-05-03 17:45:26 +0000
committerClinton Popetz <cpopetz@gcc.gnu.org>2000-05-03 13:45:26 -0400
commitc88c0d42a1ac718915fcd7c79ebe517baa624348 (patch)
tree51d16ed3ff5a009c7dd29449525fd4e9a6dc37c1 /gcc/genrecog.c
parent18ca529b1976bfdc7f84b96f93d0ac3f483bf7f8 (diff)
downloadgcc-c88c0d42a1ac718915fcd7c79ebe517baa624348.zip
gcc-c88c0d42a1ac718915fcd7c79ebe517baa624348.tar.gz
gcc-c88c0d42a1ac718915fcd7c79ebe517baa624348.tar.bz2
gensupport.c: New file.
* gensupport.c: New file. * gensupport.h: New file. * Makefile.in (HOST_RTL): Depend on gensupport. (gensupport.o) New rule. * genattr.c: Use gensupport for reading .md files. * genattrtab.c: Ditto. * gencodes.c: Ditto. * genconfig.c: Ditto. * genemit.c: Ditto. * genextract.c: Ditto. * genflags.c: Ditto. * genopinit.c: Ditto. * genoutput.c: Ditto. * genpeep.c: Ditto. * genrecog.c: Ditto. * rtl.def (define_insn_and_split): New DEF_RTL_EXPR. * md.texi (Insn Splitting): Document define_insn_and_split. From-SVN: r33633
Diffstat (limited to 'gcc/genrecog.c')
-rw-r--r--gcc/genrecog.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/gcc/genrecog.c b/gcc/genrecog.c
index 3acf5b1..1f0c331 100644
--- a/gcc/genrecog.c
+++ b/gcc/genrecog.c
@@ -55,6 +55,7 @@
#include "rtl.h"
#include "obstack.h"
#include "errors.h"
+#include "gensupport.h"
#define OUTPUT_LABEL(INDENT_STRING, LABEL_NUMBER) \
printf("%sL%d: ATTRIBUTE_UNUSED_LABEL\n", (INDENT_STRING), (LABEL_NUMBER))
@@ -2461,7 +2462,6 @@ make_insn_sequence (insn, type)
next_insn_code);
break;
}
- next_insn_code++;
return head;
}
@@ -2518,13 +2518,8 @@ main (argc, argv)
if (argc <= 1)
fatal ("No input file name.");
- infile = fopen (argv[1], "r");
- if (infile == 0)
- {
- perror (argv[1]);
- return FATAL_EXIT_CODE;
- }
- read_rtx_filename = argv[1];
+ if (init_md_reader (argv[1]) != SUCCESS_EXIT_CODE)
+ return (FATAL_EXIT_CODE);
next_insn_code = 0;
next_index = 0;
@@ -2535,13 +2530,10 @@ main (argc, argv)
while (1)
{
- c = read_skip_spaces (infile);
- if (c == EOF)
+ desc = read_md_rtx (&pattern_lineno, &next_insn_code);
+ if (desc == NULL)
break;
- ungetc (c, infile);
- pattern_lineno = read_rtx_lineno;
- desc = read_rtx (infile);
if (GET_CODE (desc) == DEFINE_INSN)
{
h = make_insn_sequence (desc, RECOG);
@@ -2558,9 +2550,6 @@ main (argc, argv)
merge_trees (&peephole2_tree, &h);
}
- if (GET_CODE (desc) == DEFINE_PEEPHOLE
- || GET_CODE (desc) == DEFINE_EXPAND)
- next_insn_code++;
next_index++;
}