]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/aarch64/sim-main.h
0da730d3a3ecb8c9fd9f4cc9c7feb84bec9224f5
[thirdparty/binutils-gdb.git] / sim / aarch64 / sim-main.h
1 /* sim-main.h -- Interface with sim/common.
2
3 Copyright (C) 2015-2022 Free Software Foundation, Inc.
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 _SIM_MAIN_H
23 #define _SIM_MAIN_H
24
25 #define SIM_HAVE_COMMON_SIM_CPU
26
27 #include "sim-basics.h"
28 #include "sim-types.h"
29 #include "sim-base.h"
30 #include "sim-base.h"
31 #include "sim-io.h"
32 #include "cpustate.h"
33
34 /* A per-core state structure. */
35 struct aarch64_sim_cpu
36 {
37 GRegister gr[33]; /* Extra register at index 32 is used to hold zero value. */
38 FRegister fr[32];
39
40 uint64_t pc;
41 uint32_t CPSR;
42 uint32_t FPSR; /* Floating point Status register. */
43 uint32_t FPCR; /* Floating point Control register. */
44
45 uint64_t nextpc;
46 uint32_t instr;
47
48 uint64_t tpidr; /* Thread pointer id. */
49 };
50
51 #define AARCH64_SIM_CPU(cpu) ((struct aarch64_sim_cpu *) CPU_ARCH_DATA (cpu))
52
53 typedef enum
54 {
55 AARCH64_MIN_GR = 0,
56 AARCH64_MAX_GR = 31,
57 AARCH64_MIN_FR = 32,
58 AARCH64_MAX_FR = 63,
59 AARCH64_PC_REGNO = 64,
60 AARCH64_CPSR_REGNO = 65,
61 AARCH64_FPSR_REGNO = 66,
62 AARCH64_MAX_REGNO = 67
63 } aarch64_regno;
64
65 #endif /* _SIM_MAIN_H */