From c88c0d42a1ac718915fcd7c79ebe517baa624348 Mon Sep 17 00:00:00 2001 From: Clinton Popetz Date: Wed, 3 May 2000 17:45:26 +0000 Subject: 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 --- gcc/genrecog.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'gcc/genrecog.c') 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++; } -- cgit v1.1