/* 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.
#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"
/* 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;
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);
}
void
-frv_sim_close (sd, quitting)
- SIM_DESC sd;
- int quitting;
+frv_sim_close (SIM_DESC sd, int quitting)
{
int i;
/* Terminate cache support. */
}
\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;