aboutsummaryrefslogtreecommitdiff
path: root/sim/m68hc11/m68hc11_sim.c
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2003-08-08 21:02:24 +0000
committerStephane Carrez <stcarrez@nerim.fr>2003-08-08 21:02:24 +0000
commita685700c57ecf2f851094e8861e8b71a6b153058 (patch)
tree1cc52fc2e37ba0f7a8f81aa892b8315afd44fdf6 /sim/m68hc11/m68hc11_sim.c
parent77342e5ecc0d04f03bd7d8e48f2a1ce3a7ddbdd8 (diff)
downloadgdb-a685700c57ecf2f851094e8861e8b71a6b153058.zip
gdb-a685700c57ecf2f851094e8861e8b71a6b153058.tar.gz
gdb-a685700c57ecf2f851094e8861e8b71a6b153058.tar.bz2
* dv-m68hc11tim.c (cycle_to_string): Add flags parameter to better
control the translation. (m68hc11tim_print_timer): Update cycle_to_string conversion. (m68hc11tim_timer_event): Fix handling of output compare register with its interrupts. (m68hc11tim_io_write_buffer): Check output compare after setting M6811_TMSK1. (m68hc11tim_io_read_buffer): Fix compilation warning. * dv-m68hc11.c (m68hc11_option_handler): Likewise. * dv-m68hc11spi.c (m68hc11spi_info): Likewise. * dv-m68hc11sio.c (m68hc11sio_info): Likewise. * interrupts.c (interrupts_info): Likewise. (interrupts_reset): Recognize bootstrap mode. * sim-main.h (PRINT_CYCLE, PRINT_TIME): New defines. (_sim_cpu): Add cpu_start_mode. (cycle_to_string): Add flags member. * m68hc11_sim.c (OPTION_CPU_BOOTSTRAP): New option. (cpu_options): Declare new option bootstrap. (cpu_option_handler): Handle it. (cpu_info): Update call to cycle_to_string.
Diffstat (limited to 'sim/m68hc11/m68hc11_sim.c')
-rw-r--r--sim/m68hc11/m68hc11_sim.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sim/m68hc11/m68hc11_sim.c b/sim/m68hc11/m68hc11_sim.c
index 1daa39c..444147b 100644
--- a/sim/m68hc11/m68hc11_sim.c
+++ b/sim/m68hc11/m68hc11_sim.c
@@ -27,6 +27,7 @@ enum {
OPTION_CPU_RESET = OPTION_START,
OPTION_EMUL_OS,
OPTION_CPU_CONFIG,
+ OPTION_CPU_BOOTSTRAP,
OPTION_CPU_MODE
};
@@ -46,6 +47,10 @@ static const OPTION cpu_options[] =
'\0', NULL, "Specify the initial CPU configuration register",
cpu_option_handler },
+ { {"bootstrap", no_argument, NULL, OPTION_CPU_BOOTSTRAP },
+ '\0', NULL, "Start the processing in bootstrap mode",
+ cpu_option_handler },
+
{ {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL }
};
@@ -77,7 +82,11 @@ cpu_option_handler (SIM_DESC sd, sim_cpu *cpu,
else
cpu->cpu_use_local_config = 0;
break;
-
+
+ case OPTION_CPU_BOOTSTRAP:
+ cpu->cpu_start_mode = "bootstrap";
+ break;
+
case OPTION_CPU_MODE:
break;
}
@@ -1049,7 +1058,8 @@ cpu_info (SIM_DESC sd, sim_cpu *cpu)
{
sim_io_printf (sd, "CPU info:\n");
sim_io_printf (sd, " Absolute cycle: %s\n",
- cycle_to_string (cpu, cpu->cpu_absolute_cycle));
+ cycle_to_string (cpu, cpu->cpu_absolute_cycle,
+ PRINT_TIME | PRINT_CYCLE));
sim_io_printf (sd, " Syscall emulation: %s\n",
cpu->cpu_emul_syscall ? "yes, via 0xcd <n>" : "no");