mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-01 13:26:47 +08:00
sim: bfin: invert sim_state storage
This commit is contained in:
parent
383861bd08
commit
85d93de3d8
@ -1,3 +1,10 @@
|
||||
2021-05-17 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (sim_open): Call sim_state_alloc_extra.
|
||||
* sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Define.
|
||||
(struct sim_state): Delete.
|
||||
(STATE_BOARD_DATA): Define.
|
||||
|
||||
2021-05-16 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* bfin-sim.c, devices.c, dv-bfin_cec.c, dv-bfin_ctimer.c,
|
||||
|
@ -717,7 +717,8 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback,
|
||||
{
|
||||
char c;
|
||||
int i;
|
||||
SIM_DESC sd = sim_state_alloc (kind, callback);
|
||||
SIM_DESC sd = sim_state_alloc_extra (kind, callback,
|
||||
sizeof (struct bfin_board_data));
|
||||
|
||||
/* The cpu data is kept in a separately allocated chunk of memory. */
|
||||
if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK)
|
||||
|
@ -21,6 +21,8 @@
|
||||
#ifndef _BFIN_MAIN_SIM_H_
|
||||
#define _BFIN_MAIN_SIM_H_
|
||||
|
||||
#define SIM_HAVE_COMMON_SIM_STATE
|
||||
|
||||
#include "sim-basics.h"
|
||||
#include "sim-signal.h"
|
||||
#include "arch.h"
|
||||
@ -37,14 +39,7 @@ struct _sim_cpu {
|
||||
};
|
||||
#define BFIN_CPU_STATE ((cpu)->state)
|
||||
|
||||
struct sim_state {
|
||||
sim_cpu *cpu[MAX_NR_PROCESSORS];
|
||||
|
||||
/* ... simulator specific members ... */
|
||||
struct bfin_board_data board;
|
||||
#define STATE_BOARD_DATA(sd) (&(sd)->board)
|
||||
sim_state_base base;
|
||||
};
|
||||
#define STATE_BOARD_DATA(sd) ((struct bfin_board_data *) STATE_ARCH_DATA (sd))
|
||||
|
||||
#include "sim-config.h"
|
||||
#include "sim-types.h"
|
||||
|
Loading…
Reference in New Issue
Block a user