aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1995-11-14 11:25:34 +0000
committerMichael Meissner <gnu@the-meissners.org>1995-11-14 11:25:34 +0000
commitf35df46cc3948dcdae7ba27e3fb623bb61ac2562 (patch)
tree95a4f37a769bf5da6bc2c6a3d54bc76a3de7ae3d
parentfe439e0f18af94a2cfb90193f2a71c679bc3e9f6 (diff)
downloadgdb-f35df46cc3948dcdae7ba27e3fb623bb61ac2562.zip
gdb-f35df46cc3948dcdae7ba27e3fb623bb61ac2562.tar.gz
gdb-f35df46cc3948dcdae7ba27e3fb623bb61ac2562.tar.bz2
make inline model use static when inlining.
-rw-r--r--sim/ppc/ChangeLog3
-rw-r--r--sim/ppc/igen.c18
-rw-r--r--sim/ppc/inline.h3
3 files changed, 17 insertions, 7 deletions
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index faeec3b..f0d8efa 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -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.
diff --git a/sim/ppc/igen.c b/sim/ppc/igen.c
index 38ec2fb..b22159e 100644
--- a/sim/ppc/igen.c
+++ b/sim/ppc/igen.c
@@ -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);
diff --git a/sim/ppc/inline.h b/sim/ppc/inline.h
index 51af04f..0c191f5 100644
--- a/sim/ppc/inline.h
+++ b/sim/ppc/inline.h
@@ -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