Require GNU make
[binutils-gdb.git] / sim / frv / sim-if.c
index 405bef22968d710bf4859a712f712dc43a3db098..65e293753691988e4b1641adbb13e3ae569e7895 100644 (file)
@@ -1,5 +1,5 @@
 /* Main simulator entry points specific to the FRV.
-   Copyright (C) 1998-2018 Free Software Foundation, Inc.
+   Copyright (C) 1998-2021 Free Software Foundation, Inc.
    Contributed by Red Hat.
 
 This file is part of the GNU simulators.
@@ -20,9 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define WANT_CPU
 #define WANT_CPU_FRVBF
 #include "sim-main.h"
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include "sim-options.h"
 #include "libiberty.h"
 #include "bfd.h"
@@ -45,11 +43,8 @@ free_state (SIM_DESC sd)
 /* Create an instance of the simulator.  */
 
 SIM_DESC
-sim_open (kind, callback, abfd, argv)
-     SIM_OPEN_KIND kind;
-     host_callback *callback;
-     bfd *abfd;
-     char * const *argv;
+sim_open (SIM_OPEN_KIND kind, host_callback *callback, bfd *abfd,
+         char * const *argv)
 {
   char c;
   int i;
@@ -57,21 +52,12 @@ sim_open (kind, callback, abfd, argv)
   SIM_DESC sd = sim_state_alloc (kind, callback);
 
   /* The cpu data is kept in a separately allocated chunk of memory.  */
-  if (sim_cpu_alloc_all (sd, 1, cgen_cpu_max_extra_bytes ()) != SIM_RC_OK)
+  if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK)
     {
       free_state (sd);
       return 0;
     }
 
-#if 0 /* FIXME: pc is in mach-specific struct */
-  /* FIXME: watchpoints code shouldn't need this */
-  {
-    SIM_CPU *current_cpu = STATE_CPU (sd, 0);
-    STATE_WATCHPOINTS (sd)->pc = &(PC);
-    STATE_WATCHPOINTS (sd)->sizeof_pc = sizeof (PC);
-  }
-#endif
-
   if (sim_pre_argv_init (sd, argv[0]) != SIM_RC_OK)
     {
       free_state (sd);
@@ -173,9 +159,7 @@ sim_open (kind, callback, abfd, argv)
 }
 
 void
-frv_sim_close (sd, quitting)
-     SIM_DESC sd;
-     int quitting;
+frv_sim_close (SIM_DESC sd, int quitting)
 {
   int i;
   /* Terminate cache support.  */
@@ -188,11 +172,8 @@ frv_sim_close (sd, quitting)
 }
 \f
 SIM_RC
-sim_create_inferior (sd, abfd, argv, envp)
-     SIM_DESC sd;
-     bfd *abfd;
-     char * const *argv;
-     char * const *envp;
+sim_create_inferior (SIM_DESC sd, bfd *abfd, char * const *argv,
+                    char * const *envp)
 {
   SIM_CPU *current_cpu = STATE_CPU (sd, 0);
   SIM_ADDR addr;