diff options
author | Stephane Carrez <stcarrez@nerim.fr> | 2000-09-09 21:00:39 +0000 |
---|---|---|
committer | Stephane Carrez <stcarrez@nerim.fr> | 2000-09-09 21:00:39 +0000 |
commit | 2990a9f484ce9ff796d68d6fbfdad7e8a2ea61b8 (patch) | |
tree | 09dfb90559e80e00bd1648861408345259b1e1d4 /sim/m68hc11/interrupts.c | |
parent | c488923f169eed9ac1f7cb8e7d15e53eee97681d (diff) | |
download | fsf-binutils-gdb-2990a9f484ce9ff796d68d6fbfdad7e8a2ea61b8.zip fsf-binutils-gdb-2990a9f484ce9ff796d68d6fbfdad7e8a2ea61b8.tar.gz fsf-binutils-gdb-2990a9f484ce9ff796d68d6fbfdad7e8a2ea61b8.tar.bz2 |
* sim-main.h: Define cycle_to_string.
* dv-m68hc11tim.c (cycle_to_string): New function to translate
the cpu cycle into some formatted time string.
(m68hc11tim_print_timer): Use it.
* dv-m68hc11sio.c (m68hc11sio_info): Use cycle_to_string.
* dv-m68hc11spi.c (m68hc11spi_info): Likewise.
* interrupts.c (interrupts_info): Likewise.
* m68hc11_sim.c (cpu_info): Likewise.
Diffstat (limited to 'sim/m68hc11/interrupts.c')
-rw-r--r-- | sim/m68hc11/interrupts.c | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/sim/m68hc11/interrupts.c b/sim/m68hc11/interrupts.c index f172276..655c400 100644 --- a/sim/m68hc11/interrupts.c +++ b/sim/m68hc11/interrupts.c @@ -262,9 +262,11 @@ interrupts_raise (struct interrupts *interrupts, enum M6811_INT number) void interrupts_info (SIM_DESC sd, struct interrupts *interrupts) { + signed64 t; + if (interrupts->start_mask_cycle >= 0) { - signed64 t = cpu_current_cycle (interrupts->cpu); + t = cpu_current_cycle (interrupts->cpu); t -= interrupts->start_mask_cycle; if (t > interrupts->max_mask_cycles) @@ -272,7 +274,7 @@ interrupts_info (SIM_DESC sd, struct interrupts *interrupts) } if (interrupts->xirq_start_mask_cycle >= 0) { - signed64 t = cpu_current_cycle (interrupts->cpu); + t = cpu_current_cycle (interrupts->cpu); t -= interrupts->xirq_start_mask_cycle; if (t > interrupts->xirq_max_mask_cycles) @@ -282,16 +284,24 @@ interrupts_info (SIM_DESC sd, struct interrupts *interrupts) sim_io_printf (sd, "Interrupts Info:\n"); sim_io_printf (sd, " Interrupts raised: %lu\n", interrupts->nb_interrupts_raised); - sim_io_printf (sd, " Min interrupts masked sequence: %llu cycles\n", - interrupts->min_mask_cycles == CYCLES_MAX ? - interrupts->max_mask_cycles : - interrupts->min_mask_cycles); - sim_io_printf (sd, " Max interrupts masked sequence: %llu cycles\n", - interrupts->max_mask_cycles); - sim_io_printf (sd, " XIRQ Min interrupts masked sequence: %llu cycles\n", - interrupts->xirq_min_mask_cycles == CYCLES_MAX ? - interrupts->xirq_max_mask_cycles : - interrupts->xirq_min_mask_cycles); - sim_io_printf (sd, " XIRQ Max interrupts masked sequence: %llu cycles\n", - interrupts->xirq_max_mask_cycles); + + t = interrupts->min_mask_cycles == CYCLES_MAX ? + interrupts->max_mask_cycles : + interrupts->min_mask_cycles; + sim_io_printf (sd, " Shortest interrupts masked sequence: %s\n", + cycle_to_string (interrupts->cpu, t)); + + t = interrupts->max_mask_cycles; + sim_io_printf (sd, " Longest interrupts masked sequence: %s\n", + cycle_to_string (interrupts->cpu, t)); + + t = interrupts->xirq_min_mask_cycles == CYCLES_MAX ? + interrupts->xirq_max_mask_cycles : + interrupts->xirq_min_mask_cycles; + sim_io_printf (sd, " XIRQ Min interrupts masked sequence: %s\n", + cycle_to_string (interrupts->cpu, t)); + + t = interrupts->xirq_max_mask_cycles; + sim_io_printf (sd, " XIRQ Max interrupts masked sequence: %s\n", + cycle_to_string (interrupts->cpu, t)); } |