OSDN Git Service

* loop.c (regs_patch_p): Add prototype.
[pf3gnuchains/gcc-fork.git] / gcc / genemit.c
index ddfaf38..209fe09 100644 (file)
@@ -34,6 +34,9 @@ char *xmalloc PROTO((unsigned));
 static void fatal ();
 void fancy_abort PROTO((void));
 
+/* Define this so we can link with print-rtl.o to get debug_rtx function.  */
+char **insn_name_ptr = 0;
+
 static int max_opno;
 static int max_dup_opno;
 static int register_constraints;
@@ -60,6 +63,17 @@ struct clobber_ent
   struct clobber_ent *next;
 };
 
+static void max_operand_1              PROTO((rtx));
+static int max_operand_vec             PROTO((rtx, int));
+static void print_code                 PROTO((RTX_CODE));
+static void gen_exp                    PROTO((rtx));
+static void gen_insn                   PROTO((rtx));
+static void gen_expand                 PROTO((rtx));
+static void gen_split                  PROTO((rtx));
+static void output_add_clobbers                PROTO((void));
+static void output_init_mov_optab      PROTO((void));
+
+\f
 static void
 max_operand_1 (x)
      rtx x;
@@ -496,9 +510,7 @@ gen_expand (expand)
   /* Call `gen_sequence' to make a SEQUENCE out of all the
      insns emitted within this gen_... function.  */
 
-  printf (" _done:\n");
   printf ("  _val = gen_sequence ();\n");
-  printf (" _fail:\n");
   printf ("  end_sequence ();\n");
   printf ("  return _val;\n}\n\n");
 }
@@ -586,9 +598,7 @@ gen_split (split)
   /* Call `gen_sequence' to make a SEQUENCE out of all the
      insns emitted within this gen_... function.  */
 
-  printf (" _done:\n");
   printf ("  _val = gen_sequence ();\n");
-  printf (" _fail:\n");
   printf ("  end_sequence ();\n");
   printf ("  return _val;\n}\n\n");
 }
@@ -741,7 +751,7 @@ main (argc, argv)
 from the machine description file `md'.  */\n\n");
 
   printf ("#include \"config.h\"\n");
-  printf ("#include <stdio.h>\n");
+  printf ("#include \"system.h\"\n");
   printf ("#include \"rtl.h\"\n");
   printf ("#include \"expr.h\"\n");
   printf ("#include \"real.h\"\n");
@@ -753,8 +763,8 @@ from the machine description file `md'.  */\n\n");
   printf ("extern char *insn_operand_constraint[][MAX_RECOG_OPERANDS];\n\n");
   printf ("extern rtx recog_operand[];\n");
   printf ("#define operands emit_operand\n\n");
-  printf ("#define FAIL goto _fail\n\n");
-  printf ("#define DONE goto _done\n\n");
+  printf ("#define FAIL do {end_sequence (); return _val;} while (0)\n");
+  printf ("#define DONE do {_val = gen_sequence (); end_sequence (); return _val;} while (0)\n");
 
   /* Read the machine description.  */