Commit | Line | Data |
---|---|---|
d0f54f9d | 1 | /* Target-dependent code for GDB, the GNU debugger. |
0b302171 | 2 | Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. |
d0f54f9d JB |
3 | |
4 | This file is part of GDB. | |
5 | ||
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 | |
a9762ec7 | 8 | the Free Software Foundation; either version 3 of the License, or |
d0f54f9d JB |
9 | (at your option) any later version. |
10 | ||
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. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
a9762ec7 | 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
d0f54f9d JB |
18 | |
19 | #ifndef S390_TDEP_H | |
20 | #define S390_TDEP_H | |
21 | ||
22 | /* Register information. */ | |
23 | ||
24 | /* Program Status Word. */ | |
25 | #define S390_PSWM_REGNUM 0 | |
26 | #define S390_PSWA_REGNUM 1 | |
27 | /* General Purpose Registers. */ | |
28 | #define S390_R0_REGNUM 2 | |
29 | #define S390_R1_REGNUM 3 | |
30 | #define S390_R2_REGNUM 4 | |
31 | #define S390_R3_REGNUM 5 | |
32 | #define S390_R4_REGNUM 6 | |
33 | #define S390_R5_REGNUM 7 | |
34 | #define S390_R6_REGNUM 8 | |
35 | #define S390_R7_REGNUM 9 | |
36 | #define S390_R8_REGNUM 10 | |
37 | #define S390_R9_REGNUM 11 | |
38 | #define S390_R10_REGNUM 12 | |
39 | #define S390_R11_REGNUM 13 | |
40 | #define S390_R12_REGNUM 14 | |
41 | #define S390_R13_REGNUM 15 | |
42 | #define S390_R14_REGNUM 16 | |
43 | #define S390_R15_REGNUM 17 | |
44 | /* Access Registers. */ | |
45 | #define S390_A0_REGNUM 18 | |
46 | #define S390_A1_REGNUM 19 | |
47 | #define S390_A2_REGNUM 20 | |
48 | #define S390_A3_REGNUM 21 | |
49 | #define S390_A4_REGNUM 22 | |
50 | #define S390_A5_REGNUM 23 | |
51 | #define S390_A6_REGNUM 24 | |
52 | #define S390_A7_REGNUM 25 | |
53 | #define S390_A8_REGNUM 26 | |
54 | #define S390_A9_REGNUM 27 | |
55 | #define S390_A10_REGNUM 28 | |
56 | #define S390_A11_REGNUM 29 | |
57 | #define S390_A12_REGNUM 30 | |
58 | #define S390_A13_REGNUM 31 | |
59 | #define S390_A14_REGNUM 32 | |
60 | #define S390_A15_REGNUM 33 | |
61 | /* Floating Point Control Word. */ | |
62 | #define S390_FPC_REGNUM 34 | |
63 | /* Floating Point Registers. */ | |
64 | #define S390_F0_REGNUM 35 | |
65 | #define S390_F1_REGNUM 36 | |
66 | #define S390_F2_REGNUM 37 | |
67 | #define S390_F3_REGNUM 38 | |
68 | #define S390_F4_REGNUM 39 | |
69 | #define S390_F5_REGNUM 40 | |
70 | #define S390_F6_REGNUM 41 | |
71 | #define S390_F7_REGNUM 42 | |
72 | #define S390_F8_REGNUM 43 | |
73 | #define S390_F9_REGNUM 44 | |
74 | #define S390_F10_REGNUM 45 | |
75 | #define S390_F11_REGNUM 46 | |
76 | #define S390_F12_REGNUM 47 | |
77 | #define S390_F13_REGNUM 48 | |
78 | #define S390_F14_REGNUM 49 | |
79 | #define S390_F15_REGNUM 50 | |
7803799a UW |
80 | /* General Purpose Register Upper Halves. */ |
81 | #define S390_R0_UPPER_REGNUM 51 | |
82 | #define S390_R1_UPPER_REGNUM 52 | |
83 | #define S390_R2_UPPER_REGNUM 53 | |
84 | #define S390_R3_UPPER_REGNUM 54 | |
85 | #define S390_R4_UPPER_REGNUM 55 | |
86 | #define S390_R5_UPPER_REGNUM 56 | |
87 | #define S390_R6_UPPER_REGNUM 57 | |
88 | #define S390_R7_UPPER_REGNUM 58 | |
89 | #define S390_R8_UPPER_REGNUM 59 | |
90 | #define S390_R9_UPPER_REGNUM 60 | |
91 | #define S390_R10_UPPER_REGNUM 61 | |
92 | #define S390_R11_UPPER_REGNUM 62 | |
93 | #define S390_R12_UPPER_REGNUM 63 | |
94 | #define S390_R13_UPPER_REGNUM 64 | |
95 | #define S390_R14_UPPER_REGNUM 65 | |
96 | #define S390_R15_UPPER_REGNUM 66 | |
94eae614 | 97 | /* GNU/Linux-specific optional registers. */ |
c642a434 UW |
98 | #define S390_ORIG_R2_REGNUM 67 |
99 | #define S390_LAST_BREAK_REGNUM 68 | |
100 | #define S390_SYSTEM_CALL_REGNUM 69 | |
d0f54f9d | 101 | /* Total. */ |
c642a434 | 102 | #define S390_NUM_REGS 70 |
d0f54f9d JB |
103 | |
104 | /* Special register usage. */ | |
105 | #define S390_SP_REGNUM S390_R15_REGNUM | |
106 | #define S390_RETADDR_REGNUM S390_R14_REGNUM | |
107 | #define S390_FRAME_REGNUM S390_R11_REGNUM | |
108 | ||
109 | /* Core file register sets, defined in s390-tdep.c. */ | |
110 | #define s390_sizeof_gregset 0x90 | |
111 | extern int s390_regmap_gregset[S390_NUM_REGS]; | |
112 | #define s390x_sizeof_gregset 0xd8 | |
113 | extern int s390x_regmap_gregset[S390_NUM_REGS]; | |
114 | #define s390_sizeof_fpregset 0x88 | |
115 | extern int s390_regmap_fpregset[S390_NUM_REGS]; | |
c642a434 UW |
116 | extern int s390_regmap_last_break[S390_NUM_REGS]; |
117 | extern int s390x_regmap_last_break[S390_NUM_REGS]; | |
118 | extern int s390_regmap_system_call[S390_NUM_REGS]; | |
d0f54f9d | 119 | |
94eae614 | 120 | /* GNU/Linux target descriptions. */ |
7803799a | 121 | extern struct target_desc *tdesc_s390_linux32; |
c642a434 UW |
122 | extern struct target_desc *tdesc_s390_linux32v1; |
123 | extern struct target_desc *tdesc_s390_linux32v2; | |
7803799a | 124 | extern struct target_desc *tdesc_s390_linux64; |
c642a434 UW |
125 | extern struct target_desc *tdesc_s390_linux64v1; |
126 | extern struct target_desc *tdesc_s390_linux64v2; | |
7803799a | 127 | extern struct target_desc *tdesc_s390x_linux64; |
c642a434 UW |
128 | extern struct target_desc *tdesc_s390x_linux64v1; |
129 | extern struct target_desc *tdesc_s390x_linux64v2; | |
7803799a | 130 | |
d0f54f9d JB |
131 | #endif |
132 |