]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/m32r/sim-main.h
sim: enable common sim_cpu usage everywhere
[thirdparty/binutils-gdb.git] / sim / m32r / sim-main.h
CommitLineData
c906108c
SS
1/* Main header for the m32r. */
2
3#ifndef SIM_MAIN_H
4#define SIM_MAIN_H
5
f0c1b768
MF
6/* This is a global setting. Different cpu families can't mix-n-match -scache
7 and -pbb. However some cpu families may use -simple while others use
8 one of -scache/-pbb. */
9#define WITH_SCACHE_PBB 1
10
c906108c
SS
11#include "symcat.h"
12#include "sim-basics.h"
13#include "cgen-types.h"
14#include "m32r-desc.h"
15#include "m32r-opc.h"
16#include "arch.h"
c906108c
SS
17#include "sim-base.h"
18#include "cgen-sim.h"
19#include "m32r-sim.h"
20#include "opcode/cgen.h"
21\f
9a9db21d 22struct m32r_sim_cpu {
c906108c 23 M32R_MISC_PROFILE m32r_misc_profile;
9a9db21d 24#define CPU_M32R_MISC_PROFILE(cpu) (& M32R_SIM_CPU (cpu)->m32r_misc_profile)
c906108c
SS
25
26 /* CPU specific parts go here.
27 Note that in files that don't need to access these pieces WANT_CPU_FOO
28 won't be defined and thus these parts won't appear. This is ok in the
29 sense that things work. It is a source of bugs though.
30 One has to of course be careful to not take the size of this
31 struct and no structure members accessed in non-cpu specific files can
32 go after here. Oh for a better language. */
33#if defined (WANT_CPU_M32RBF)
34 M32RBF_CPU_DATA cpu_data;
35#endif
16b47b25
NC
36#if defined (WANT_CPU_M32RXF)
37 M32RXF_CPU_DATA cpu_data;
38#elif defined (WANT_CPU_M32R2F)
39 M32R2F_CPU_DATA cpu_data;
40#endif
c906108c 41};
9a9db21d 42#define M32R_SIM_CPU(cpu) ((struct m32r_sim_cpu *) CPU_ARCH_DATA (cpu))
c906108c 43\f
c906108c
SS
44/* Misc. */
45
46/* Catch address exceptions. */
47extern SIM_CORE_SIGNAL_FN m32r_core_signal;
48#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
49m32r_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
50 (TRANSFER), (ERROR))
51
c906108c 52#endif /* SIM_MAIN_H */