Commit | Line | Data |
---|---|---|
3346cfda NC |
1 | /* Simulator for TI MSP430 and MSP430X processors. |
2 | ||
32d0add0 | 3 | Copyright (C) 2012-2015 Free Software Foundation, Inc. |
3346cfda NC |
4 | Contributed by Red Hat, Inc. |
5 | ||
6 | This file is part of simulators. | |
7 | ||
8 | This program is free software; you can redistribute it and/or modify | |
9 | it under the terms of the GNU General Public License as published by | |
10 | the Free Software Foundation; either version 3 of the License, or | |
11 | (at your option) any later version. | |
12 | ||
13 | This program is distributed in the hope that it will be useful, | |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | GNU General Public License for more details. | |
17 | ||
18 | You should have received a copy of the GNU General Public License | |
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
20 | ||
21 | #ifndef _MSP430_MAIN_SIM_H_ | |
22 | #define _MSP430_MAIN_SIM_H_ | |
23 | ||
24 | #include "sim-basics.h" | |
25 | #include "sim-signal.h" | |
3346cfda NC |
26 | #include "msp430-sim.h" |
27 | #include "sim-base.h" | |
28 | ||
29 | struct _sim_cpu | |
30 | { | |
31 | /* Simulator specific members. */ | |
32 | struct msp430_cpu_state state; | |
33 | sim_cpu_base base; | |
34 | }; | |
35 | ||
36 | struct sim_state | |
37 | { | |
38 | sim_cpu *cpu[MAX_NR_PROCESSORS]; | |
39 | ||
3346cfda NC |
40 | asymbol **symbol_table; |
41 | long number_of_symbols; | |
42 | #define STATE_SYMBOL_TABLE(sd) ((sd)->symbol_table) | |
43 | #define STATE_NUM_SYMBOLS(sd) ((sd)->number_of_symbols) | |
44 | ||
45 | /* Simulator specific members. */ | |
46 | sim_state_base base; | |
47 | }; | |
48 | ||
49 | #define MSP430_CPU(sd) (STATE_CPU ((sd), 0)) | |
50 | #define MSP430_CPU_STATE(sd) (MSP430_CPU ((sd)->state)) | |
51 | ||
3346cfda NC |
52 | #include "sim-config.h" |
53 | #include "sim-types.h" | |
54 | #include "sim-engine.h" | |
55 | #include "sim-options.h" | |
3346cfda | 56 | |
6e4f085c MF |
57 | extern void msp430_sim_close (SIM_DESC sd, int quitting); |
58 | #define SIM_CLOSE_HOOK(...) msp430_sim_close (__VA_ARGS__) | |
59 | ||
3346cfda | 60 | #endif /* _MSP430_MAIN_SIM_H_ */ |