sim: enable common sim_cpu usage everywhere
All ports should be migrated now. Drop the SIM_HAVE_COMMON_SIM_CPU knob and require it be used everywhere now.
This commit is contained in:
parent
4c3c31719b
commit
4a21ad1e76
29 changed files with 1 additions and 66 deletions
|
@ -22,8 +22,6 @@
|
||||||
#ifndef _SIM_MAIN_H
|
#ifndef _SIM_MAIN_H
|
||||||
#define _SIM_MAIN_H
|
#define _SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
#include "sim-types.h"
|
#include "sim-types.h"
|
||||||
#include "sim-base.h"
|
#include "sim-base.h"
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
#include "sim-base.h"
|
#include "sim-base.h"
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
|
|
|
@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
|
|
||||||
#include "sim-base.h"
|
#include "sim-base.h"
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#ifndef _BFIN_MAIN_SIM_H_
|
#ifndef _BFIN_MAIN_SIM_H_
|
||||||
#define _BFIN_MAIN_SIM_H_
|
#define _BFIN_MAIN_SIM_H_
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
#include "arch.h"
|
#include "arch.h"
|
||||||
#include "sim-base.h"
|
#include "sim-base.h"
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
#include "cgen-types.h"
|
#include "cgen-types.h"
|
||||||
#include "bpf-desc.h"
|
#include "bpf-desc.h"
|
||||||
|
|
|
@ -46,20 +46,14 @@ sim_cpu_alloc_all_extra (SIM_DESC sd, int ncpus, size_t extra_bytes)
|
||||||
sim_cpu *
|
sim_cpu *
|
||||||
sim_cpu_alloc_extra (SIM_DESC sd, size_t extra_bytes)
|
sim_cpu_alloc_extra (SIM_DESC sd, size_t extra_bytes)
|
||||||
{
|
{
|
||||||
sim_cpu *cpu;
|
sim_cpu *cpu = zalloc (sizeof (*cpu));
|
||||||
|
|
||||||
#ifndef CGEN_ARCH
|
#ifndef CGEN_ARCH
|
||||||
# define cgen_cpu_max_extra_bytes(sd) 0
|
# define cgen_cpu_max_extra_bytes(sd) 0
|
||||||
#endif
|
#endif
|
||||||
#ifdef SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
cpu = zalloc (sizeof (*cpu));
|
|
||||||
|
|
||||||
extra_bytes += cgen_cpu_max_extra_bytes (sd);
|
extra_bytes += cgen_cpu_max_extra_bytes (sd);
|
||||||
if (extra_bytes)
|
if (extra_bytes)
|
||||||
CPU_ARCH_DATA (cpu) = zalloc (extra_bytes);
|
CPU_ARCH_DATA (cpu) = zalloc (extra_bytes);
|
||||||
#else
|
|
||||||
cpu = zalloc (sizeof (*cpu) + cgen_cpu_max_extra_bytes (sd));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return cpu;
|
return cpu;
|
||||||
}
|
}
|
||||||
|
@ -81,10 +75,7 @@ sim_cpu_free_all (SIM_DESC sd)
|
||||||
void
|
void
|
||||||
sim_cpu_free (sim_cpu *cpu)
|
sim_cpu_free (sim_cpu *cpu)
|
||||||
{
|
{
|
||||||
#ifdef SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
free (CPU_ARCH_DATA (cpu));
|
free (CPU_ARCH_DATA (cpu));
|
||||||
#endif
|
|
||||||
|
|
||||||
free (cpu);
|
free (cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,6 @@ typedef struct {
|
||||||
|
|
||||||
} sim_cpu_base;
|
} sim_cpu_base;
|
||||||
|
|
||||||
#ifdef SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
struct _sim_cpu {
|
struct _sim_cpu {
|
||||||
/* All the common state. */
|
/* All the common state. */
|
||||||
sim_cpu_base base;
|
sim_cpu_base base;
|
||||||
|
@ -142,7 +141,6 @@ struct _sim_cpu {
|
||||||
void *arch_data;
|
void *arch_data;
|
||||||
#define CPU_ARCH_DATA(cpu) ((cpu)->arch_data)
|
#define CPU_ARCH_DATA(cpu) ((cpu)->arch_data)
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Create all cpus. */
|
/* Create all cpus. */
|
||||||
extern SIM_RC sim_cpu_alloc_all_extra (SIM_DESC, int, size_t);
|
extern SIM_RC sim_cpu_alloc_all_extra (SIM_DESC, int, size_t);
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
|
|
||||||
typedef long int word;
|
typedef long int word;
|
||||||
|
|
|
@ -24,8 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
||||||
and -pbb. However some cpu families may use -simple while others use
|
and -pbb. However some cpu families may use -simple while others use
|
||||||
one of -scache/-pbb. */
|
one of -scache/-pbb. */
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
|
|
||||||
typedef long int word;
|
typedef long int word;
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
#include "sim-base.h"
|
#include "sim-base.h"
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
/* Main header for the frv. */
|
/* Main header for the frv. */
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
||||||
and -pbb. However some cpu families may use -simple while others use
|
and -pbb. However some cpu families may use -simple while others use
|
||||||
one of -scache/-pbb. ???? */
|
one of -scache/-pbb. ???? */
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
#include "sim-base.h"
|
#include "sim-base.h"
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#define DEBUG
|
#define DEBUG
|
||||||
|
|
||||||
/* These define the size of main memory for the simulator.
|
/* These define the size of main memory for the simulator.
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
||||||
and -pbb. However some cpu families may use -simple while others use
|
and -pbb. However some cpu families may use -simple while others use
|
||||||
one of -scache/-pbb. ???? */
|
one of -scache/-pbb. ???? */
|
||||||
|
|
|
@ -23,8 +23,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#define WITH_SCACHE_PBB 1
|
#define WITH_SCACHE_PBB 1
|
||||||
|
|
||||||
#include "symcat.h"
|
#include "symcat.h"
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
/* This is a global setting. Different cpu families can't mix-n-match -scache
|
||||||
and -pbb. However some cpu families may use -simple while others use
|
and -pbb. However some cpu families may use -simple while others use
|
||||||
one of -scache/-pbb. */
|
one of -scache/-pbb. */
|
||||||
|
|
|
@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
#ifndef _SIM_MAIN_H
|
#ifndef _SIM_MAIN_H
|
||||||
#define _SIM_MAIN_H
|
#define _SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
#include "sim-base.h"
|
#include "sim-base.h"
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
|
|
||||||
typedef long int word;
|
typedef long int word;
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
#ifndef MICROBLAZE_SIM_MAIN
|
#ifndef MICROBLAZE_SIM_MAIN
|
||||||
#define MICROBLAZE_SIM_MAIN
|
#define MICROBLAZE_SIM_MAIN
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "microblaze.h"
|
#include "microblaze.h"
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
#include "sim-base.h"
|
#include "sim-base.h"
|
||||||
|
|
|
@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
|
#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
|
||||||
mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ERROR))
|
mips_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), (TRANSFER), (ERROR))
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#define SIM_ENGINE_HALT_HOOK(SD,LAST_CPU,CIA) /* disable this hook */
|
#define SIM_ENGINE_HALT_HOOK(SD,LAST_CPU,CIA) /* disable this hook */
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
|
|
|
@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
#include "sim-base.h"
|
#include "sim-base.h"
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#ifndef _MSP430_MAIN_SIM_H_
|
#ifndef _MSP430_MAIN_SIM_H_
|
||||||
#define _MSP430_MAIN_SIM_H_
|
#define _MSP430_MAIN_SIM_H_
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
#include "msp430-sim.h"
|
#include "msp430-sim.h"
|
||||||
#include "sim-base.h"
|
#include "sim-base.h"
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#define WITH_SCACHE_PBB 1
|
#define WITH_SCACHE_PBB 1
|
||||||
|
|
||||||
#include "ansidecl.h"
|
#include "ansidecl.h"
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
#ifndef PRU_SIM_MAIN
|
#ifndef PRU_SIM_MAIN
|
||||||
#define PRU_SIM_MAIN
|
#define PRU_SIM_MAIN
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "pru.h"
|
#include "pru.h"
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
#include "machs.h"
|
#include "machs.h"
|
||||||
#include "sim-base.h"
|
#include "sim-base.h"
|
||||||
|
|
|
@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
#include "sim-basics.h"
|
#include "sim-basics.h"
|
||||||
#include "sim-base.h"
|
#include "sim-base.h"
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef SIM_MAIN_H
|
#ifndef SIM_MAIN_H
|
||||||
#define SIM_MAIN_H
|
#define SIM_MAIN_H
|
||||||
|
|
||||||
#define SIM_HAVE_COMMON_SIM_CPU
|
|
||||||
|
|
||||||
/* The v850 has 32bit words, numbered 31 (MSB) to 0 (LSB) */
|
/* The v850 has 32bit words, numbered 31 (MSB) to 0 (LSB) */
|
||||||
|
|
||||||
#define WITH_TARGET_WORD_MSB 31
|
#define WITH_TARGET_WORD_MSB 31
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue