make inline model use static when inlining.

This commit is contained in:
Michael Meissner 1995-11-14 11:25:34 +00:00
parent fe439e0f18
commit f35df46cc3
3 changed files with 17 additions and 7 deletions

View File

@ -4,10 +4,13 @@ Tue Nov 14 04:47:25 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* 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.

View File

@ -3079,6 +3079,10 @@ gen_model_h(insn_table *table, lf *file)
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) {
@ -3146,10 +3150,10 @@ gen_model_h(insn_table *table, lf *file)
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");
@ -3253,7 +3257,7 @@ gen_model_c(insn_table *table, lf *file)
}
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);
@ -3293,7 +3297,7 @@ gen_model_c(insn_table *table, lf *file)
}
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);
@ -3318,7 +3322,7 @@ gen_model_c(insn_table *table, lf *file)
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);

View File

@ -68,6 +68,7 @@
#else
#define INLINE_MODEL static
#endif
#define STATIC_MODEL static
#endif
#if BITS_INLINE
@ -141,6 +142,7 @@
#else
#define INLINE_SEMANTICS static
#endif
#define STATIC_SEMANTICS static
#endif
#if IDECODE_INLINE
@ -149,6 +151,7 @@
#else
#define INLINE_IDECODE static
#endif
#define STATIC_IDECODE static
#endif
#if FUNCTION_UNIT_INLINE