Commit | Line | Data |
---|---|---|
2e8cf49e NC |
1 | /* simulator.h -- Prototypes for AArch64 simulator functions. |
2 | ||
61baf725 | 3 | Copyright (C) 2015-2017 Free Software Foundation, Inc. |
2e8cf49e NC |
4 | |
5 | Contributed by Red Hat. | |
6 | ||
7 | This file is part of GDB. | |
8 | ||
9 | This program is free software; you can redistribute it and/or modify | |
10 | it under the terms of the GNU General Public License as published by | |
11 | the Free Software Foundation; either version 3 of the License, or | |
12 | (at your option) any later version. | |
13 | ||
14 | This program is distributed in the hope that it will be useful, | |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | GNU General Public License for more details. | |
18 | ||
19 | You should have received a copy of the GNU General Public License | |
20 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
21 | ||
22 | #ifndef _SIMULATOR_H | |
23 | #define _SIMULATOR_H | |
24 | ||
25 | #include "config.h" | |
26 | #include <sys/types.h> | |
27 | #include <setjmp.h> | |
28 | ||
29 | #include "sim-main.h" | |
30 | #include "decode.h" | |
31 | ||
2e8cf49e NC |
32 | #define TOP_LEVEL_RETURN_PC 0xffffffffffffffecULL |
33 | ||
34 | /* Call this to set the start stack pointer, frame pointer and pc | |
35 | before calling run or step. Also sets link register to a special | |
36 | value (-20) so we can detect a top level return. This function | |
37 | should be called from the sim setup routine running on the alt | |
38 | stack, and should pass in the current top of C stack for SP and | |
39 | the FP of the caller for fp. PC should be sthe start of the | |
40 | AARCH64 code segment to be executed. */ | |
41 | ||
42 | extern void aarch64_init (sim_cpu *, uint64_t); | |
43 | ||
44 | /* Call this to run from the current PC without stopping until we | |
45 | either return from the top frame, execute a halt or break or we | |
46 | hit an error. */ | |
47 | ||
48 | extern void aarch64_run (SIM_DESC); | |
5357150c | 49 | extern const char * aarch64_get_func (SIM_DESC, uint64_t); |
2e8cf49e NC |
50 | extern void aarch64_init_LIT_table (void); |
51 | ||
52 | #endif /* _SIMULATOR_H */ |