]>
Commit | Line | Data |
---|---|---|
3666a048 | 1 | /* Copyright 2009-2021 Free Software Foundation, Inc. |
bd30e45a ME |
2 | |
3 | This file is part of the Xilinx MicroBlaze simulator. | |
4 | ||
5 | This library is free software; you can redistribute it and/or modify | |
6 | it under the terms of the GNU General Public License as published by | |
7 | the Free Software Foundation; either version 3 of the License, or | |
8 | (at your option) any later version. | |
9 | ||
10 | This program is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | GNU General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU General Public License | |
51b318de | 16 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
bd30e45a | 17 | |
2b4bc832 MF |
18 | #ifndef MICROBLAZE_SIM_MAIN |
19 | #define MICROBLAZE_SIM_MAIN | |
20 | ||
383861bd MF |
21 | #define SIM_HAVE_COMMON_SIM_STATE |
22 | ||
bd30e45a ME |
23 | #include "microblaze.h" |
24 | #include "sim-basics.h" | |
bd30e45a ME |
25 | #include "sim-base.h" |
26 | ||
27 | /* The machine state. | |
28 | This state is maintained in host byte order. The | |
29 | fetch/store register functions must translate between host | |
30 | byte order and the target processor byte order. | |
31 | Keeping this data in target byte order simplifies the register | |
32 | read/write functions. Keeping this data in native order improves | |
33 | the performance of the simulator. Simulation speed is deemed more | |
34 | important. */ | |
35 | ||
36 | /* The ordering of the microblaze_regset structure is matched in the | |
37 | gdb/config/microblaze/tm-microblaze.h file in the REGISTER_NAMES macro. */ | |
38 | struct microblaze_regset | |
39 | { | |
40 | word regs[32]; /* primary registers */ | |
41 | word spregs[2]; /* pc + msr */ | |
42 | int cycles; | |
43 | int insts; | |
bd30e45a ME |
44 | ubyte imm_enable; |
45 | half imm_high; | |
46 | }; | |
47 | ||
48 | struct _sim_cpu { | |
49 | struct microblaze_regset microblaze_cpu; | |
50 | sim_cpu_base base; | |
51 | }; | |
52 | ||
2b4bc832 | 53 | #endif /* MICROBLAZE_SIM_MAIN */ |