]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - sim/sh64/sim-main.h
sim: trim old USING_SIM_BASE_H define
[thirdparty/binutils-gdb.git] / sim / sh64 / sim-main.h
CommitLineData
cbb38b47
BE
1/* Main header for the Hitachi SH64 architecture. */
2
3#ifndef SIM_MAIN_H
4#define SIM_MAIN_H
5
cbb38b47
BE
6/* sim-basics.h includes config.h but cgen-types.h must be included before
7 sim-basics.h and cgen-types.h needs config.h. */
8#include "config.h"
9
10#include "symcat.h"
11#include "sim-basics.h"
12#include "cgen-types.h"
13#include "sh-desc.h"
14#include "sh-opc.h"
15#include "arch.h"
16
17/* These must be defined before sim-base.h. */
18typedef UDI sim_cia;
7e83aa92 19#define CIA_ADDR(cia) (cia)
cbb38b47 20
cbb38b47
BE
21#include "sim-base.h"
22#include "cgen-sim.h"
23#include "sh64-sim.h"
24\f
25/* The _sim_cpu struct. */
26
27struct _sim_cpu {
28 /* sim/common cpu base. */
29 sim_cpu_base base;
30
31 /* Static parts of cgen. */
32 CGEN_CPU cgen_cpu;
33
34 /* CPU specific parts go here.
35 Note that in files that don't need to access these pieces WANT_CPU_FOO
36 won't be defined and thus these parts won't appear. This is ok in the
37 sense that things work. It is a source of bugs though.
38 One has to of course be careful to not take the size of this
39 struct and no structure members accessed in non-cpu specific files can
40 go after here. Oh for a better language. */
41#if defined (WANT_CPU_SH64)
42 SH64_CPU_DATA cpu_data;
43#endif
44};
45\f
46/* The sim_state struct. */
47
48struct sim_state {
f95f4ed2 49 sim_cpu *cpu[MAX_NR_PROCESSORS];
cbb38b47
BE
50
51 CGEN_STATE cgen_state;
52
53 sim_state_base base;
54};
55\f
56/* Misc. */
57
58/* Catch address exceptions. */
59extern SIM_CORE_SIGNAL_FN sh64_core_signal;
60#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
61sh64_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
62 (TRANSFER), (ERROR))
63
64/* Default memory size. */
65#define SH64_DEFAULT_MEM_SIZE 0x800000 /* 8M */
66
67#endif /* SIM_MAIN_H */