summaryrefslogtreecommitdiff
path: root/sim/m68hc11/dv-m68hc11sio.c
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2001-05-20 15:36:29 +0000
committerStephane Carrez <stcarrez@nerim.fr>2001-05-20 15:36:29 +0000
commit11115521f652c7a4c85fc326efc1ad6fae913e59 (patch)
tree70e9bdee565a958b693e867ae3bd8cc0ad898d33 /sim/m68hc11/dv-m68hc11sio.c
parentb4fa4770b8c2145ec040cb87ead3bd467cb4fa7b (diff)
* dv-m68hc11sio.c (m68hc11sio_tx_poll): Always check for
pending interrupts. * interrupts.c (interrupts_process): Keep track of the last number of masked insn cycles. (interrupts_initialize): Clear last number of masked insn cycles. (interrupts_info): Report them. (interrupts_update_pending): Compute clear and set masks of interrupts and clear the interrupt bits before setting them (due to SCI interrupt sharing). * interrupts.h (struct interrupts): New members last_mask_cycles and xirq_last_mask_cycles.
Diffstat (limited to 'sim/m68hc11/dv-m68hc11sio.c')
-rw-r--r--sim/m68hc11/dv-m68hc11sio.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sim/m68hc11/dv-m68hc11sio.c b/sim/m68hc11/dv-m68hc11sio.c
index 1f022c4bbe..ec7a46de50 100644
--- a/sim/m68hc11/dv-m68hc11sio.c
+++ b/sim/m68hc11/dv-m68hc11sio.c
@@ -1,5 +1,5 @@
/* dv-m68hc11sio.c -- Simulation of the 68HC11 serial device.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Stephane Carrez (stcarrez@worldnet.fr)
(From a driver model Contributed by Cygnus Solutions.)
@@ -320,7 +320,6 @@ m68hc11sio_tx_poll (struct hw *me, void *data)
SIM_DESC sd;
struct m68hc11sio *controller;
sim_cpu *cpu;
- int check_interrupt = 0;
controller = hw_data (me);
sd = hw_system (me);
@@ -329,13 +328,12 @@ m68hc11sio_tx_poll (struct hw *me, void *data)
cpu->ios[M6811_SCSR] |= M6811_TDRE;
cpu->ios[M6811_SCSR] |= M6811_TC;
- /* Transmitter is enabled and we have something to sent. */
+ /* Transmitter is enabled and we have something to send. */
if ((cpu->ios[M6811_SCCR2] & M6811_TE) && controller->tx_has_char)
{
cpu->ios[M6811_SCSR] &= ~M6811_TDRE;
cpu->ios[M6811_SCSR] &= ~M6811_TC;
controller->tx_has_char = 0;
- check_interrupt = 1;
switch (controller->backend)
{
case sio_tcp:
@@ -371,8 +369,7 @@ m68hc11sio_tx_poll (struct hw *me, void *data)
NULL);
}
- if (check_interrupt)
- interrupts_update_pending (&cpu->cpu_interrupts);
+ interrupts_update_pending (&cpu->cpu_interrupts);
}
/* Descriptions of the SIO I/O ports. These descriptions are only used to