/* Process source files and output type information.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GCC.
return v;
}
+/* Return an options structure with name NAME and info INFO. */
+options_p
+create_option (const char *name, void *info)
+{
+ options_p o = xmalloc (sizeof (*o));
+ o->name = name;
+ o->info = info;
+ return o;
+}
+
/* Add a variable named S of type T with options O defined at POS,
to `variables'. */
oprintf (f, " 0,\n");
else
oprintf (f,
- " offsetof (struct rtx_def, fld) + %d * sizeof (rtunion),\n",
+ " RTX_HDR_SIZE + %d * sizeof (rtunion),\n",
rtx_next_new[i]);
oprintf (f, "};\n");
}
#undef DEF_RTL_EXPR
};
- if (t->kind != TYPE_ARRAY)
+ if (t->kind != TYPE_UNION)
{
error_at_line (&lexer_line,
- "special `rtx_def' must be applied to an array");
+ "special `rtx_def' must be applied to a union");
return &string_type;
}
break;
case NOTE_INSN_EXPECTED_VALUE:
+ case NOTE_INSN_VAR_LOCATION:
note_flds->name = "rtx";
note_flds->type = rtx_tp;
break;
subfields = xmalloc (sizeof (*subfields));
subfields->next = old_subf;
subfields->type = t;
- subfields->name = xasprintf ("[%lu].%s", (unsigned long)aindex,
+ subfields->name = xasprintf (".fld[%lu].%s", (unsigned long)aindex,
subname);
subfields->line.file = __FILE__;
subfields->line.line = __LINE__;
/* The output header file that is included into pretty much every
source file. */
-outf_p header_file;
+static outf_p header_file;
/* Number of files specified in gtfiles. */
#define NUM_GT_FILES (ARRAY_SIZE (all_files) - 1)
{
/* The order of files here matters very much. */
static const char *const ifiles [] = {
- "config.h", "system.h", "coretypes.h", "tm.h", "varray.h",
+ "config.h", "system.h", "coretypes.h", "tm.h", "varray.h",
"hashtab.h", "splay-tree.h", "bitmap.h", "tree.h", "rtl.h",
"function.h", "insn-config.h", "expr.h", "hard-reg-set.h",
- "basic-block.h", "cselib.h", "insn-addr.h", "ssa.h", "optabs.h",
+ "basic-block.h", "cselib.h", "insn-addr.h", "optabs.h",
"libfuncs.h", "debug.h", "ggc.h", "cgraph.h",
+ "tree-alias-type.h", "tree-flow.h",
NULL
};
const char *const *ifp;
*/
static void
-write_func_for_structure (type_p orig_s, type_p s, type_p *param,
- const struct write_types_data *wtd)
+write_func_for_structure (type_p orig_s, type_p s, type_p *param,
+ const struct write_types_data *wtd)
{
const char *fn = s->u.s.line.file;
int i;
d.bitmap = s->u.s.bitmap;
d.param = param;
d.prev_val[0] = "*x";
- d.prev_val[1] = "not valid postage"; /* guarantee an error */
+ d.prev_val[1] = "not valid postage"; /* Guarantee an error. */
d.prev_val[3] = "x";
d.val = "(*x)";
d.bitmap = s->u.s.bitmap;
d.param = param;
d.prev_val[0] = d.prev_val[2] = "*x";
- d.prev_val[1] = "not valid postage"; /* guarantee an error */
+ d.prev_val[1] = "not valid postage"; /* Guarantee an error. */
d.prev_val[3] = "x";
d.val = "(*x)";
/* Write out the 'enum' definition for gt_types_enum. */
static void
-write_enum_defn (type_p structures, type_p param_structs)
+write_enum_defn (type_p structures, type_p param_structs)
{
type_p s;
do_scalar_typedef ("uint8", &pos);
do_scalar_typedef ("jword", &pos);
do_scalar_typedef ("JCF_u2", &pos);
+ do_scalar_typedef ("void", &pos);
+
+ do_typedef ("PTR", create_pointer (resolve_typedef ("void", &pos)), &pos);
- do_typedef ("PTR", create_pointer (create_scalar_type ("void",
- strlen ("void"))),
- &pos);
do_typedef ("HARD_REG_SET", create_array (
create_scalar_type ("unsigned long", strlen ("unsigned long")),
"2"), &pos);