It would not make an case in output_insn_hairy because the template
given in the entry is a constant (it does not start with `*'). */
\f
-#include <stdio.h>
#include "hconfig.h"
+#include "system.h"
#include "rtl.h"
#include "obstack.h"
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
/* No instruction can have more operands than this.
Sorry for this arbitrary limit, but what machine will
have an instruction with this many operands? */
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-#ifdef NEED_DECLARATION_FREE
-extern void free ();
-#endif
-extern rtx read_rtx ();
-
-char *xmalloc ();
-static void fatal ();
-void fancy_abort ();
-static void error ();
+char *xmalloc PROTO((unsigned));
+static void fatal PVPROTO ((char *, ...))
+ ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+void fancy_abort PROTO((void)) ATTRIBUTE_NORETURN;
+static void error PVPROTO ((char *, ...)) ATTRIBUTE_PRINTF_1;
static void mybcopy ();
static void mybzero ();
-static int n_occurrences ();
+static int n_occurrences PROTO((int, char *));
+
+/* Define this so we can link with print-rtl.o to get debug_rtx function. */
+char **insn_name_ptr = 0;
/* insns in the machine description are assigned sequential code numbers
that are used by insn-recog.c (produced by genrecog) to communicate
static int have_error;
\f
+static void output_prologue PROTO((void));
+static void output_epilogue PROTO((void));
+static void scan_operands PROTO((rtx, int, int));
+static void process_template PROTO((struct data *, char *));
+static void validate_insn_alternatives PROTO((struct data *));
+static void gen_insn PROTO((rtx));
+static void gen_peephole PROTO((rtx));
+static void gen_expand PROTO((rtx));
+static void gen_split PROTO((rtx));
+static int n_occurrences PROTO((int, char *));
+\f
static void
output_prologue ()
{
-
printf ("/* Generated automatically by the program `genoutput'\n\
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 \"flags.h\"\n");
printf ("#include \"rtl.h\"\n");
printf ("#include \"regs.h\"\n");
printf ("\nstatic char *\n");
printf ("output_%d (operands, insn)\n", d->code_number);
- printf (" rtx *operands;\n");
- printf (" rtx insn;\n");
+ printf (" rtx *operands ATTRIBUTE_UNUSED;\n");
+ printf (" rtx insn ATTRIBUTE_UNUSED;\n");
printf ("{\n");
/* If the assembler code template starts with a @ it is a newline-separated
}
static void
-fatal (s, a1, a2, a3, a4)
- char *s;
+fatal VPROTO ((char *format, ...))
{
+#ifndef __STDC__
+ char *format;
+#endif
+ va_list ap;
+
+ VA_START (ap, format);
+
+#ifndef __STDC__
+ format = va_arg (ap, char *);
+#endif
+
fprintf (stderr, "genoutput: ");
- fprintf (stderr, s, a1, a2, a3, a4);
+ vfprintf (stderr, format, ap);
+ va_end (ap);
fprintf (stderr, "\n");
exit (FATAL_EXIT_CODE);
}
}
static void
-error (s, a1, a2)
- char *s;
+error VPROTO ((char *format, ...))
{
+#ifndef __STDC__
+ char *format;
+#endif
+ va_list ap;
+
+ VA_START (ap, format);
+
+#ifndef __STDC__
+ format = va_arg (ap, char *);
+#endif
+
fprintf (stderr, "genoutput: ");
- fprintf (stderr, s, a1, a2);
+ vfprintf (stderr, format, ap);
+ va_end (ap);
fprintf (stderr, "\n");
have_error = 1;