Implement 32 bit MIPS16 instructions listed in m16.igen.
[deliverable/binutils-gdb.git] / sim / tic80 / interp.c
index e0133023c6628fa82db8efd32f172ead22635389..17f06d486c2b11d579a11c3999950200de1870fc 100644 (file)
@@ -26,8 +26,6 @@
 #include "idecode.h"
 #include "itable.h"
 
-#include <signal.h>
-
 #ifdef HAVE_STRING_H
 #include <string.h>
 #else
 #endif
 #endif
 
-void
-engine_init (SIM_DESC sd)
-{
-  memset (&STATE_CPU (sd, 0)->reg, 0, sizeof STATE_CPU (sd, 0)->reg);
-  memset (&STATE_CPU (sd, 0)->cia, 0, sizeof STATE_CPU (sd, 0)->cia);
-  CPU_STATE (STATE_CPU (sd, 0)) = sd;
-}
-
 
-/* Mechanisms for stopping/restarting the simulation */
+#if 0
 
 void
 engine_error (SIM_DESC sd,
@@ -59,13 +49,7 @@ engine_error (SIM_DESC sd,
   sim_io_evprintf (sd, fmt, ap);
   va_end (ap);
 
-  if (sd->halt_ok)
-    {
-      sim_io_eprintf (sd, "\n");
-      engine_halt (sd, cpu, cia, sim_stopped, SIGABRT);
-    }
-  else
-    sim_io_error (sd, " - aborting simulation");
+  sim_halt (sd, cpu, NULL, cia, sim_stopped, SIGABRT);
 }
 
 void
@@ -114,11 +98,10 @@ engine_run_until_stop (SIM_DESC sd,
       do
        {
          instruction_word insn = IMEM (cia);
-         cpu->reg[0] = 0;              /* force r0 to always contain 0 */
          cia = idecode_issue (sd, insn, cia);
        }
       while (*keep_running);
-      engine_halt (sd, cpu, cia, sim_stopped, SIGINT);
+      engine_halt (sd, cpu, cia, sim_stopped, SIM_SIGINT);
     }
 }
 
@@ -136,8 +119,9 @@ engine_step (SIM_DESC sd)
       sd->restart_ok = 1;
       cia = cpu->cia;
       insn = IMEM (cia);
-      cpu->reg[0] = 0;         /* force r0 to always contain 0 */
       cia = idecode_issue (sd, insn, cia);
-      engine_halt (sd, cpu, cia, sim_stopped, SIGTRAP);
+      engine_halt (sd, cpu, cia, sim_stopped, SIM_SIGTRAP);
     }
 }
+
+#endif
This page took 0.023582 seconds and 4 git commands to generate.