1 /* Target-dependent code for GDB, the GNU debugger.
2 Copyright (C) 2003-2014 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* Hardware capabilities. */
24 #ifndef HWCAP_S390_HIGH_GPRS
25 #define HWCAP_S390_HIGH_GPRS 512
29 #define HWCAP_S390_TE 1024
32 /* Register information. */
34 /* Program Status Word. */
35 #define S390_PSWM_REGNUM 0
36 #define S390_PSWA_REGNUM 1
37 /* General Purpose Registers. */
38 #define S390_R0_REGNUM 2
39 #define S390_R1_REGNUM 3
40 #define S390_R2_REGNUM 4
41 #define S390_R3_REGNUM 5
42 #define S390_R4_REGNUM 6
43 #define S390_R5_REGNUM 7
44 #define S390_R6_REGNUM 8
45 #define S390_R7_REGNUM 9
46 #define S390_R8_REGNUM 10
47 #define S390_R9_REGNUM 11
48 #define S390_R10_REGNUM 12
49 #define S390_R11_REGNUM 13
50 #define S390_R12_REGNUM 14
51 #define S390_R13_REGNUM 15
52 #define S390_R14_REGNUM 16
53 #define S390_R15_REGNUM 17
54 /* Access Registers. */
55 #define S390_A0_REGNUM 18
56 #define S390_A1_REGNUM 19
57 #define S390_A2_REGNUM 20
58 #define S390_A3_REGNUM 21
59 #define S390_A4_REGNUM 22
60 #define S390_A5_REGNUM 23
61 #define S390_A6_REGNUM 24
62 #define S390_A7_REGNUM 25
63 #define S390_A8_REGNUM 26
64 #define S390_A9_REGNUM 27
65 #define S390_A10_REGNUM 28
66 #define S390_A11_REGNUM 29
67 #define S390_A12_REGNUM 30
68 #define S390_A13_REGNUM 31
69 #define S390_A14_REGNUM 32
70 #define S390_A15_REGNUM 33
71 /* Floating Point Control Word. */
72 #define S390_FPC_REGNUM 34
73 /* Floating Point Registers. */
74 #define S390_F0_REGNUM 35
75 #define S390_F1_REGNUM 36
76 #define S390_F2_REGNUM 37
77 #define S390_F3_REGNUM 38
78 #define S390_F4_REGNUM 39
79 #define S390_F5_REGNUM 40
80 #define S390_F6_REGNUM 41
81 #define S390_F7_REGNUM 42
82 #define S390_F8_REGNUM 43
83 #define S390_F9_REGNUM 44
84 #define S390_F10_REGNUM 45
85 #define S390_F11_REGNUM 46
86 #define S390_F12_REGNUM 47
87 #define S390_F13_REGNUM 48
88 #define S390_F14_REGNUM 49
89 #define S390_F15_REGNUM 50
90 /* General Purpose Register Upper Halves. */
91 #define S390_R0_UPPER_REGNUM 51
92 #define S390_R1_UPPER_REGNUM 52
93 #define S390_R2_UPPER_REGNUM 53
94 #define S390_R3_UPPER_REGNUM 54
95 #define S390_R4_UPPER_REGNUM 55
96 #define S390_R5_UPPER_REGNUM 56
97 #define S390_R6_UPPER_REGNUM 57
98 #define S390_R7_UPPER_REGNUM 58
99 #define S390_R8_UPPER_REGNUM 59
100 #define S390_R9_UPPER_REGNUM 60
101 #define S390_R10_UPPER_REGNUM 61
102 #define S390_R11_UPPER_REGNUM 62
103 #define S390_R12_UPPER_REGNUM 63
104 #define S390_R13_UPPER_REGNUM 64
105 #define S390_R14_UPPER_REGNUM 65
106 #define S390_R15_UPPER_REGNUM 66
107 /* GNU/Linux-specific optional registers. */
108 #define S390_ORIG_R2_REGNUM 67
109 #define S390_LAST_BREAK_REGNUM 68
110 #define S390_SYSTEM_CALL_REGNUM 69
111 /* Transaction diagnostic block. */
112 #define S390_TDB_DWORD0_REGNUM 70
113 #define S390_TDB_ABORT_CODE_REGNUM 71
114 #define S390_TDB_CONFLICT_TOKEN_REGNUM 72
115 #define S390_TDB_ATIA_REGNUM 73
116 #define S390_TDB_R0_REGNUM 74
117 #define S390_TDB_R1_REGNUM 75
118 #define S390_TDB_R2_REGNUM 76
119 #define S390_TDB_R3_REGNUM 77
120 #define S390_TDB_R4_REGNUM 78
121 #define S390_TDB_R5_REGNUM 79
122 #define S390_TDB_R6_REGNUM 80
123 #define S390_TDB_R7_REGNUM 81
124 #define S390_TDB_R8_REGNUM 82
125 #define S390_TDB_R9_REGNUM 83
126 #define S390_TDB_R10_REGNUM 84
127 #define S390_TDB_R11_REGNUM 85
128 #define S390_TDB_R12_REGNUM 86
129 #define S390_TDB_R13_REGNUM 87
130 #define S390_TDB_R14_REGNUM 88
131 #define S390_TDB_R15_REGNUM 89
133 #define S390_NUM_REGS 90
135 /* Special register usage. */
136 #define S390_SP_REGNUM S390_R15_REGNUM
137 #define S390_RETADDR_REGNUM S390_R14_REGNUM
138 #define S390_FRAME_REGNUM S390_R11_REGNUM
140 #define S390_IS_GREGSET_REGNUM(i) \
141 (((i) >= S390_PSWM_REGNUM && (i) <= S390_A15_REGNUM) \
142 || ((i) >= S390_R0_UPPER_REGNUM && (i) <= S390_R15_UPPER_REGNUM) \
143 || (i) == S390_ORIG_R2_REGNUM)
145 #define S390_IS_FPREGSET_REGNUM(i) \
146 ((i) >= S390_FPC_REGNUM && (i) <= S390_F15_REGNUM)
148 #define S390_IS_TDBREGSET_REGNUM(i) \
149 ((i) >= S390_TDB_DWORD0_REGNUM && (i) <= S390_TDB_R15_REGNUM)
151 /* Core file register sets, defined in s390-tdep.c. */
152 #define s390_sizeof_gregset 0x90
153 extern const short s390_regmap_gregset
[];
154 #define s390x_sizeof_gregset 0xd8
155 extern const short s390x_regmap_gregset
[];
156 #define s390_sizeof_fpregset 0x88
157 extern const short s390_regmap_fpregset
[];
158 extern const short s390_regmap_last_break
[];
159 extern const short s390x_regmap_last_break
[];
160 extern const short s390_regmap_system_call
[];
161 extern const short s390_regmap_tdb
[];
162 #define s390_sizeof_tdbregset 0x100
164 /* GNU/Linux target descriptions. */
165 extern struct target_desc
*tdesc_s390_linux32
;
166 extern struct target_desc
*tdesc_s390_linux32v1
;
167 extern struct target_desc
*tdesc_s390_linux32v2
;
168 extern struct target_desc
*tdesc_s390_linux64
;
169 extern struct target_desc
*tdesc_s390_linux64v1
;
170 extern struct target_desc
*tdesc_s390_linux64v2
;
171 extern struct target_desc
*tdesc_s390_te_linux64
;
172 extern struct target_desc
*tdesc_s390x_linux64
;
173 extern struct target_desc
*tdesc_s390x_linux64v1
;
174 extern struct target_desc
*tdesc_s390x_linux64v2
;
175 extern struct target_desc
*tdesc_s390x_te_linux64
;
This page took 0.032743 seconds and 4 git commands to generate.