aboutsummaryrefslogtreecommitdiff
path: root/sim/igen/igen.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-09-15 22:40:14 +0000
committerAndrew Cagney <cagney@redhat.com>1997-09-15 22:40:14 +0000
commit0604253676dae7f100d569f89b3273a91bb87849 (patch)
treea550d01b3d9fb7f4d2583093d0576477658accc9 /sim/igen/igen.c
parent3836d0f309016dd3f916073fb7760ef6a9745f32 (diff)
downloadgdb-0604253676dae7f100d569f89b3273a91bb87849.zip
gdb-0604253676dae7f100d569f89b3273a91bb87849.tar.gz
gdb-0604253676dae7f100d569f89b3273a91bb87849.tar.bz2
* igen.c (gen_run_c): Handle non-multi-sim case.
Diffstat (limited to 'sim/igen/igen.c')
-rw-r--r--sim/igen/igen.c56
1 files changed, 34 insertions, 22 deletions
diff --git a/sim/igen/igen.c b/sim/igen/igen.c
index ae2d0ec..f836d64 100644
--- a/sim/igen/igen.c
+++ b/sim/igen/igen.c
@@ -854,41 +854,53 @@ gen_run_c (lf *file,
lf_printf (file, " int siggnal)\n");
lf_printf (file, "{\n");
lf_indent (file, +2);
- lf_printf (file, "int mach;\n");
- lf_printf (file, "if (STATE_ARCHITECTURE (sd) == NULL)\n");
- lf_printf (file, " mach = 0;\n");
- lf_printf (file, "else\n");
- lf_printf (file, " mach = STATE_ARCHITECTURE (sd)->mach;\n");
- lf_printf (file, "switch (mach)\n");
- lf_printf (file, " {\n");
- lf_indent (file, +2);
- for (entry = gen->tables; entry != NULL; entry = entry->next)
+ if (options.gen.multi_sim)
{
- lf_printf (file, "case bfd_mach_%s:\n", entry->processor);
+ lf_printf (file, "int mach;\n");
+ lf_printf (file, "if (STATE_ARCHITECTURE (sd) == NULL)\n");
+ lf_printf (file, " mach = 0;\n");
+ lf_printf (file, "else\n");
+ lf_printf (file, " mach = STATE_ARCHITECTURE (sd)->mach;\n");
+ lf_printf (file, "switch (mach)\n");
+ lf_printf (file, " {\n");
+ lf_indent (file, +2);
+ for (entry = gen->tables; entry != NULL; entry = entry->next)
+ {
+ lf_printf (file, "case bfd_mach_%s:\n", entry->processor);
+ lf_indent (file, +2);
+ print_function_name (file,
+ "run",
+ NULL, /* format name */
+ entry->processor,
+ NULL, /* expanded bits */
+ function_name_prefix_engine);
+ lf_printf (file, " (sd, next_cpu_nr, siggnal);\n");
+ lf_printf (file, "break;\n");
+ lf_indent (file, -2);
+ }
+ lf_printf (file, "default:\n");
lf_indent (file, +2);
+ lf_printf (file, "sim_engine_abort (sd, NULL, NULL_CIA,\n");
+ lf_printf (file, " \"sim_engine_run - unknown machine\");\n");
+ lf_printf (file, "break;\n");
+ lf_indent (file, -2);
+ lf_indent (file, -2);
+ lf_printf (file, " }\n");
+ }
+ else
+ {
print_function_name (file,
"run",
NULL, /* format name */
- entry->processor,
+ NULL, /* NO processor */
NULL, /* expanded bits */
function_name_prefix_engine);
lf_printf (file, " (sd, next_cpu_nr, siggnal);\n");
- lf_printf (file, "break;\n");
- lf_indent (file, -2);
}
- lf_printf (file, "default:\n");
- lf_indent (file, +2);
- lf_printf (file, "sim_engine_abort (sd, NULL, NULL_CIA,\n");
- lf_printf (file, " \"sim_engine_run - unknown machine\");\n");
- lf_printf (file, "break;\n");
- lf_indent (file, -2);
- lf_indent (file, -2);
- lf_printf (file, " }\n");
lf_indent (file, -2);
lf_printf (file, "}\n");
}
-
/****************************************************************/
static gen_table *