* dv-m68hc11tim.c (cycle_to_string): Add flags parameter to better
[deliverable/binutils-gdb.git] / sim / m68hc11 / dv-m68hc11sio.c
index 1f022c4bbe747face37ef5eb3af592a91d457441..655a6dbe0d144ff955c459bddbd212d6f1fc2683 100644 (file)
@@ -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
@@ -466,7 +463,8 @@ m68hc11sio_info (struct hw *me)
       n = (clock_cycle - t) / controller->baud_cycle;
       n = controller->data_length - n;
       sim_io_printf (sd, "  Transmit finished in %s (%d bit%s)\n",
-                    cycle_to_string (cpu, t), n, (n > 1 ? "s" : ""));
+                    cycle_to_string (cpu, t, PRINT_TIME | PRINT_CYCLE),
+                     n, (n > 1 ? "s" : ""));
     }
   if (controller->rx_poll_event)
     {
@@ -474,7 +472,7 @@ m68hc11sio_info (struct hw *me)
 
       t = hw_event_remain_time (me, controller->rx_poll_event);
       sim_io_printf (sd, "  Receive finished in %s\n",
-                    cycle_to_string (cpu, t));
+                    cycle_to_string (cpu, t, PRINT_TIME | PRINT_CYCLE));
     }
   
 }
This page took 0.024028 seconds and 4 git commands to generate.