2000-09-11 Kazu Hirata <kazu@hxi.com>
[deliverable/binutils-gdb.git] / sim / i960 / sim-main.h
CommitLineData
c906108c
SS
1/* Main header for the i960. */
2
3#define USING_SIM_BASE_H /* FIXME: quick hack */
4
5struct _sim_cpu; /* FIXME: should be in sim-basics.h */
6typedef struct _sim_cpu SIM_CPU;
7
8#include "symcat.h"
9#include "sim-basics.h"
10#include "cgen-types.h"
11#include "i960-desc.h"
12#include "i960-opc.h"
13#include "arch.h"
14
15/* These must be defined before sim-base.h. */
16typedef USI sim_cia;
17#define CIA_GET(cpu) 0 /* FIXME:(CPU_CGEN_HW (cpu)->h_pc) */
18#define CIA_SET(cpu,val) 0 /* FIXME:(CPU_CGEN_HW (cpu)->h_pc = (val)) */
19
20/* FIXME: Shouldn't be required to define these this early. */
21#define SIM_ENGINE_HALT_HOOK(SD, LAST_CPU, CIA)
22#define SIM_ENGINE_RESTART_HOOK(SD, LAST_CPU, CIA)
23
24#include "sim-base.h"
25#include "cgen-sim.h"
26#include "i960-sim.h"
27\f
28/* The _sim_cpu struct. */
29
30struct _sim_cpu {
31 sim_cpu_base base;
32
33 /* Static parts of cgen. */
34 CGEN_CPU cgen_cpu;
35
36 /* CPU specific parts go here.
37 Note that in files that don't need to access these pieces WANT_CPU_FOO
38 won't be defined and thus these parts won't appear. This is ok.
39 One has to of course be careful to not take the size of this
40 struct and no structure members accessed in non-cpu specific files can
41 go after here. */
42#if defined (WANT_CPU_I960BASE)
43 I960BASE_CPU_DATA cpu_data;
44#endif
45};
46\f
47/* The sim_state struct. */
48
49struct sim_state {
50 sim_cpu *cpu;
51#define STATE_CPU(sd, n) (/*&*/ (sd)->cpu)
52
53 CGEN_STATE cgen_state;
54
55 sim_state_base base;
56};
57\f
58/* Misc. */
59
60/* Catch address exceptions. */
61extern SIM_CORE_SIGNAL_FN i960_core_signal;
62#define SIM_CORE_SIGNAL(SD,CPU,CIA,MAP,NR_BYTES,ADDR,TRANSFER,ERROR) \
63i960_core_signal ((SD), (CPU), (CIA), (MAP), (NR_BYTES), (ADDR), \
64 (TRANSFER), (ERROR))
65
66/* Default memory size. */
67/* This value comes from the libgloss/i960/mon960.ld linker script. */
68#define I960_DEFAULT_MEM_START 0xa0008000
69#define I960_DEFAULT_MEM_SIZE 0x800000 /* 8M */
This page took 0.058601 seconds and 4 git commands to generate.