* igen.c (gen_model_h): Use correct variable in loop.
(gen_model_c): Use strcmp, strcasecmp.
+ (gen_model_{c,h}): Use STATIC_MODEL for arrays.
(lf_print_c_semantic_function_header): Delete unused function.
* main.c (cpu.h): Include cpu.h to get model.h.
+ * inline.h (STATIC_MODEL): Define.
+
Mon Nov 13 09:14:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* igen.c ({insn,model}_table_fields): Spell mnemonic correctly.
lf_printf(file, "#define STATIC_INLINE_MODEL STATIC_INLINE\n");
lf_printf(file, "#endif\n");
lf_printf(file, "\n");
+ lf_printf(file, "#ifndef STATIC_MODEL\n");
+ lf_printf(file, "#define STATIC_MODEL\n");
+ lf_printf(file, "#endif\n");
+ lf_printf(file, "\n");
lf_printf(file, "\n");
if (table->max_func_unit_mask > 0xffff) {
lf_printf(file, "\n");
}
- lf_printf(file, "extern model_enum current_model;\n");
- lf_printf(file, "extern const char *model_name[ (int)nr_models ];\n");
- lf_printf(file, "extern const char *const *const model_func_unit_name[ (int)nr_models ];\n");
- lf_printf(file, "extern const model_time *const model_time_mapping[ (int)nr_models ];\n");
+ lf_printf(file, "STATIC_MODEL model_enum current_model;\n");
+ lf_printf(file, "STATIC_MODEL const char *model_name[ (int)nr_models ];\n");
+ lf_printf(file, "STATIC_MODEL const char *const *const model_func_unit_name[ (int)nr_models ];\n");
+ lf_printf(file, "STATIC_MODEL const model_time *const model_time_mapping[ (int)nr_models ];\n");
lf_printf(file, "\n");
lf_printf(file, "INLINE_MODEL void model_set\n");
lf_printf(file, "(const char *name);\n");
}
lf_printf(file, "/* map model enumeration into printable string */\n");
- lf_printf(file, "const char *model_name[ (int)nr_models ] = {\n");
+ lf_printf(file, "STATIC_MODEL const char *model_name[ (int)nr_models ] = {\n");
lf_printf(file, " \"NONE\",\n");
for (model_ptr = models; model_ptr; model_ptr = model_ptr->next) {
lf_printf(file, " \"%s\",\n", model_ptr->printable_name);
}
lf_printf(file, "/* Array to map model,function unit number to printable string. */\n");
- lf_printf(file, "const char *const *const model_func_unit_name[] = {\n");
+ lf_printf(file, "STATIC_MODEL const char *const *const model_func_unit_name[] = {\n");
lf_printf(file, " model_func_unit_name_NONE,\n");
for(model_ptr = models; model_ptr; model_ptr = model_ptr->next) {
lf_printf(file, " model_func_unit_name_%s,\n", model_ptr->name);
lf_printf(file, "\f\n");
}
- lf_printf(file, "const model_time *const model_time_mapping[ (int)nr_models ] = {\n");
+ lf_printf(file, "STATIC_MODEL const model_time *const model_time_mapping[ (int)nr_models ] = {\n");
lf_printf(file, " (const model_time *const)0,\n");
for(model_ptr = models; model_ptr; model_ptr = model_ptr->next) {
lf_printf(file, " model_time_%s,\n", model_ptr->name);