HOST_RTL = $(HOST_PREFIX)rtl.o $(HOST_PREFIX)bitmap.o
HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
HOST_PRINT = $(HOST_PREFIX)print-rtl.o
+HOST_ERRORS = $(HOST_PREFIX)errors.o
# Specify the directories to be searched for header files.
# Both . and srcdir are used, in that order,
print-rtl.o : print-rtl.c $(CONFIG_H) system.h $(RTL_H) bitmap.h basic-block.h
rtlanal.o : rtlanal.c $(CONFIG_H) system.h $(RTL_H)
+errors.o : errors.c $(CONFIG_H) system.h errors.h
varasm.o : varasm.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) flags.h \
function.h defaults.h $(EXPR_H) hard-reg-set.h $(REGS_H) \
$(MD_CPP) $(MD_CPPFLAGS) $(md_file) | sed 's/^# /; /g' > tmp-$@
mv tmp-$@ $@
-genconfig : genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
+genconfig : genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
- genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
+ genconfig.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS)
-genconfig.o : genconfig.c $(RTL_H) $(build_xm_file) system.h
+genconfig.o : genconfig.c $(RTL_H) $(build_xm_file) system.h errors.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c
-genflags : genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
+genflags : genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
- genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
+ genflags.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS)
-genflags.o : genflags.c $(RTL_H) $(build_xm_file) system.h
+genflags.o : genflags.c $(RTL_H) $(build_xm_file) system.h errors.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c
-gencodes : gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
+gencodes : gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
- gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
+ gencodes.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS)
-gencodes.o : gencodes.c $(RTL_H) $(build_xm_file) system.h
+gencodes.o : gencodes.c $(RTL_H) $(build_xm_file) system.h errors.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c
-genemit : genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
+genemit : genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
- genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
+ genemit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS)
-genemit.o : genemit.c $(RTL_H) $(build_xm_file) system.h
+genemit.o : genemit.c $(RTL_H) $(build_xm_file) system.h errors.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c
-genopinit : genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
+genopinit : genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
- genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
+ genopinit.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS)
-genopinit.o : genopinit.c $(RTL_H) $(build_xm_file) system.h
+genopinit.o : genopinit.c $(RTL_H) $(build_xm_file) system.h errors.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c
-genrecog : genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
+genrecog : genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
- genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
+ genrecog.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS)
-genrecog.o : genrecog.c $(RTL_H) $(build_xm_file) system.h
+genrecog.o : genrecog.c $(RTL_H) $(build_xm_file) system.h errors.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c
-genextract : genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
+genextract : genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
- genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
+ genextract.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS)
-genextract.o : genextract.c $(RTL_H) $(build_xm_file) system.h insn-config.h
+genextract.o : genextract.c $(RTL_H) $(build_xm_file) system.h insn-config.h errors.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c
-genpeep : genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
+genpeep : genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
- genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
+ genpeep.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS)
-genpeep.o : genpeep.c $(RTL_H) $(build_xm_file) system.h
+genpeep.o : genpeep.c $(RTL_H) $(build_xm_file) system.h errors.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c
-genattr : genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
+genattr : genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
- genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
+ genattr.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS)
-genattr.o : genattr.c $(RTL_H) $(build_xm_file) system.h
+genattr.o : genattr.c $(RTL_H) $(build_xm_file) system.h errors.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c
-genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
+genattrtab : genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_RTLANAL) $(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
- genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
+ genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_RTLANAL) $(HOST_LIBS)
-genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) system.h insn-config.h
+genattrtab.o : genattrtab.c $(RTL_H) $(build_xm_file) system.h insn-config.h errors.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c
-genoutput : genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBDEPS)
+genoutput : genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBDEPS)
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ \
- genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_LIBS)
+ genoutput.o $(HOST_RTL) $(HOST_PRINT) $(HOST_ERRORS) $(HOST_LIBS)
-genoutput.o : genoutput.c $(RTL_H) $(build_xm_file) system.h
+genoutput.o : genoutput.c $(RTL_H) $(build_xm_file) system.h errors.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c
gengenrtl : gengenrtl.o $(HOST_LIBDEPS)
sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
+$(HOST_PREFIX_1)errors.o: errors.c
+ rm -f $(HOST_PREFIX)errors.c
+ sed -e 's/config[.]h/hconfig.h/' $(srcdir)/errors.c > $(HOST_PREFIX)errors.c
+ $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)errors.c
+
+
# This satisfies the dependency that we get if you cross-compile a compiler
# that does not need to compile alloca, malloc or whatever.
$(HOST_PREFIX_1):
--- /dev/null
+/* Basic error reporting routines.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* warning, error, and fatal. These definitions are suitable for use
+ in the generator programs; eventually we would like to use them in
+ cc1 too, but that's a longer term project. */
+
+#include "config.h"
+#include "system.h"
+#include "errors.h"
+
+/* Set this to argv[0] at the beginning of main. */
+
+const char *progname;
+
+/* Starts out 0, set to 1 if error is called. */
+
+int have_error = 0;
+
+/* Print a warning message - output produced, but there may be problems. */
+
+void
+warning VPROTO ((const char *format, ...))
+{
+#ifndef ANSI_PROTOTYPES
+ const char *format;
+#endif
+ va_list ap;
+
+ VA_START (ap, format);
+
+#ifndef ANSI_PROTOTYPES
+ format = va_arg (ap, const char *);
+#endif
+
+ fprintf (stderr, "%s: warning: ", progname);
+ vfprintf (stderr, format, ap);
+ va_end (ap);
+ fputc('\n', stderr);
+}
+
+
+/* Print an error message - we keep going but the output is unusable. */
+
+void
+error VPROTO ((const char *format, ...))
+{
+#ifndef ANSI_PROTOTYPES
+ const char *format;
+#endif
+ va_list ap;
+
+ VA_START (ap, format);
+
+#ifndef ANSI_PROTOTYPES
+ format = va_arg (ap, const char *);
+#endif
+
+ fprintf (stderr, "%s: ", progname);
+ vfprintf (stderr, format, ap);
+ va_end (ap);
+ fputc('\n', stderr);
+
+ have_error = 1;
+}
+
+
+/* Fatal error - terminate execution immediately. Does not return. */
+
+void
+fatal VPROTO ((const char *format, ...))
+{
+#ifndef ANSI_PROTOTYPES
+ const char *format;
+#endif
+ va_list ap;
+
+ VA_START (ap, format);
+
+#ifndef ANSI_PROTOTYPES
+ format = va_arg (ap, const char *);
+#endif
+
+ fprintf (stderr, "%s: ", progname);
+ vfprintf (stderr, format, ap);
+ va_end (ap);
+ fputc('\n', stderr);
+ exit (FATAL_EXIT_CODE);
+}
--- /dev/null
+/* Basic error reporting routines.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* warning, error, and fatal. These definitions are suitable for use
+ in the generator programs; eventually we would like to use them in
+ cc1 too, but that's a longer term project. */
+
+#ifndef __GCC_ERRORS_H__
+#define __GCC_ERRORS_H__
+
+void warning PVPROTO ((const char *format, ...)) ATTRIBUTE_PRINTF_1;
+void error PVPROTO ((const char *format, ...)) ATTRIBUTE_PRINTF_1;
+void fatal PVPROTO ((const char *format, ...))
+ ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+
+extern int have_error;
+extern const char *progname;
+
+#endif
#include "system.h"
#include "rtl.h"
#include "obstack.h"
+#include "errors.h"
static struct obstack obstack;
struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-void fatal PVPROTO ((const char *, ...))
- ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
char **insn_name_ptr = 0;
return ptr;
}
-void
-fatal VPROTO ((const char *format, ...))
-{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- fprintf (stderr, "genattr: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
- exit (FATAL_EXIT_CODE);
-}
-
int
main (argc, argv)
int argc;
init_range (&all_issue_delay);
init_range (&all_blockage);
+ progname = "genattr";
obstack_init (rtl_obstack);
if (argc <= 1)
/* We must include obstack.h after <sys/time.h>, to avoid lossage with
/usr/include/sys/stdtypes.h on Sun OS 4.x. */
#include "obstack.h"
+#include "errors.h"
static struct obstack obstack, obstack1, obstack2;
struct obstack *rtl_obstack = &obstack;
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
char **insn_name_ptr = 0;
-void fatal PVPROTO ((const char *, ...))
- ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-
/* enough space to reserve for printing out ints */
#define MAX_DIGITS (HOST_BITS_PER_INT * 3 / 10 + 3)
#endif
}
-void
-fatal VPROTO ((const char *format, ...))
-{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- fprintf (stderr, "genattrtab: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
- exit (FATAL_EXIT_CODE);
-}
-
/* Determine if an insn has a constant number of delay slots, i.e., the
number of delay slots is not a function of the length of the insn. */
}
#endif
+ progname = "genattrtab";
obstack_init (rtl_obstack);
obstack_init (hash_obstack);
obstack_init (temp_obstack);
#include "system.h"
#include "rtl.h"
#include "obstack.h"
+#include "errors.h"
static struct obstack obstack;
struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-void fatal PVPROTO ((const char *, ...))
- ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
char **insn_name_ptr = 0;
return ptr;
}
-void
-fatal VPROTO ((const char *format, ...))
-{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- fprintf (stderr, "gencodes: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
- exit (FATAL_EXIT_CODE);
-}
-
int
main (argc, argv)
int argc;
FILE *infile;
register int c;
+ progname = "gencodes";
obstack_init (rtl_obstack);
if (argc <= 1)
#include "system.h"
#include "rtl.h"
#include "obstack.h"
+#include "errors.h"
static struct obstack obstack;
struct obstack *rtl_obstack = &obstack;
static int clobbers_seen_this_insn;
static int dup_operands_seen_this_insn;
-void fatal PVPROTO ((const char *, ...))
- ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-
static void walk_insn_part PROTO((rtx, int, int));
static void gen_insn PROTO((rtx));
static void gen_expand PROTO((rtx));
return ptr;
}
-void
-fatal VPROTO ((const char *format, ...))
-{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- fprintf (stderr, "genconfig: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
- exit (FATAL_EXIT_CODE);
-}
-
int
main (argc, argv)
int argc;
FILE *infile;
register int c;
+ progname = "genconfig";
obstack_init (rtl_obstack);
if (argc <= 1)
#include "system.h"
#include "rtl.h"
#include "obstack.h"
+#include "errors.h"
static struct obstack obstack;
struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-void fatal PVPROTO ((const char *, ...))
- ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
char **insn_name_ptr = 0;
return ptr;
}
-void
-fatal VPROTO ((const char *format, ...))
-{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- fprintf (stderr, "genemit: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
- exit (FATAL_EXIT_CODE);
-}
-
int
main (argc, argv)
int argc;
FILE *infile;
register int c;
+ progname = "genemit";
obstack_init (rtl_obstack);
if (argc <= 1)
#include "system.h"
#include "rtl.h"
#include "obstack.h"
+#include "errors.h"
#include "insn-config.h"
static struct obstack obstack;
static void gen_insn PROTO ((rtx));
static void walk_rtx PROTO ((rtx, const char *));
static void print_path PROTO ((char *));
-void fatal PVPROTO ((const char *, ...))
- ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-\f
+
static void
gen_insn (insn)
rtx insn;
return ptr;
}
-void
-fatal VPROTO ((const char *format, ...))
-{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- fprintf (stderr, "genextract: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
- exit (FATAL_EXIT_CODE);
-}
-
char *
xstrdup (input)
const char *input;
struct extraction *p;
struct code_ptr *link;
+ progname = "genextract";
obstack_init (rtl_obstack);
if (argc <= 1)
#include "system.h"
#include "rtl.h"
#include "obstack.h"
+#include "errors.h"
static struct obstack obstack;
struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-void fatal PVPROTO ((const char *, ...))
- ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-
/* Names for patterns. Need to allow linking with print-rtl. */
char **insn_name_ptr;
return ptr;
}
-void
-fatal VPROTO ((const char *format, ...))
-{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- fprintf (stderr, "genflags: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
- exit (FATAL_EXIT_CODE);
-}
-
int
main (argc, argv)
int argc;
FILE *infile;
register int c;
+ progname = "genflags";
obstack_init (rtl_obstack);
obstack_init (&call_obstack);
obstack_init (&normal_obstack);
#include "system.h"
#include "rtl.h"
#include "obstack.h"
+#include "errors.h"
static struct obstack obstack;
struct obstack *rtl_obstack = &obstack;
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-void fatal PVPROTO ((const char *, ...))
- ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-
/* Many parts of GCC use arrays that are indexed by machine mode and
contain the insn codes for pattern in the MD file that perform a given
operation on operands of that mode.
return ptr;
}
-void
-fatal VPROTO ((const char *format, ...))
-{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- fprintf (stderr, "genopinit: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
- exit (FATAL_EXIT_CODE);
-}
-
int
main (argc, argv)
int argc;
FILE *infile;
register int c;
+ progname = "genopinit";
obstack_init (rtl_obstack);
if (argc <= 1)
#include "system.h"
#include "rtl.h"
#include "obstack.h"
+#include "errors.h"
/* No instruction can have more operands than this.
Sorry for this arbitrary limit, but what machine will
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
-void fatal PVPROTO ((const char *, ...))
- ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-static void error PVPROTO ((const char *, ...)) ATTRIBUTE_PRINTF_1;
static int n_occurrences PROTO((int, char *));
/* Define this so we can link with print-rtl.o to get debug_rtx function. */
return ptr;
}
-void
-fatal VPROTO ((const char *format, ...))
-{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- fprintf (stderr, "genoutput: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
- exit (FATAL_EXIT_CODE);
-}
-
-static void
-error VPROTO ((const char *format, ...))
-{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- fprintf (stderr, "genoutput: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
-
- have_error = 1;
-}
-\f
int
main (argc, argv)
int argc;
FILE *infile;
register int c;
+ progname = "genoutput";
obstack_init (rtl_obstack);
if (argc <= 1)
#include "system.h"
#include "rtl.h"
#include "obstack.h"
+#include "errors.h"
static struct obstack obstack;
struct obstack *rtl_obstack = &obstack;
int vecelt;
};
-void fatal PVPROTO ((const char *, ...))
- ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-
static int max_opno;
/* Number of operands used in current peephole definition. */
return ptr;
}
-void
-fatal VPROTO ((const char *format, ...))
-{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- fprintf (stderr, "genpeep: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
- exit (FATAL_EXIT_CODE);
-}
-
int
main (argc, argv)
int argc;
max_opno = -1;
+ progname = "genpeep";
obstack_init (rtl_obstack);
if (argc <= 1)
#include "system.h"
#include "rtl.h"
#include "obstack.h"
+#include "errors.h"
#define OUTPUT_LABEL(INDENT_STRING, LABEL_NUMBER) \
printf("%sL%d: ATTRIBUTE_UNUSED_LABEL\n", (INDENT_STRING), (LABEL_NUMBER))
struct decision *, int,
enum routine_type));
static void change_state PROTO((const char *, const char *, int));
-void fatal PVPROTO((const char *, ...))
- ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
-\f
+
/* Construct and return a sequence of decisions
that will recognize INSN.
return val;
}
-void
-fatal VPROTO ((const char *format, ...))
-{
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- va_list ap;
-
- VA_START (ap, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (ap, const char *);
-#endif
-
- fprintf (stderr, "genrecog: ");
- vfprintf (stderr, format, ap);
- va_end (ap);
- fprintf (stderr, "\n");
- fprintf (stderr, "after %d definitions\n", next_index);
- exit (FATAL_EXIT_CODE);
-}
-
int
main (argc, argv)
int argc;
FILE *infile;
register int c;
+ progname = "genrecog";
obstack_init (rtl_obstack);
recog_tree.first = recog_tree.last = split_tree.first = split_tree.last = 0;