Update copyright year range in all GDB files
[deliverable/binutils-gdb.git] / sim / h8300 / compile.c
index 99d28ad9f525d5b71e4aa0471c0f520c08f77d07..c1c61d8211b2dd68e17059b054a3645f36567f8c 100644 (file)
@@ -58,32 +58,6 @@ static void set_simcache_size (SIM_DESC, int);
 
 /* CPU data object: */
 
-static int
-sim_state_initialize (SIM_DESC sd, sim_cpu *cpu)
-{
-  /* FIXME: not really necessary, since sim_cpu_alloc calls zalloc.  */
-
-  memset (&cpu->regs, 0, sizeof(cpu->regs));
-  cpu->regs[SBR_REGNUM] = 0xFFFFFF00;
-  cpu->pc = 0;
-  cpu->delayed_branch = 0;
-  cpu->memory = NULL;
-  cpu->eightbit = NULL;
-  cpu->mask = 0;
-
-  /* Initialize local simulator state.  */
-  sd->sim_cache = NULL;
-  sd->sim_cache_size = 0;
-  sd->cache_idx = NULL;
-  sd->cache_top = 0;
-  sd->memory_size = 0;
-  sd->compiles = 0;
-#ifdef ADEBUG
-  memset (&cpu->stats, 0, sizeof (cpu->stats));
-#endif
-  return 0;
-}
-
 static unsigned int
 h8_get_pc (SIM_DESC sd)
 {
@@ -4852,7 +4826,7 @@ SIM_DESC
 sim_open (SIM_OPEN_KIND kind, 
          struct host_callback_struct *callback, 
          struct bfd *abfd, 
-         char **argv)
+         char * const *argv)
 {
   int i;
   SIM_DESC sd;
@@ -4869,7 +4843,7 @@ sim_open (SIM_OPEN_KIND kind,
 
   cpu = STATE_CPU (sd, 0);
   SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
-  sim_state_initialize (sd, cpu);
+  cpu->regs[SBR_REGNUM] = 0xFFFFFF00;
   /* sim_cpu object is new, so some initialization is needed.  */
   init_pointers_needed = 1;
 
@@ -4885,9 +4859,7 @@ sim_open (SIM_OPEN_KIND kind,
       return 0;
     }
 
-    /* getopt will print the error message so we just have to exit if
-       this fails.  FIXME: Hmmm...  in the case of gdb we need getopt
-       to call print_filtered.  */
+  /* The parser will print an error message for us, so we silently return.  */
   if (sim_parse_args (sd, argv) != SIM_RC_OK)
     {
       /* Uninstall the modules to avoid memory leaks,
@@ -5028,7 +5000,8 @@ sim_load (SIM_DESC sd, const char *prog, bfd *abfd, int from_tty)
 }
 
 SIM_RC
-sim_create_inferior (SIM_DESC sd, struct bfd *abfd, char **argv, char **env)
+sim_create_inferior (SIM_DESC sd, struct bfd *abfd,
+                    char * const *argv, char * const *env)
 {
   int i = 0;
   int len_arg = 0;
This page took 0.030052 seconds and 4 git commands to generate.