#include "hconfig.h"
#include "system.h"
#include "rtl.h"
-#include "obstack.h"
#include "errors.h"
#include "insn-config.h"
#include "gensupport.h"
-static struct obstack obstack;
-struct obstack *rtl_obstack = &obstack;
-
-#define obstack_chunk_alloc xmalloc
-#define obstack_chunk_free free
/* This structure contains all the information needed to describe one
set of extractions methods. Each method may be used by more than
}
}
\f
-PTR
-xmalloc (size)
- size_t size;
-{
- register PTR val = (PTR) malloc (size);
-
- if (val == 0)
- fatal ("virtual memory exhausted");
- return val;
-}
-
-PTR
-xrealloc (old, size)
- PTR old;
- size_t size;
-{
- register PTR ptr;
- if (old)
- ptr = (PTR) realloc (old, size);
- else
- ptr = (PTR) malloc (size);
- if (!ptr)
- fatal ("virtual memory exhausted");
- return ptr;
-}
-
-char *
-xstrdup (input)
- const char *input;
-{
- register size_t len = strlen (input) + 1;
- register char *output = xmalloc (len);
- memcpy (output, input, len);
- return output;
-}
-\f
extern int main PARAMS ((int, char **));
int
const char *name;
progname = "genextract";
- obstack_init (rtl_obstack);
if (argc <= 1)
fatal ("No input file name.");