diff options
author | bavery <brian.avery@intel.com> | 2016-05-19 15:04:39 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-20 10:20:55 +0100 |
commit | bf4616d43b29ad3640c9152fb1d2b56311ebef1b (patch) | |
tree | dd7766f23e56478a65945441e00b9d0429eb36f4 /meta/recipes-devtools | |
parent | 070ea45b6cf99227c208edf58a0c79657a3702fc (diff) | |
download | poky-bf4616d43b29ad3640c9152fb1d2b56311ebef1b.tar.gz |
gdb: Backport patch to changes with AVX and MPX
The current MPX target descriptions assume that MPX is always combined
with AVX, however that's not correct. We can have machines with MPX
and without AVX; or machines with AVX and without MPX.
This patch adds new target descriptions for machines that support
both MPX and AVX, as duplicates of the existing MPX descriptions.
The following commit will remove AVX from the MPX-only descriptions.
This commit is backported from 7.12
(From OE-Core rev: dee987b6f157b0bc245086d3af914d411ae6d1ab)
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/gdb/gdb-common.inc | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch | 2601 |
2 files changed, 2602 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc index 1d1cf8fed3..3e00a2e9ff 100644 --- a/meta/recipes-devtools/gdb/gdb-common.inc +++ b/meta/recipes-devtools/gdb/gdb-common.inc | |||
@@ -36,6 +36,7 @@ SRC_URI = "git://sourceware.org/git/binutils-gdb.git;branch=gdb-7.11-branch \ | |||
36 | file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \ | 36 | file://0008-Use-exorted-definitions-of-SIGRTMIN.patch \ |
37 | file://0009-Change-order-of-CFLAGS.patch \ | 37 | file://0009-Change-order-of-CFLAGS.patch \ |
38 | file://0010-resolve-restrict-keyword-conflict.patch \ | 38 | file://0010-resolve-restrict-keyword-conflict.patch \ |
39 | file://0011-avx_mpx.patch \ | ||
39 | " | 40 | " |
40 | 41 | ||
41 | S = "${WORKDIR}/git" | 42 | S = "${WORKDIR}/git" |
@@ -84,4 +85,3 @@ RRECOMMENDS_gdb_append_linux = " glibc-thread-db " | |||
84 | RRECOMMENDS_gdb_append_linux-gnueabi = " glibc-thread-db " | 85 | RRECOMMENDS_gdb_append_linux-gnueabi = " glibc-thread-db " |
85 | RRECOMMENDS_gdbserver_append_linux = " glibc-thread-db " | 86 | RRECOMMENDS_gdbserver_append_linux = " glibc-thread-db " |
86 | RRECOMMENDS_gdbserver_append_linux-gnueabi = " glibc-thread-db " | 87 | RRECOMMENDS_gdbserver_append_linux-gnueabi = " glibc-thread-db " |
87 | |||
diff --git a/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch b/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch new file mode 100644 index 0000000000..209c4fcbdf --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/0011-avx_mpx.patch | |||
@@ -0,0 +1,2601 @@ | |||
1 | gdb: Backport patch to support changes with AVX and MPX | ||
2 | |||
3 | The current MPX target descriptions assume that MPX is always combined | ||
4 | with AVX, however that's not correct. We can have machines with MPX | ||
5 | and without AVX; or machines with AVX and without MPX. | ||
6 | |||
7 | This patch adds new target descriptions for machines that support | ||
8 | both MPX and AVX, as duplicates of the existing MPX descriptions. | ||
9 | |||
10 | The following commit will remove AVX from the MPX-only descriptions. | ||
11 | |||
12 | Upstream-Status: Backport | ||
13 | |||
14 | Signed-off-by: bavery <brian.avery@intel.com> | ||
15 | |||
16 | |||
17 | Orignal patch changelog and author attribution: | ||
18 | |||
19 | 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com> | ||
20 | |||
21 | gdb/ChangeLog: | ||
22 | |||
23 | * amd64-linux-tdep.c (features/i386/amd64-avx-mpx-linux.c): | ||
24 | New include. | ||
25 | (amd64_linux_core_read_description): Add case for | ||
26 | X86_XSTATE_AVX_MPX_MASK. | ||
27 | (_initialize_amd64_linux_tdep): Call initialize_tdesc_amd64_avx_mpx_linux. | ||
28 | * amd64-linux-tdep.h (tdesc_amd64_avx_mpx_linux): New definition. | ||
29 | * amd64-tdep.c (features/i386/amd64-avx-mpx.c): New include. | ||
30 | (amd64_target_description): Add case for X86_XSTATE_AVX_MPX_MASK. | ||
31 | (_initialize_amd64_tdep): Call initialize_tdesc_amd64_avx_mpx. | ||
32 | * common/x86-xstate.h (X86_XSTATE_MPX_MASK): Remove AVX bits. | ||
33 | (X86_XSTATE_AVX_MPX_MASK): New case. | ||
34 | * features/Makefile (i386/i386-avx-mpx, i386/i386-avx-mpx-linux) | ||
35 | (i386/amd64-avx-mpx, i386/amd64-avx-mpx-linux): New rules. | ||
36 | (i386/i386-avx-mpx-expedite, i386/i386-avx-mpx-linux-expedite) | ||
37 | (i386/amd64-avx-mpx-expedite, i386/amd64-avx-mpx-linux-expedite): | ||
38 | New expedites. | ||
39 | * i386-linux-tdep.c (features/i386/i386-avx-mpx-linux.c): New | ||
40 | include. | ||
41 | (i386_linux_core_read_description): Add case | ||
42 | X86_XSTATE_AVX_MPX_MASK. | ||
43 | (_initialize_i386_linux_tdep): Call | ||
44 | initialize_tdesc_i386_avx_mpx_linux. | ||
45 | * i386-linux-tdep.h (tdesc_i386_avx_mpx_linux): New include. | ||
46 | * i386-tdep.c (features/i386/i386-avx-mpx.c): New include. | ||
47 | (i386_target_description): Add case for X86_XSTATE_AVX_MPX_MASK. | ||
48 | * x86-linux-nat.c (x86_linux_read_description): Add case for | ||
49 | X86_XSTATE_AVX_MPX_MASK. | ||
50 | * features/i386/amd64-avx-mpx-linux.xml: New file. | ||
51 | * features/i386/i386-avx-mpx-linux.xml: New file. | ||
52 | * features/i386/i386-avx-mpx.xml: New file. | ||
53 | * features/i386/amd64-avx-mpx.xml: New file. | ||
54 | * features/i386/amd64-avx-mpx-linux.c: Generated. | ||
55 | * features/i386/amd64-avx-mpx.c: Generated. | ||
56 | * features/i386/i386-avx-mpx-linux.c: Generated. | ||
57 | * features/i386/i386-avx-mpx.c: Generated. | ||
58 | * regformats/i386/amd64-avx-mpx-linux.dat: Generated. | ||
59 | * regformats/i386/amd64-avx-mpx.dat: Generated. | ||
60 | * regformats/i386/i386-avx-mpx-linux.dat: Generated. | ||
61 | * regformats/i386/i386-avx-mpx.dat: Generated. | ||
62 | |||
63 | gdb/gdbserver/ChangeLog: | ||
64 | |||
65 | * Makefile.in (clean): Add removal for i386-avx-mpx.c, | ||
66 | i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c. | ||
67 | (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c) | ||
68 | (amd64-avx-mpx-linux.c): New rules. | ||
69 | (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule. | ||
70 | * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o. | ||
71 | (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o. | ||
72 | (srv_amd64_regobj): Add amd64-avx-mpx.o. | ||
73 | (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o. | ||
74 | (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml. | ||
75 | (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml. | ||
76 | (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml. | ||
77 | (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml. | ||
78 | (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o. | ||
79 | (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o. | ||
80 | * linux-x86-low.c (x86_linux_read_description): Add case for | ||
81 | X86_XSTATE_AVX_MPX_MASK. | ||
82 | (x86_get_ipa_tdesc_idx): Add cases for avx_mpx. | ||
83 | (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and | ||
84 | init_registers_i386_avx_mpx_linux. | ||
85 | * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx. | ||
86 | (initialize_low_tracepoint): Call | ||
87 | init_registers_i386_avx_mpx_linux. | ||
88 | * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx. | ||
89 | (initialize_low_tracepoint): Call | ||
90 | init_registers_amd64_avx_mpx_linux. | ||
91 | * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value. | ||
92 | (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux) | ||
93 | (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New | ||
94 | declarations. | ||
95 | |||
96 | |||
97 | |||
98 | |||
99 | diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c | ||
100 | index 21bcd99..5327f7c 100644 | ||
101 | --- a/gdb/amd64-linux-tdep.c | ||
102 | +++ b/gdb/amd64-linux-tdep.c | ||
103 | @@ -43,6 +43,7 @@ | ||
104 | #include "features/i386/amd64-linux.c" | ||
105 | #include "features/i386/amd64-avx-linux.c" | ||
106 | #include "features/i386/amd64-mpx-linux.c" | ||
107 | +#include "features/i386/amd64-avx-mpx-linux.c" | ||
108 | #include "features/i386/amd64-avx512-linux.c" | ||
109 | |||
110 | #include "features/i386/x32-linux.c" | ||
111 | @@ -1590,6 +1591,11 @@ amd64_linux_core_read_description (struct gdbarch *gdbarch, | ||
112 | return tdesc_x32_avx_linux; /* No x32 MPX falling back to AVX. */ | ||
113 | else | ||
114 | return tdesc_amd64_mpx_linux; | ||
115 | + case X86_XSTATE_AVX_MPX_MASK: | ||
116 | + if (gdbarch_ptr_bit (gdbarch) == 32) | ||
117 | + return tdesc_x32_avx_linux; /* No x32 MPX falling back to AVX. */ | ||
118 | + else | ||
119 | + return tdesc_amd64_avx_mpx_linux; | ||
120 | case X86_XSTATE_AVX_MASK: | ||
121 | if (gdbarch_ptr_bit (gdbarch) == 32) | ||
122 | return tdesc_x32_avx_linux; | ||
123 | @@ -2285,6 +2291,7 @@ _initialize_amd64_linux_tdep (void) | ||
124 | initialize_tdesc_amd64_linux (); | ||
125 | initialize_tdesc_amd64_avx_linux (); | ||
126 | initialize_tdesc_amd64_mpx_linux (); | ||
127 | + initialize_tdesc_amd64_avx_mpx_linux (); | ||
128 | initialize_tdesc_amd64_avx512_linux (); | ||
129 | |||
130 | initialize_tdesc_x32_linux (); | ||
131 | diff --git a/gdb/amd64-linux-tdep.h b/gdb/amd64-linux-tdep.h | ||
132 | index 8673442..d64d5d6 100644 | ||
133 | --- a/gdb/amd64-linux-tdep.h | ||
134 | +++ b/gdb/amd64-linux-tdep.h | ||
135 | @@ -35,6 +35,7 @@ | ||
136 | extern struct target_desc *tdesc_amd64_linux; | ||
137 | extern struct target_desc *tdesc_amd64_avx_linux; | ||
138 | extern struct target_desc *tdesc_amd64_mpx_linux; | ||
139 | +extern struct target_desc *tdesc_amd64_avx_mpx_linux; | ||
140 | extern struct target_desc *tdesc_amd64_avx512_linux; | ||
141 | |||
142 | extern struct target_desc *tdesc_x32_linux; | ||
143 | diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c | ||
144 | index fae92b2..88e3bf8 100644 | ||
145 | --- a/gdb/amd64-tdep.c | ||
146 | +++ b/gdb/amd64-tdep.c | ||
147 | @@ -44,6 +44,7 @@ | ||
148 | #include "features/i386/amd64.c" | ||
149 | #include "features/i386/amd64-avx.c" | ||
150 | #include "features/i386/amd64-mpx.c" | ||
151 | +#include "features/i386/amd64-avx-mpx.c" | ||
152 | #include "features/i386/amd64-avx512.c" | ||
153 | |||
154 | #include "features/i386/x32.c" | ||
155 | @@ -3132,6 +3133,8 @@ amd64_target_description (uint64_t xcr0) | ||
156 | return tdesc_amd64_avx512; | ||
157 | case X86_XSTATE_MPX_MASK: | ||
158 | return tdesc_amd64_mpx; | ||
159 | + case X86_XSTATE_AVX_MPX_MASK: | ||
160 | + return tdesc_amd64_avx_mpx; | ||
161 | case X86_XSTATE_AVX_MASK: | ||
162 | return tdesc_amd64_avx; | ||
163 | default: | ||
164 | @@ -3148,6 +3151,7 @@ _initialize_amd64_tdep (void) | ||
165 | initialize_tdesc_amd64 (); | ||
166 | initialize_tdesc_amd64_avx (); | ||
167 | initialize_tdesc_amd64_mpx (); | ||
168 | + initialize_tdesc_amd64_avx_mpx (); | ||
169 | initialize_tdesc_amd64_avx512 (); | ||
170 | |||
171 | initialize_tdesc_x32 (); | ||
172 | diff --git a/gdb/common/x86-xstate.h b/gdb/common/x86-xstate.h | ||
173 | index 8386420..0aa9164 100644 | ||
174 | --- a/gdb/common/x86-xstate.h | ||
175 | +++ b/gdb/common/x86-xstate.h | ||
176 | @@ -39,9 +39,10 @@ | ||
177 | #define X86_XSTATE_X87_MASK X86_XSTATE_X87 | ||
178 | #define X86_XSTATE_SSE_MASK (X86_XSTATE_X87 | X86_XSTATE_SSE) | ||
179 | #define X86_XSTATE_AVX_MASK (X86_XSTATE_SSE_MASK | X86_XSTATE_AVX) | ||
180 | -#define X86_XSTATE_MPX_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_MPX) | ||
181 | +#define X86_XSTATE_MPX_MASK (X86_XSTATE_SSE_MASK | X86_XSTATE_MPX) | ||
182 | +#define X86_XSTATE_AVX_MPX_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_MPX) | ||
183 | #define X86_XSTATE_AVX512_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_AVX512) | ||
184 | -#define X86_XSTATE_MPX_AVX512_MASK (X86_XSTATE_MPX_MASK | X86_XSTATE_AVX512) | ||
185 | +#define X86_XSTATE_MPX_AVX512_MASK (X86_XSTATE_AVX_MPX_MASK | X86_XSTATE_AVX512) | ||
186 | |||
187 | #define X86_XSTATE_ALL_MASK (X86_XSTATE_MPX_AVX512_MASK) | ||
188 | |||
189 | diff --git a/gdb/features/Makefile b/gdb/features/Makefile | ||
190 | index 10173cf..e5c5154 100644 | ||
191 | --- a/gdb/features/Makefile | ||
192 | +++ b/gdb/features/Makefile | ||
193 | @@ -50,9 +50,11 @@ WHICH = aarch64 \ | ||
194 | i386/amd64 i386/amd64-linux \ | ||
195 | i386/i386-avx i386/i386-avx-linux \ | ||
196 | i386/i386-mpx i386/i386-mpx-linux \ | ||
197 | + i386/i386-avx-mpx i386/i386-avx-mpx-linux \ | ||
198 | i386/i386-avx512 i386/i386-avx512-linux \ | ||
199 | i386/amd64-avx i386/amd64-avx-linux \ | ||
200 | i386/amd64-mpx i386/amd64-mpx-linux \ | ||
201 | + i386/amd64-avx-mpx i386/amd64-avx-mpx-linux \ | ||
202 | i386/amd64-avx512 i386/amd64-avx512-linux \ | ||
203 | i386/x32 i386/x32-linux \ | ||
204 | i386/x32-avx i386/x32-avx-linux \ | ||
205 | @@ -83,7 +85,9 @@ i386/amd64-linux-expedite = rbp,rsp,rip | ||
206 | i386/i386-avx-expedite = ebp,esp,eip | ||
207 | i386/i386-avx-linux-expedite = ebp,esp,eip | ||
208 | i386/i386-mpx-expedite = ebp,esp,eip | ||
209 | +i386/i386-avx-mpx-expedite = ebp,esp,eip | ||
210 | i386/i386-mpx-linux-expedite = ebp,esp,eip | ||
211 | +i386/i386-avx-mpx-linux-expedite = ebp,esp,eip | ||
212 | i386/i386-avx512-expedite = ebp,esp,eip | ||
213 | i386/i386-avx512-linux-expedite = ebp,esp,eip | ||
214 | i386/i386-mmx-expedite = ebp,esp,eip | ||
215 | @@ -91,7 +95,9 @@ i386/i386-mmx-linux-expedite = ebp,esp,eip | ||
216 | i386/amd64-avx-expedite = rbp,rsp,rip | ||
217 | i386/amd64-avx-linux-expedite = rbp,rsp,rip | ||
218 | i386/amd64-mpx-expedite = rbp,rsp,rip | ||
219 | +i386/amd64-avx-mpx-expedite = rbp,rsp,rip | ||
220 | i386/amd64-mpx-linux-expedite = rbp,rsp,rip | ||
221 | +i386/amd64-avx-mpx-linux-expedite = rbp,rsp,rip | ||
222 | i386/amd64-avx512-expedite = rbp,rsp,rip | ||
223 | i386/amd64-avx512-linux-expedite = rbp,rsp,rip | ||
224 | i386/x32-expedite = rbp,rsp,rip | ||
225 | @@ -156,6 +162,8 @@ XMLTOC = \ | ||
226 | i386/amd64-linux.xml \ | ||
227 | i386/amd64-mpx-linux.xml \ | ||
228 | i386/amd64-mpx.xml \ | ||
229 | + i386/amd64-avx-mpx-linux.xml \ | ||
230 | + i386/amd64-avx-mpx.xml \ | ||
231 | i386/amd64.xml \ | ||
232 | i386/i386-avx-linux.xml \ | ||
233 | i386/i386-avx.xml \ | ||
234 | @@ -166,6 +174,8 @@ XMLTOC = \ | ||
235 | i386/i386-mmx.xml \ | ||
236 | i386/i386-mpx-linux.xml \ | ||
237 | i386/i386-mpx.xml \ | ||
238 | + i386/i386-avx-mpx-linux.xml \ | ||
239 | + i386/i386-avx-mpx.xml \ | ||
240 | i386/i386.xml \ | ||
241 | i386/x32-avx-linux.xml \ | ||
242 | i386/x32-avx.xml \ | ||
243 | @@ -271,6 +281,10 @@ $(outdir)/i386/i386-mpx.dat: i386/32bit-core.xml i386/32bit-avx.xml \ | ||
244 | i386/32bit-mpx.xml | ||
245 | $(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \ | ||
246 | i386/32bit-linux.xml i386/32bit-mpx.xml | ||
247 | +$(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml \ | ||
248 | + i386/32bit-linux.xml i386/32bit-mpx.xml | ||
249 | +$(outdir)/i386/i386-avx-mpx-linux.dat: i386/32bit-core.xml \ | ||
250 | + i386/32bit-linux.xml i386/32bit-mpx.xml | ||
251 | $(outdir)/i386/i386-avx512.dat: i386/32bit-core.xml i386/32bit-avx.xml \ | ||
252 | i386/32bit-mpx.xml i386/32bit-avx512.xml | ||
253 | $(outdir)/i386/i386-avx512-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \ | ||
254 | @@ -282,8 +296,12 @@ $(outdir)/i386/amd64-avx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \ | ||
255 | i386/64bit-linux.xml | ||
256 | $(outdir)/i386/amd64-mpx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \ | ||
257 | i386/64bit-linux.xml i386/64bit-mpx.xml | ||
258 | +$(outdir)/i386/amd64-avx-mpx-linux.dat: i386/64bit-core.xml \ | ||
259 | + i386/64bit-linux.xml i386/64bit-mpx.xml | ||
260 | $(outdir)/i386/amd64-mpx.dat: i386/64bit-core.xml i386/64bit-avx.xml \ | ||
261 | i386/64bit-mpx.xml | ||
262 | +$(outdir)/i386/amd64-avx-mpx.dat: i386/64bit-core.xml \ | ||
263 | + i386/64bit-mpx.xml | ||
264 | $(outdir)/i386/amd64-avx512.dat: i386/64bit-core.xml i386/64bit-avx.xml \ | ||
265 | i386/64bit-mpx.xml i386/64bit-avx512.xml | ||
266 | $(outdir)/i386/amd64-avx512-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \ | ||
267 | diff --git a/gdb/features/i386/amd64-avx-mpx-linux.c b/gdb/features/i386/amd64-avx-mpx-linux.c | ||
268 | new file mode 100644 | ||
269 | index 0000000..37b4c81 | ||
270 | --- /dev/null | ||
271 | +++ b/gdb/features/i386/amd64-avx-mpx-linux.c | ||
272 | @@ -0,0 +1,211 @@ | ||
273 | +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: | ||
274 | + Original: amd64-avx-mpx-linux.xml */ | ||
275 | + | ||
276 | +#include "defs.h" | ||
277 | +#include "osabi.h" | ||
278 | +#include "target-descriptions.h" | ||
279 | + | ||
280 | +struct target_desc *tdesc_amd64_avx_mpx_linux; | ||
281 | +static void | ||
282 | +initialize_tdesc_amd64_avx_mpx_linux (void) | ||
283 | +{ | ||
284 | + struct target_desc *result = allocate_target_description (); | ||
285 | + struct tdesc_feature *feature; | ||
286 | + struct tdesc_type *field_type; | ||
287 | + struct tdesc_type *type; | ||
288 | + | ||
289 | + set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64")); | ||
290 | + | ||
291 | + set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux")); | ||
292 | + | ||
293 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core"); | ||
294 | + field_type = tdesc_create_flags (feature, "i386_eflags", 4); | ||
295 | + tdesc_add_flag (field_type, 0, "CF"); | ||
296 | + tdesc_add_flag (field_type, 1, ""); | ||
297 | + tdesc_add_flag (field_type, 2, "PF"); | ||
298 | + tdesc_add_flag (field_type, 4, "AF"); | ||
299 | + tdesc_add_flag (field_type, 6, "ZF"); | ||
300 | + tdesc_add_flag (field_type, 7, "SF"); | ||
301 | + tdesc_add_flag (field_type, 8, "TF"); | ||
302 | + tdesc_add_flag (field_type, 9, "IF"); | ||
303 | + tdesc_add_flag (field_type, 10, "DF"); | ||
304 | + tdesc_add_flag (field_type, 11, "OF"); | ||
305 | + tdesc_add_flag (field_type, 14, "NT"); | ||
306 | + tdesc_add_flag (field_type, 16, "RF"); | ||
307 | + tdesc_add_flag (field_type, 17, "VM"); | ||
308 | + tdesc_add_flag (field_type, 18, "AC"); | ||
309 | + tdesc_add_flag (field_type, 19, "VIF"); | ||
310 | + tdesc_add_flag (field_type, 20, "VIP"); | ||
311 | + tdesc_add_flag (field_type, 21, "ID"); | ||
312 | + | ||
313 | + tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64"); | ||
314 | + tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64"); | ||
315 | + tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64"); | ||
316 | + tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64"); | ||
317 | + tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64"); | ||
318 | + tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64"); | ||
319 | + tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr"); | ||
320 | + tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr"); | ||
321 | + tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64"); | ||
322 | + tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64"); | ||
323 | + tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64"); | ||
324 | + tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64"); | ||
325 | + tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64"); | ||
326 | + tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64"); | ||
327 | + tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64"); | ||
328 | + tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64"); | ||
329 | + tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr"); | ||
330 | + tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags"); | ||
331 | + tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32"); | ||
332 | + tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32"); | ||
333 | + tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32"); | ||
334 | + tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32"); | ||
335 | + tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32"); | ||
336 | + tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32"); | ||
337 | + tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext"); | ||
338 | + tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext"); | ||
339 | + tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext"); | ||
340 | + tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext"); | ||
341 | + tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext"); | ||
342 | + tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext"); | ||
343 | + tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext"); | ||
344 | + tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext"); | ||
345 | + tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int"); | ||
346 | + tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int"); | ||
347 | + tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int"); | ||
348 | + tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int"); | ||
349 | + tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int"); | ||
350 | + tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int"); | ||
351 | + tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int"); | ||
352 | + tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int"); | ||
353 | + | ||
354 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse"); | ||
355 | + field_type = tdesc_named_type (feature, "ieee_single"); | ||
356 | + tdesc_create_vector (feature, "v4f", field_type, 4); | ||
357 | + | ||
358 | + field_type = tdesc_named_type (feature, "ieee_double"); | ||
359 | + tdesc_create_vector (feature, "v2d", field_type, 2); | ||
360 | + | ||
361 | + field_type = tdesc_named_type (feature, "int8"); | ||
362 | + tdesc_create_vector (feature, "v16i8", field_type, 16); | ||
363 | + | ||
364 | + field_type = tdesc_named_type (feature, "int16"); | ||
365 | + tdesc_create_vector (feature, "v8i16", field_type, 8); | ||
366 | + | ||
367 | + field_type = tdesc_named_type (feature, "int32"); | ||
368 | + tdesc_create_vector (feature, "v4i32", field_type, 4); | ||
369 | + | ||
370 | + field_type = tdesc_named_type (feature, "int64"); | ||
371 | + tdesc_create_vector (feature, "v2i64", field_type, 2); | ||
372 | + | ||
373 | + type = tdesc_create_union (feature, "vec128"); | ||
374 | + field_type = tdesc_named_type (feature, "v4f"); | ||
375 | + tdesc_add_field (type, "v4_float", field_type); | ||
376 | + field_type = tdesc_named_type (feature, "v2d"); | ||
377 | + tdesc_add_field (type, "v2_double", field_type); | ||
378 | + field_type = tdesc_named_type (feature, "v16i8"); | ||
379 | + tdesc_add_field (type, "v16_int8", field_type); | ||
380 | + field_type = tdesc_named_type (feature, "v8i16"); | ||
381 | + tdesc_add_field (type, "v8_int16", field_type); | ||
382 | + field_type = tdesc_named_type (feature, "v4i32"); | ||
383 | + tdesc_add_field (type, "v4_int32", field_type); | ||
384 | + field_type = tdesc_named_type (feature, "v2i64"); | ||
385 | + tdesc_add_field (type, "v2_int64", field_type); | ||
386 | + field_type = tdesc_named_type (feature, "uint128"); | ||
387 | + tdesc_add_field (type, "uint128", field_type); | ||
388 | + | ||
389 | + field_type = tdesc_create_flags (feature, "i386_mxcsr", 4); | ||
390 | + tdesc_add_flag (field_type, 0, "IE"); | ||
391 | + tdesc_add_flag (field_type, 1, "DE"); | ||
392 | + tdesc_add_flag (field_type, 2, "ZE"); | ||
393 | + tdesc_add_flag (field_type, 3, "OE"); | ||
394 | + tdesc_add_flag (field_type, 4, "UE"); | ||
395 | + tdesc_add_flag (field_type, 5, "PE"); | ||
396 | + tdesc_add_flag (field_type, 6, "DAZ"); | ||
397 | + tdesc_add_flag (field_type, 7, "IM"); | ||
398 | + tdesc_add_flag (field_type, 8, "DM"); | ||
399 | + tdesc_add_flag (field_type, 9, "ZM"); | ||
400 | + tdesc_add_flag (field_type, 10, "OM"); | ||
401 | + tdesc_add_flag (field_type, 11, "UM"); | ||
402 | + tdesc_add_flag (field_type, 12, "PM"); | ||
403 | + tdesc_add_flag (field_type, 15, "FZ"); | ||
404 | + | ||
405 | + tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128"); | ||
406 | + tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128"); | ||
407 | + tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128"); | ||
408 | + tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128"); | ||
409 | + tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128"); | ||
410 | + tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128"); | ||
411 | + tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128"); | ||
412 | + tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128"); | ||
413 | + tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128"); | ||
414 | + tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128"); | ||
415 | + tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128"); | ||
416 | + tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128"); | ||
417 | + tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128"); | ||
418 | + tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128"); | ||
419 | + tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128"); | ||
420 | + tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128"); | ||
421 | + tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr"); | ||
422 | + | ||
423 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux"); | ||
424 | + tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int"); | ||
425 | + | ||
426 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx"); | ||
427 | + tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128"); | ||
428 | + tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128"); | ||
429 | + tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128"); | ||
430 | + tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128"); | ||
431 | + tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128"); | ||
432 | + tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128"); | ||
433 | + tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128"); | ||
434 | + tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128"); | ||
435 | + tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128"); | ||
436 | + tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128"); | ||
437 | + tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128"); | ||
438 | + tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128"); | ||
439 | + tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128"); | ||
440 | + tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128"); | ||
441 | + tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128"); | ||
442 | + tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128"); | ||
443 | + | ||
444 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx"); | ||
445 | + type = tdesc_create_struct (feature, "br128"); | ||
446 | + field_type = tdesc_named_type (feature, "uint64"); | ||
447 | + tdesc_add_field (type, "lbound", field_type); | ||
448 | + field_type = tdesc_named_type (feature, "uint64"); | ||
449 | + tdesc_add_field (type, "ubound_raw", field_type); | ||
450 | + | ||
451 | + type = tdesc_create_struct (feature, "_bndstatus"); | ||
452 | + tdesc_set_struct_size (type, 8); | ||
453 | + tdesc_add_bitfield (type, "bde", 2, 63); | ||
454 | + tdesc_add_bitfield (type, "error", 0, 1); | ||
455 | + | ||
456 | + type = tdesc_create_union (feature, "status"); | ||
457 | + field_type = tdesc_named_type (feature, "data_ptr"); | ||
458 | + tdesc_add_field (type, "raw", field_type); | ||
459 | + field_type = tdesc_named_type (feature, "_bndstatus"); | ||
460 | + tdesc_add_field (type, "status", field_type); | ||
461 | + | ||
462 | + type = tdesc_create_struct (feature, "_bndcfgu"); | ||
463 | + tdesc_set_struct_size (type, 8); | ||
464 | + tdesc_add_bitfield (type, "base", 12, 63); | ||
465 | + tdesc_add_bitfield (type, "reserved", 2, 11); | ||
466 | + tdesc_add_bitfield (type, "preserved", 1, 1); | ||
467 | + tdesc_add_bitfield (type, "enabled", 0, 0); | ||
468 | + | ||
469 | + type = tdesc_create_union (feature, "cfgu"); | ||
470 | + field_type = tdesc_named_type (feature, "data_ptr"); | ||
471 | + tdesc_add_field (type, "raw", field_type); | ||
472 | + field_type = tdesc_named_type (feature, "_bndcfgu"); | ||
473 | + tdesc_add_field (type, "config", field_type); | ||
474 | + | ||
475 | + tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128"); | ||
476 | + tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128"); | ||
477 | + tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128"); | ||
478 | + tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128"); | ||
479 | + tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu"); | ||
480 | + tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status"); | ||
481 | + | ||
482 | + tdesc_amd64_avx_mpx_linux = result; | ||
483 | +} | ||
484 | diff --git a/gdb/features/i386/amd64-avx-mpx-linux.xml b/gdb/features/i386/amd64-avx-mpx-linux.xml | ||
485 | new file mode 100644 | ||
486 | index 0000000..526c700 | ||
487 | --- /dev/null | ||
488 | +++ b/gdb/features/i386/amd64-avx-mpx-linux.xml | ||
489 | @@ -0,0 +1,19 @@ | ||
490 | +<?xml version="1.0"?> | ||
491 | +<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc. | ||
492 | + | ||
493 | + Copying and distribution of this file, with or without modification, | ||
494 | + are permitted in any medium without royalty provided the copyright | ||
495 | + notice and this notice are preserved. --> | ||
496 | + | ||
497 | +<!-- AMD64 with AVX and MPX - Includes Linux-only special "register". --> | ||
498 | + | ||
499 | +<!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
500 | +<target> | ||
501 | + <architecture>i386:x86-64</architecture> | ||
502 | + <osabi>GNU/Linux</osabi> | ||
503 | + <xi:include href="64bit-core.xml"/> | ||
504 | + <xi:include href="64bit-sse.xml"/> | ||
505 | + <xi:include href="64bit-linux.xml"/> | ||
506 | + <xi:include href="64bit-avx.xml"/> | ||
507 | + <xi:include href="64bit-mpx.xml"/> | ||
508 | +</target> | ||
509 | diff --git a/gdb/features/i386/amd64-avx-mpx.c b/gdb/features/i386/amd64-avx-mpx.c | ||
510 | new file mode 100644 | ||
511 | index 0000000..1279f73 | ||
512 | --- /dev/null | ||
513 | +++ b/gdb/features/i386/amd64-avx-mpx.c | ||
514 | @@ -0,0 +1,206 @@ | ||
515 | +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: | ||
516 | + Original: amd64-avx-mpx.xml */ | ||
517 | + | ||
518 | +#include "defs.h" | ||
519 | +#include "osabi.h" | ||
520 | +#include "target-descriptions.h" | ||
521 | + | ||
522 | +struct target_desc *tdesc_amd64_avx_mpx; | ||
523 | +static void | ||
524 | +initialize_tdesc_amd64_avx_mpx (void) | ||
525 | +{ | ||
526 | + struct target_desc *result = allocate_target_description (); | ||
527 | + struct tdesc_feature *feature; | ||
528 | + struct tdesc_type *field_type; | ||
529 | + struct tdesc_type *type; | ||
530 | + | ||
531 | + set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64")); | ||
532 | + | ||
533 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core"); | ||
534 | + field_type = tdesc_create_flags (feature, "i386_eflags", 4); | ||
535 | + tdesc_add_flag (field_type, 0, "CF"); | ||
536 | + tdesc_add_flag (field_type, 1, ""); | ||
537 | + tdesc_add_flag (field_type, 2, "PF"); | ||
538 | + tdesc_add_flag (field_type, 4, "AF"); | ||
539 | + tdesc_add_flag (field_type, 6, "ZF"); | ||
540 | + tdesc_add_flag (field_type, 7, "SF"); | ||
541 | + tdesc_add_flag (field_type, 8, "TF"); | ||
542 | + tdesc_add_flag (field_type, 9, "IF"); | ||
543 | + tdesc_add_flag (field_type, 10, "DF"); | ||
544 | + tdesc_add_flag (field_type, 11, "OF"); | ||
545 | + tdesc_add_flag (field_type, 14, "NT"); | ||
546 | + tdesc_add_flag (field_type, 16, "RF"); | ||
547 | + tdesc_add_flag (field_type, 17, "VM"); | ||
548 | + tdesc_add_flag (field_type, 18, "AC"); | ||
549 | + tdesc_add_flag (field_type, 19, "VIF"); | ||
550 | + tdesc_add_flag (field_type, 20, "VIP"); | ||
551 | + tdesc_add_flag (field_type, 21, "ID"); | ||
552 | + | ||
553 | + tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64"); | ||
554 | + tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64"); | ||
555 | + tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64"); | ||
556 | + tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64"); | ||
557 | + tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64"); | ||
558 | + tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64"); | ||
559 | + tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr"); | ||
560 | + tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr"); | ||
561 | + tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64"); | ||
562 | + tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64"); | ||
563 | + tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64"); | ||
564 | + tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64"); | ||
565 | + tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64"); | ||
566 | + tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64"); | ||
567 | + tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64"); | ||
568 | + tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64"); | ||
569 | + tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr"); | ||
570 | + tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags"); | ||
571 | + tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32"); | ||
572 | + tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32"); | ||
573 | + tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32"); | ||
574 | + tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32"); | ||
575 | + tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32"); | ||
576 | + tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32"); | ||
577 | + tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext"); | ||
578 | + tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext"); | ||
579 | + tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext"); | ||
580 | + tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext"); | ||
581 | + tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext"); | ||
582 | + tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext"); | ||
583 | + tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext"); | ||
584 | + tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext"); | ||
585 | + tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int"); | ||
586 | + tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int"); | ||
587 | + tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int"); | ||
588 | + tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int"); | ||
589 | + tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int"); | ||
590 | + tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int"); | ||
591 | + tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int"); | ||
592 | + tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int"); | ||
593 | + | ||
594 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse"); | ||
595 | + field_type = tdesc_named_type (feature, "ieee_single"); | ||
596 | + tdesc_create_vector (feature, "v4f", field_type, 4); | ||
597 | + | ||
598 | + field_type = tdesc_named_type (feature, "ieee_double"); | ||
599 | + tdesc_create_vector (feature, "v2d", field_type, 2); | ||
600 | + | ||
601 | + field_type = tdesc_named_type (feature, "int8"); | ||
602 | + tdesc_create_vector (feature, "v16i8", field_type, 16); | ||
603 | + | ||
604 | + field_type = tdesc_named_type (feature, "int16"); | ||
605 | + tdesc_create_vector (feature, "v8i16", field_type, 8); | ||
606 | + | ||
607 | + field_type = tdesc_named_type (feature, "int32"); | ||
608 | + tdesc_create_vector (feature, "v4i32", field_type, 4); | ||
609 | + | ||
610 | + field_type = tdesc_named_type (feature, "int64"); | ||
611 | + tdesc_create_vector (feature, "v2i64", field_type, 2); | ||
612 | + | ||
613 | + type = tdesc_create_union (feature, "vec128"); | ||
614 | + field_type = tdesc_named_type (feature, "v4f"); | ||
615 | + tdesc_add_field (type, "v4_float", field_type); | ||
616 | + field_type = tdesc_named_type (feature, "v2d"); | ||
617 | + tdesc_add_field (type, "v2_double", field_type); | ||
618 | + field_type = tdesc_named_type (feature, "v16i8"); | ||
619 | + tdesc_add_field (type, "v16_int8", field_type); | ||
620 | + field_type = tdesc_named_type (feature, "v8i16"); | ||
621 | + tdesc_add_field (type, "v8_int16", field_type); | ||
622 | + field_type = tdesc_named_type (feature, "v4i32"); | ||
623 | + tdesc_add_field (type, "v4_int32", field_type); | ||
624 | + field_type = tdesc_named_type (feature, "v2i64"); | ||
625 | + tdesc_add_field (type, "v2_int64", field_type); | ||
626 | + field_type = tdesc_named_type (feature, "uint128"); | ||
627 | + tdesc_add_field (type, "uint128", field_type); | ||
628 | + | ||
629 | + field_type = tdesc_create_flags (feature, "i386_mxcsr", 4); | ||
630 | + tdesc_add_flag (field_type, 0, "IE"); | ||
631 | + tdesc_add_flag (field_type, 1, "DE"); | ||
632 | + tdesc_add_flag (field_type, 2, "ZE"); | ||
633 | + tdesc_add_flag (field_type, 3, "OE"); | ||
634 | + tdesc_add_flag (field_type, 4, "UE"); | ||
635 | + tdesc_add_flag (field_type, 5, "PE"); | ||
636 | + tdesc_add_flag (field_type, 6, "DAZ"); | ||
637 | + tdesc_add_flag (field_type, 7, "IM"); | ||
638 | + tdesc_add_flag (field_type, 8, "DM"); | ||
639 | + tdesc_add_flag (field_type, 9, "ZM"); | ||
640 | + tdesc_add_flag (field_type, 10, "OM"); | ||
641 | + tdesc_add_flag (field_type, 11, "UM"); | ||
642 | + tdesc_add_flag (field_type, 12, "PM"); | ||
643 | + tdesc_add_flag (field_type, 15, "FZ"); | ||
644 | + | ||
645 | + tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128"); | ||
646 | + tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128"); | ||
647 | + tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128"); | ||
648 | + tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128"); | ||
649 | + tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128"); | ||
650 | + tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128"); | ||
651 | + tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128"); | ||
652 | + tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128"); | ||
653 | + tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128"); | ||
654 | + tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128"); | ||
655 | + tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128"); | ||
656 | + tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128"); | ||
657 | + tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128"); | ||
658 | + tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128"); | ||
659 | + tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128"); | ||
660 | + tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128"); | ||
661 | + tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr"); | ||
662 | + | ||
663 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx"); | ||
664 | + tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128"); | ||
665 | + tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128"); | ||
666 | + tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128"); | ||
667 | + tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128"); | ||
668 | + tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128"); | ||
669 | + tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128"); | ||
670 | + tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128"); | ||
671 | + tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128"); | ||
672 | + tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128"); | ||
673 | + tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128"); | ||
674 | + tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128"); | ||
675 | + tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128"); | ||
676 | + tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128"); | ||
677 | + tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128"); | ||
678 | + tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128"); | ||
679 | + tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128"); | ||
680 | + | ||
681 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx"); | ||
682 | + type = tdesc_create_struct (feature, "br128"); | ||
683 | + field_type = tdesc_named_type (feature, "uint64"); | ||
684 | + tdesc_add_field (type, "lbound", field_type); | ||
685 | + field_type = tdesc_named_type (feature, "uint64"); | ||
686 | + tdesc_add_field (type, "ubound_raw", field_type); | ||
687 | + | ||
688 | + type = tdesc_create_struct (feature, "_bndstatus"); | ||
689 | + tdesc_set_struct_size (type, 8); | ||
690 | + tdesc_add_bitfield (type, "bde", 2, 63); | ||
691 | + tdesc_add_bitfield (type, "error", 0, 1); | ||
692 | + | ||
693 | + type = tdesc_create_union (feature, "status"); | ||
694 | + field_type = tdesc_named_type (feature, "data_ptr"); | ||
695 | + tdesc_add_field (type, "raw", field_type); | ||
696 | + field_type = tdesc_named_type (feature, "_bndstatus"); | ||
697 | + tdesc_add_field (type, "status", field_type); | ||
698 | + | ||
699 | + type = tdesc_create_struct (feature, "_bndcfgu"); | ||
700 | + tdesc_set_struct_size (type, 8); | ||
701 | + tdesc_add_bitfield (type, "base", 12, 63); | ||
702 | + tdesc_add_bitfield (type, "reserved", 2, 11); | ||
703 | + tdesc_add_bitfield (type, "preserved", 1, 1); | ||
704 | + tdesc_add_bitfield (type, "enabled", 0, 0); | ||
705 | + | ||
706 | + type = tdesc_create_union (feature, "cfgu"); | ||
707 | + field_type = tdesc_named_type (feature, "data_ptr"); | ||
708 | + tdesc_add_field (type, "raw", field_type); | ||
709 | + field_type = tdesc_named_type (feature, "_bndcfgu"); | ||
710 | + tdesc_add_field (type, "config", field_type); | ||
711 | + | ||
712 | + tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128"); | ||
713 | + tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128"); | ||
714 | + tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128"); | ||
715 | + tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128"); | ||
716 | + tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu"); | ||
717 | + tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status"); | ||
718 | + | ||
719 | + tdesc_amd64_avx_mpx = result; | ||
720 | +} | ||
721 | diff --git a/gdb/features/i386/amd64-avx-mpx.xml b/gdb/features/i386/amd64-avx-mpx.xml | ||
722 | new file mode 100644 | ||
723 | index 0000000..3eea6dd | ||
724 | --- /dev/null | ||
725 | +++ b/gdb/features/i386/amd64-avx-mpx.xml | ||
726 | @@ -0,0 +1,17 @@ | ||
727 | +<?xml version="1.0"?> | ||
728 | +<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc. | ||
729 | + | ||
730 | + Copying and distribution of this file, with or without modification, | ||
731 | + are permitted in any medium without royalty provided the copyright | ||
732 | + notice and this notice are preserved. --> | ||
733 | + | ||
734 | +<!-- AMD64 with AVX and MPX --> | ||
735 | + | ||
736 | +<!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
737 | +<target> | ||
738 | + <architecture>i386:x86-64</architecture> | ||
739 | + <xi:include href="64bit-core.xml"/> | ||
740 | + <xi:include href="64bit-sse.xml"/> | ||
741 | + <xi:include href="64bit-avx.xml"/> | ||
742 | + <xi:include href="64bit-mpx.xml"/> | ||
743 | +</target> | ||
744 | diff --git a/gdb/features/i386/amd64-mpx-linux.c b/gdb/features/i386/amd64-mpx-linux.c | ||
745 | index 86a1774..5c1584b 100644 | ||
746 | --- a/gdb/features/i386/amd64-mpx-linux.c | ||
747 | +++ b/gdb/features/i386/amd64-mpx-linux.c | ||
748 | @@ -151,24 +151,6 @@ initialize_tdesc_amd64_mpx_linux (void) | ||
749 | feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux"); | ||
750 | tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int"); | ||
751 | |||
752 | - feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx"); | ||
753 | - tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128"); | ||
754 | - tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128"); | ||
755 | - tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128"); | ||
756 | - tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128"); | ||
757 | - tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128"); | ||
758 | - tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128"); | ||
759 | - tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128"); | ||
760 | - tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128"); | ||
761 | - tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128"); | ||
762 | - tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128"); | ||
763 | - tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128"); | ||
764 | - tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128"); | ||
765 | - tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128"); | ||
766 | - tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128"); | ||
767 | - tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128"); | ||
768 | - tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128"); | ||
769 | - | ||
770 | feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx"); | ||
771 | type = tdesc_create_struct (feature, "br128"); | ||
772 | field_type = tdesc_named_type (feature, "uint64"); | ||
773 | @@ -200,12 +182,12 @@ initialize_tdesc_amd64_mpx_linux (void) | ||
774 | field_type = tdesc_named_type (feature, "_bndcfgu"); | ||
775 | tdesc_add_field (type, "config", field_type); | ||
776 | |||
777 | - tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128"); | ||
778 | - tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128"); | ||
779 | - tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128"); | ||
780 | - tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128"); | ||
781 | - tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu"); | ||
782 | - tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status"); | ||
783 | + tdesc_create_reg (feature, "bnd0raw", 58, 1, NULL, 128, "br128"); | ||
784 | + tdesc_create_reg (feature, "bnd1raw", 59, 1, NULL, 128, "br128"); | ||
785 | + tdesc_create_reg (feature, "bnd2raw", 60, 1, NULL, 128, "br128"); | ||
786 | + tdesc_create_reg (feature, "bnd3raw", 61, 1, NULL, 128, "br128"); | ||
787 | + tdesc_create_reg (feature, "bndcfgu", 62, 1, NULL, 64, "cfgu"); | ||
788 | + tdesc_create_reg (feature, "bndstatus", 63, 1, NULL, 64, "status"); | ||
789 | |||
790 | tdesc_amd64_mpx_linux = result; | ||
791 | } | ||
792 | diff --git a/gdb/features/i386/amd64-mpx-linux.xml b/gdb/features/i386/amd64-mpx-linux.xml | ||
793 | index 15e87b4..835126b 100644 | ||
794 | --- a/gdb/features/i386/amd64-mpx-linux.xml | ||
795 | +++ b/gdb/features/i386/amd64-mpx-linux.xml | ||
796 | @@ -14,6 +14,5 @@ | ||
797 | <xi:include href="64bit-core.xml"/> | ||
798 | <xi:include href="64bit-sse.xml"/> | ||
799 | <xi:include href="64bit-linux.xml"/> | ||
800 | - <xi:include href="64bit-avx.xml"/> | ||
801 | <xi:include href="64bit-mpx.xml"/> | ||
802 | </target> | ||
803 | diff --git a/gdb/features/i386/amd64-mpx.c b/gdb/features/i386/amd64-mpx.c | ||
804 | index 15ae5f7..4c852ef 100644 | ||
805 | --- a/gdb/features/i386/amd64-mpx.c | ||
806 | +++ b/gdb/features/i386/amd64-mpx.c | ||
807 | @@ -146,24 +146,6 @@ initialize_tdesc_amd64_mpx (void) | ||
808 | tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128"); | ||
809 | tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr"); | ||
810 | |||
811 | - feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx"); | ||
812 | - tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128"); | ||
813 | - tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128"); | ||
814 | - tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128"); | ||
815 | - tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128"); | ||
816 | - tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128"); | ||
817 | - tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128"); | ||
818 | - tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128"); | ||
819 | - tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128"); | ||
820 | - tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128"); | ||
821 | - tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128"); | ||
822 | - tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128"); | ||
823 | - tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128"); | ||
824 | - tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128"); | ||
825 | - tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128"); | ||
826 | - tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128"); | ||
827 | - tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128"); | ||
828 | - | ||
829 | feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx"); | ||
830 | type = tdesc_create_struct (feature, "br128"); | ||
831 | field_type = tdesc_named_type (feature, "uint64"); | ||
832 | @@ -195,12 +177,12 @@ initialize_tdesc_amd64_mpx (void) | ||
833 | field_type = tdesc_named_type (feature, "_bndcfgu"); | ||
834 | tdesc_add_field (type, "config", field_type); | ||
835 | |||
836 | - tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128"); | ||
837 | - tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128"); | ||
838 | - tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128"); | ||
839 | - tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128"); | ||
840 | - tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu"); | ||
841 | - tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status"); | ||
842 | + tdesc_create_reg (feature, "bnd0raw", 57, 1, NULL, 128, "br128"); | ||
843 | + tdesc_create_reg (feature, "bnd1raw", 58, 1, NULL, 128, "br128"); | ||
844 | + tdesc_create_reg (feature, "bnd2raw", 59, 1, NULL, 128, "br128"); | ||
845 | + tdesc_create_reg (feature, "bnd3raw", 60, 1, NULL, 128, "br128"); | ||
846 | + tdesc_create_reg (feature, "bndcfgu", 61, 1, NULL, 64, "cfgu"); | ||
847 | + tdesc_create_reg (feature, "bndstatus", 62, 1, NULL, 64, "status"); | ||
848 | |||
849 | tdesc_amd64_mpx = result; | ||
850 | } | ||
851 | diff --git a/gdb/features/i386/amd64-mpx.xml b/gdb/features/i386/amd64-mpx.xml | ||
852 | index 21b6df3..e458736 100644 | ||
853 | --- a/gdb/features/i386/amd64-mpx.xml | ||
854 | +++ b/gdb/features/i386/amd64-mpx.xml | ||
855 | @@ -12,6 +12,5 @@ | ||
856 | <architecture>i386:x86-64</architecture> | ||
857 | <xi:include href="64bit-core.xml"/> | ||
858 | <xi:include href="64bit-sse.xml"/> | ||
859 | - <xi:include href="64bit-avx.xml"/> | ||
860 | <xi:include href="64bit-mpx.xml"/> | ||
861 | </target> | ||
862 | diff --git a/gdb/features/i386/i386-avx-mpx-linux.c b/gdb/features/i386/i386-avx-mpx-linux.c | ||
863 | new file mode 100644 | ||
864 | index 0000000..dd75403 | ||
865 | --- /dev/null | ||
866 | +++ b/gdb/features/i386/i386-avx-mpx-linux.c | ||
867 | @@ -0,0 +1,187 @@ | ||
868 | +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: | ||
869 | + Original: i386-avx-mpx-linux.xml */ | ||
870 | + | ||
871 | +#include "defs.h" | ||
872 | +#include "osabi.h" | ||
873 | +#include "target-descriptions.h" | ||
874 | + | ||
875 | +struct target_desc *tdesc_i386_avx_mpx_linux; | ||
876 | +static void | ||
877 | +initialize_tdesc_i386_avx_mpx_linux (void) | ||
878 | +{ | ||
879 | + struct target_desc *result = allocate_target_description (); | ||
880 | + struct tdesc_feature *feature; | ||
881 | + struct tdesc_type *field_type; | ||
882 | + struct tdesc_type *type; | ||
883 | + | ||
884 | + set_tdesc_architecture (result, bfd_scan_arch ("i386")); | ||
885 | + | ||
886 | + set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux")); | ||
887 | + | ||
888 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core"); | ||
889 | + field_type = tdesc_create_flags (feature, "i386_eflags", 4); | ||
890 | + tdesc_add_flag (field_type, 0, "CF"); | ||
891 | + tdesc_add_flag (field_type, 1, ""); | ||
892 | + tdesc_add_flag (field_type, 2, "PF"); | ||
893 | + tdesc_add_flag (field_type, 4, "AF"); | ||
894 | + tdesc_add_flag (field_type, 6, "ZF"); | ||
895 | + tdesc_add_flag (field_type, 7, "SF"); | ||
896 | + tdesc_add_flag (field_type, 8, "TF"); | ||
897 | + tdesc_add_flag (field_type, 9, "IF"); | ||
898 | + tdesc_add_flag (field_type, 10, "DF"); | ||
899 | + tdesc_add_flag (field_type, 11, "OF"); | ||
900 | + tdesc_add_flag (field_type, 14, "NT"); | ||
901 | + tdesc_add_flag (field_type, 16, "RF"); | ||
902 | + tdesc_add_flag (field_type, 17, "VM"); | ||
903 | + tdesc_add_flag (field_type, 18, "AC"); | ||
904 | + tdesc_add_flag (field_type, 19, "VIF"); | ||
905 | + tdesc_add_flag (field_type, 20, "VIP"); | ||
906 | + tdesc_add_flag (field_type, 21, "ID"); | ||
907 | + | ||
908 | + tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32"); | ||
909 | + tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32"); | ||
910 | + tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32"); | ||
911 | + tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32"); | ||
912 | + tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr"); | ||
913 | + tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr"); | ||
914 | + tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32"); | ||
915 | + tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32"); | ||
916 | + tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr"); | ||
917 | + tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags"); | ||
918 | + tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32"); | ||
919 | + tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32"); | ||
920 | + tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32"); | ||
921 | + tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32"); | ||
922 | + tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32"); | ||
923 | + tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32"); | ||
924 | + tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext"); | ||
925 | + tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext"); | ||
926 | + tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext"); | ||
927 | + tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext"); | ||
928 | + tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext"); | ||
929 | + tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext"); | ||
930 | + tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext"); | ||
931 | + tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext"); | ||
932 | + tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int"); | ||
933 | + tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int"); | ||
934 | + tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int"); | ||
935 | + tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int"); | ||
936 | + tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int"); | ||
937 | + tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int"); | ||
938 | + tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int"); | ||
939 | + tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int"); | ||
940 | + | ||
941 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse"); | ||
942 | + field_type = tdesc_named_type (feature, "ieee_single"); | ||
943 | + tdesc_create_vector (feature, "v4f", field_type, 4); | ||
944 | + | ||
945 | + field_type = tdesc_named_type (feature, "ieee_double"); | ||
946 | + tdesc_create_vector (feature, "v2d", field_type, 2); | ||
947 | + | ||
948 | + field_type = tdesc_named_type (feature, "int8"); | ||
949 | + tdesc_create_vector (feature, "v16i8", field_type, 16); | ||
950 | + | ||
951 | + field_type = tdesc_named_type (feature, "int16"); | ||
952 | + tdesc_create_vector (feature, "v8i16", field_type, 8); | ||
953 | + | ||
954 | + field_type = tdesc_named_type (feature, "int32"); | ||
955 | + tdesc_create_vector (feature, "v4i32", field_type, 4); | ||
956 | + | ||
957 | + field_type = tdesc_named_type (feature, "int64"); | ||
958 | + tdesc_create_vector (feature, "v2i64", field_type, 2); | ||
959 | + | ||
960 | + type = tdesc_create_union (feature, "vec128"); | ||
961 | + field_type = tdesc_named_type (feature, "v4f"); | ||
962 | + tdesc_add_field (type, "v4_float", field_type); | ||
963 | + field_type = tdesc_named_type (feature, "v2d"); | ||
964 | + tdesc_add_field (type, "v2_double", field_type); | ||
965 | + field_type = tdesc_named_type (feature, "v16i8"); | ||
966 | + tdesc_add_field (type, "v16_int8", field_type); | ||
967 | + field_type = tdesc_named_type (feature, "v8i16"); | ||
968 | + tdesc_add_field (type, "v8_int16", field_type); | ||
969 | + field_type = tdesc_named_type (feature, "v4i32"); | ||
970 | + tdesc_add_field (type, "v4_int32", field_type); | ||
971 | + field_type = tdesc_named_type (feature, "v2i64"); | ||
972 | + tdesc_add_field (type, "v2_int64", field_type); | ||
973 | + field_type = tdesc_named_type (feature, "uint128"); | ||
974 | + tdesc_add_field (type, "uint128", field_type); | ||
975 | + | ||
976 | + field_type = tdesc_create_flags (feature, "i386_mxcsr", 4); | ||
977 | + tdesc_add_flag (field_type, 0, "IE"); | ||
978 | + tdesc_add_flag (field_type, 1, "DE"); | ||
979 | + tdesc_add_flag (field_type, 2, "ZE"); | ||
980 | + tdesc_add_flag (field_type, 3, "OE"); | ||
981 | + tdesc_add_flag (field_type, 4, "UE"); | ||
982 | + tdesc_add_flag (field_type, 5, "PE"); | ||
983 | + tdesc_add_flag (field_type, 6, "DAZ"); | ||
984 | + tdesc_add_flag (field_type, 7, "IM"); | ||
985 | + tdesc_add_flag (field_type, 8, "DM"); | ||
986 | + tdesc_add_flag (field_type, 9, "ZM"); | ||
987 | + tdesc_add_flag (field_type, 10, "OM"); | ||
988 | + tdesc_add_flag (field_type, 11, "UM"); | ||
989 | + tdesc_add_flag (field_type, 12, "PM"); | ||
990 | + tdesc_add_flag (field_type, 15, "FZ"); | ||
991 | + | ||
992 | + tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128"); | ||
993 | + tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128"); | ||
994 | + tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128"); | ||
995 | + tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128"); | ||
996 | + tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128"); | ||
997 | + tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128"); | ||
998 | + tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128"); | ||
999 | + tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128"); | ||
1000 | + tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr"); | ||
1001 | + | ||
1002 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux"); | ||
1003 | + tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int"); | ||
1004 | + | ||
1005 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx"); | ||
1006 | + tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128"); | ||
1007 | + tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128"); | ||
1008 | + tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128"); | ||
1009 | + tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128"); | ||
1010 | + tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128"); | ||
1011 | + tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128"); | ||
1012 | + tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128"); | ||
1013 | + tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128"); | ||
1014 | + | ||
1015 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx"); | ||
1016 | + type = tdesc_create_struct (feature, "br128"); | ||
1017 | + field_type = tdesc_named_type (feature, "uint64"); | ||
1018 | + tdesc_add_field (type, "lbound", field_type); | ||
1019 | + field_type = tdesc_named_type (feature, "uint64"); | ||
1020 | + tdesc_add_field (type, "ubound_raw", field_type); | ||
1021 | + | ||
1022 | + type = tdesc_create_struct (feature, "_bndstatus"); | ||
1023 | + tdesc_set_struct_size (type, 8); | ||
1024 | + tdesc_add_bitfield (type, "bde", 2, 31); | ||
1025 | + tdesc_add_bitfield (type, "error", 0, 1); | ||
1026 | + | ||
1027 | + type = tdesc_create_union (feature, "status"); | ||
1028 | + field_type = tdesc_named_type (feature, "data_ptr"); | ||
1029 | + tdesc_add_field (type, "raw", field_type); | ||
1030 | + field_type = tdesc_named_type (feature, "_bndstatus"); | ||
1031 | + tdesc_add_field (type, "status", field_type); | ||
1032 | + | ||
1033 | + type = tdesc_create_struct (feature, "_bndcfgu"); | ||
1034 | + tdesc_set_struct_size (type, 8); | ||
1035 | + tdesc_add_bitfield (type, "base", 12, 31); | ||
1036 | + tdesc_add_bitfield (type, "reserved", 2, 11); | ||
1037 | + tdesc_add_bitfield (type, "preserved", 1, 1); | ||
1038 | + tdesc_add_bitfield (type, "enabled", 0, 1); | ||
1039 | + | ||
1040 | + type = tdesc_create_union (feature, "cfgu"); | ||
1041 | + field_type = tdesc_named_type (feature, "data_ptr"); | ||
1042 | + tdesc_add_field (type, "raw", field_type); | ||
1043 | + field_type = tdesc_named_type (feature, "_bndcfgu"); | ||
1044 | + tdesc_add_field (type, "config", field_type); | ||
1045 | + | ||
1046 | + tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128"); | ||
1047 | + tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128"); | ||
1048 | + tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128"); | ||
1049 | + tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128"); | ||
1050 | + tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu"); | ||
1051 | + tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status"); | ||
1052 | + | ||
1053 | + tdesc_i386_avx_mpx_linux = result; | ||
1054 | +} | ||
1055 | diff --git a/gdb/features/i386/i386-avx-mpx-linux.xml b/gdb/features/i386/i386-avx-mpx-linux.xml | ||
1056 | new file mode 100644 | ||
1057 | index 0000000..c9a1a61 | ||
1058 | --- /dev/null | ||
1059 | +++ b/gdb/features/i386/i386-avx-mpx-linux.xml | ||
1060 | @@ -0,0 +1,19 @@ | ||
1061 | +<?xml version="1.0"?> | ||
1062 | +<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc. | ||
1063 | + | ||
1064 | + Copying and distribution of this file, with or without modification, | ||
1065 | + are permitted in any medium without royalty provided the copyright | ||
1066 | + notice and this notice are preserved. --> | ||
1067 | + | ||
1068 | +<!-- I386 with AVX and MPX- Includes Linux-only special "register". --> | ||
1069 | + | ||
1070 | +<!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
1071 | +<target> | ||
1072 | + <architecture>i386</architecture> | ||
1073 | + <osabi>GNU/Linux</osabi> | ||
1074 | + <xi:include href="32bit-core.xml"/> | ||
1075 | + <xi:include href="32bit-sse.xml"/> | ||
1076 | + <xi:include href="32bit-linux.xml"/> | ||
1077 | + <xi:include href="32bit-avx.xml"/> | ||
1078 | + <xi:include href="32bit-mpx.xml"/> | ||
1079 | +</target> | ||
1080 | diff --git a/gdb/features/i386/i386-avx-mpx.c b/gdb/features/i386/i386-avx-mpx.c | ||
1081 | new file mode 100644 | ||
1082 | index 0000000..f104e4b | ||
1083 | --- /dev/null | ||
1084 | +++ b/gdb/features/i386/i386-avx-mpx.c | ||
1085 | @@ -0,0 +1,182 @@ | ||
1086 | +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: | ||
1087 | + Original: i386-avx-mpx.xml */ | ||
1088 | + | ||
1089 | +#include "defs.h" | ||
1090 | +#include "osabi.h" | ||
1091 | +#include "target-descriptions.h" | ||
1092 | + | ||
1093 | +struct target_desc *tdesc_i386_avx_mpx; | ||
1094 | +static void | ||
1095 | +initialize_tdesc_i386_avx_mpx (void) | ||
1096 | +{ | ||
1097 | + struct target_desc *result = allocate_target_description (); | ||
1098 | + struct tdesc_feature *feature; | ||
1099 | + struct tdesc_type *field_type; | ||
1100 | + struct tdesc_type *type; | ||
1101 | + | ||
1102 | + set_tdesc_architecture (result, bfd_scan_arch ("i386")); | ||
1103 | + | ||
1104 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core"); | ||
1105 | + field_type = tdesc_create_flags (feature, "i386_eflags", 4); | ||
1106 | + tdesc_add_flag (field_type, 0, "CF"); | ||
1107 | + tdesc_add_flag (field_type, 1, ""); | ||
1108 | + tdesc_add_flag (field_type, 2, "PF"); | ||
1109 | + tdesc_add_flag (field_type, 4, "AF"); | ||
1110 | + tdesc_add_flag (field_type, 6, "ZF"); | ||
1111 | + tdesc_add_flag (field_type, 7, "SF"); | ||
1112 | + tdesc_add_flag (field_type, 8, "TF"); | ||
1113 | + tdesc_add_flag (field_type, 9, "IF"); | ||
1114 | + tdesc_add_flag (field_type, 10, "DF"); | ||
1115 | + tdesc_add_flag (field_type, 11, "OF"); | ||
1116 | + tdesc_add_flag (field_type, 14, "NT"); | ||
1117 | + tdesc_add_flag (field_type, 16, "RF"); | ||
1118 | + tdesc_add_flag (field_type, 17, "VM"); | ||
1119 | + tdesc_add_flag (field_type, 18, "AC"); | ||
1120 | + tdesc_add_flag (field_type, 19, "VIF"); | ||
1121 | + tdesc_add_flag (field_type, 20, "VIP"); | ||
1122 | + tdesc_add_flag (field_type, 21, "ID"); | ||
1123 | + | ||
1124 | + tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32"); | ||
1125 | + tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32"); | ||
1126 | + tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32"); | ||
1127 | + tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32"); | ||
1128 | + tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr"); | ||
1129 | + tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr"); | ||
1130 | + tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32"); | ||
1131 | + tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32"); | ||
1132 | + tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr"); | ||
1133 | + tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags"); | ||
1134 | + tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32"); | ||
1135 | + tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32"); | ||
1136 | + tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32"); | ||
1137 | + tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32"); | ||
1138 | + tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32"); | ||
1139 | + tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32"); | ||
1140 | + tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext"); | ||
1141 | + tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext"); | ||
1142 | + tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext"); | ||
1143 | + tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext"); | ||
1144 | + tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext"); | ||
1145 | + tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext"); | ||
1146 | + tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext"); | ||
1147 | + tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext"); | ||
1148 | + tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int"); | ||
1149 | + tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int"); | ||
1150 | + tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int"); | ||
1151 | + tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int"); | ||
1152 | + tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int"); | ||
1153 | + tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int"); | ||
1154 | + tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int"); | ||
1155 | + tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int"); | ||
1156 | + | ||
1157 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse"); | ||
1158 | + field_type = tdesc_named_type (feature, "ieee_single"); | ||
1159 | + tdesc_create_vector (feature, "v4f", field_type, 4); | ||
1160 | + | ||
1161 | + field_type = tdesc_named_type (feature, "ieee_double"); | ||
1162 | + tdesc_create_vector (feature, "v2d", field_type, 2); | ||
1163 | + | ||
1164 | + field_type = tdesc_named_type (feature, "int8"); | ||
1165 | + tdesc_create_vector (feature, "v16i8", field_type, 16); | ||
1166 | + | ||
1167 | + field_type = tdesc_named_type (feature, "int16"); | ||
1168 | + tdesc_create_vector (feature, "v8i16", field_type, 8); | ||
1169 | + | ||
1170 | + field_type = tdesc_named_type (feature, "int32"); | ||
1171 | + tdesc_create_vector (feature, "v4i32", field_type, 4); | ||
1172 | + | ||
1173 | + field_type = tdesc_named_type (feature, "int64"); | ||
1174 | + tdesc_create_vector (feature, "v2i64", field_type, 2); | ||
1175 | + | ||
1176 | + type = tdesc_create_union (feature, "vec128"); | ||
1177 | + field_type = tdesc_named_type (feature, "v4f"); | ||
1178 | + tdesc_add_field (type, "v4_float", field_type); | ||
1179 | + field_type = tdesc_named_type (feature, "v2d"); | ||
1180 | + tdesc_add_field (type, "v2_double", field_type); | ||
1181 | + field_type = tdesc_named_type (feature, "v16i8"); | ||
1182 | + tdesc_add_field (type, "v16_int8", field_type); | ||
1183 | + field_type = tdesc_named_type (feature, "v8i16"); | ||
1184 | + tdesc_add_field (type, "v8_int16", field_type); | ||
1185 | + field_type = tdesc_named_type (feature, "v4i32"); | ||
1186 | + tdesc_add_field (type, "v4_int32", field_type); | ||
1187 | + field_type = tdesc_named_type (feature, "v2i64"); | ||
1188 | + tdesc_add_field (type, "v2_int64", field_type); | ||
1189 | + field_type = tdesc_named_type (feature, "uint128"); | ||
1190 | + tdesc_add_field (type, "uint128", field_type); | ||
1191 | + | ||
1192 | + field_type = tdesc_create_flags (feature, "i386_mxcsr", 4); | ||
1193 | + tdesc_add_flag (field_type, 0, "IE"); | ||
1194 | + tdesc_add_flag (field_type, 1, "DE"); | ||
1195 | + tdesc_add_flag (field_type, 2, "ZE"); | ||
1196 | + tdesc_add_flag (field_type, 3, "OE"); | ||
1197 | + tdesc_add_flag (field_type, 4, "UE"); | ||
1198 | + tdesc_add_flag (field_type, 5, "PE"); | ||
1199 | + tdesc_add_flag (field_type, 6, "DAZ"); | ||
1200 | + tdesc_add_flag (field_type, 7, "IM"); | ||
1201 | + tdesc_add_flag (field_type, 8, "DM"); | ||
1202 | + tdesc_add_flag (field_type, 9, "ZM"); | ||
1203 | + tdesc_add_flag (field_type, 10, "OM"); | ||
1204 | + tdesc_add_flag (field_type, 11, "UM"); | ||
1205 | + tdesc_add_flag (field_type, 12, "PM"); | ||
1206 | + tdesc_add_flag (field_type, 15, "FZ"); | ||
1207 | + | ||
1208 | + tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128"); | ||
1209 | + tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128"); | ||
1210 | + tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128"); | ||
1211 | + tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128"); | ||
1212 | + tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128"); | ||
1213 | + tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128"); | ||
1214 | + tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128"); | ||
1215 | + tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128"); | ||
1216 | + tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr"); | ||
1217 | + | ||
1218 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx"); | ||
1219 | + tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128"); | ||
1220 | + tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128"); | ||
1221 | + tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128"); | ||
1222 | + tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128"); | ||
1223 | + tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128"); | ||
1224 | + tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128"); | ||
1225 | + tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128"); | ||
1226 | + tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128"); | ||
1227 | + | ||
1228 | + feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx"); | ||
1229 | + type = tdesc_create_struct (feature, "br128"); | ||
1230 | + field_type = tdesc_named_type (feature, "uint64"); | ||
1231 | + tdesc_add_field (type, "lbound", field_type); | ||
1232 | + field_type = tdesc_named_type (feature, "uint64"); | ||
1233 | + tdesc_add_field (type, "ubound_raw", field_type); | ||
1234 | + | ||
1235 | + type = tdesc_create_struct (feature, "_bndstatus"); | ||
1236 | + tdesc_set_struct_size (type, 8); | ||
1237 | + tdesc_add_bitfield (type, "bde", 2, 31); | ||
1238 | + tdesc_add_bitfield (type, "error", 0, 1); | ||
1239 | + | ||
1240 | + type = tdesc_create_union (feature, "status"); | ||
1241 | + field_type = tdesc_named_type (feature, "data_ptr"); | ||
1242 | + tdesc_add_field (type, "raw", field_type); | ||
1243 | + field_type = tdesc_named_type (feature, "_bndstatus"); | ||
1244 | + tdesc_add_field (type, "status", field_type); | ||
1245 | + | ||
1246 | + type = tdesc_create_struct (feature, "_bndcfgu"); | ||
1247 | + tdesc_set_struct_size (type, 8); | ||
1248 | + tdesc_add_bitfield (type, "base", 12, 31); | ||
1249 | + tdesc_add_bitfield (type, "reserved", 2, 11); | ||
1250 | + tdesc_add_bitfield (type, "preserved", 1, 1); | ||
1251 | + tdesc_add_bitfield (type, "enabled", 0, 1); | ||
1252 | + | ||
1253 | + type = tdesc_create_union (feature, "cfgu"); | ||
1254 | + field_type = tdesc_named_type (feature, "data_ptr"); | ||
1255 | + tdesc_add_field (type, "raw", field_type); | ||
1256 | + field_type = tdesc_named_type (feature, "_bndcfgu"); | ||
1257 | + tdesc_add_field (type, "config", field_type); | ||
1258 | + | ||
1259 | + tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128"); | ||
1260 | + tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128"); | ||
1261 | + tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128"); | ||
1262 | + tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128"); | ||
1263 | + tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu"); | ||
1264 | + tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status"); | ||
1265 | + | ||
1266 | + tdesc_i386_avx_mpx = result; | ||
1267 | +} | ||
1268 | diff --git a/gdb/features/i386/i386-avx-mpx.xml b/gdb/features/i386/i386-avx-mpx.xml | ||
1269 | new file mode 100644 | ||
1270 | index 0000000..ab97367 | ||
1271 | --- /dev/null | ||
1272 | +++ b/gdb/features/i386/i386-avx-mpx.xml | ||
1273 | @@ -0,0 +1,17 @@ | ||
1274 | +<?xml version="1.0"?> | ||
1275 | +<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc. | ||
1276 | + | ||
1277 | + Copying and distribution of this file, with or without modification, | ||
1278 | + are permitted in any medium without royalty provided the copyright | ||
1279 | + notice and this notice are preserved. --> | ||
1280 | + | ||
1281 | +<!-- I386 with AVX and MPX --> | ||
1282 | + | ||
1283 | +<!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
1284 | +<target> | ||
1285 | + <architecture>i386</architecture> | ||
1286 | + <xi:include href="32bit-core.xml"/> | ||
1287 | + <xi:include href="32bit-sse.xml"/> | ||
1288 | + <xi:include href="32bit-avx.xml"/> | ||
1289 | + <xi:include href="32bit-mpx.xml"/> | ||
1290 | +</target> | ||
1291 | diff --git a/gdb/features/i386/i386-mpx-linux.c b/gdb/features/i386/i386-mpx-linux.c | ||
1292 | index dbf8789..c6bafea 100644 | ||
1293 | --- a/gdb/features/i386/i386-mpx-linux.c | ||
1294 | +++ b/gdb/features/i386/i386-mpx-linux.c | ||
1295 | @@ -135,16 +135,6 @@ initialize_tdesc_i386_mpx_linux (void) | ||
1296 | feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux"); | ||
1297 | tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int"); | ||
1298 | |||
1299 | - feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx"); | ||
1300 | - tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128"); | ||
1301 | - tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128"); | ||
1302 | - tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128"); | ||
1303 | - tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128"); | ||
1304 | - tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128"); | ||
1305 | - tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128"); | ||
1306 | - tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128"); | ||
1307 | - tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128"); | ||
1308 | - | ||
1309 | feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx"); | ||
1310 | type = tdesc_create_struct (feature, "br128"); | ||
1311 | field_type = tdesc_named_type (feature, "uint64"); | ||
1312 | @@ -176,12 +166,12 @@ initialize_tdesc_i386_mpx_linux (void) | ||
1313 | field_type = tdesc_named_type (feature, "_bndcfgu"); | ||
1314 | tdesc_add_field (type, "config", field_type); | ||
1315 | |||
1316 | - tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128"); | ||
1317 | - tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128"); | ||
1318 | - tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128"); | ||
1319 | - tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128"); | ||
1320 | - tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu"); | ||
1321 | - tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status"); | ||
1322 | + tdesc_create_reg (feature, "bnd0raw", 42, 1, NULL, 128, "br128"); | ||
1323 | + tdesc_create_reg (feature, "bnd1raw", 43, 1, NULL, 128, "br128"); | ||
1324 | + tdesc_create_reg (feature, "bnd2raw", 44, 1, NULL, 128, "br128"); | ||
1325 | + tdesc_create_reg (feature, "bnd3raw", 45, 1, NULL, 128, "br128"); | ||
1326 | + tdesc_create_reg (feature, "bndcfgu", 46, 1, NULL, 64, "cfgu"); | ||
1327 | + tdesc_create_reg (feature, "bndstatus", 47, 1, NULL, 64, "status"); | ||
1328 | |||
1329 | tdesc_i386_mpx_linux = result; | ||
1330 | } | ||
1331 | diff --git a/gdb/features/i386/i386-mpx-linux.xml b/gdb/features/i386/i386-mpx-linux.xml | ||
1332 | index c4004d6..4228cf5 100644 | ||
1333 | --- a/gdb/features/i386/i386-mpx-linux.xml | ||
1334 | +++ b/gdb/features/i386/i386-mpx-linux.xml | ||
1335 | @@ -14,6 +14,5 @@ | ||
1336 | <xi:include href="32bit-core.xml"/> | ||
1337 | <xi:include href="32bit-sse.xml"/> | ||
1338 | <xi:include href="32bit-linux.xml"/> | ||
1339 | - <xi:include href="32bit-avx.xml"/> | ||
1340 | <xi:include href="32bit-mpx.xml"/> | ||
1341 | </target> | ||
1342 | diff --git a/gdb/features/i386/i386-mpx.c b/gdb/features/i386/i386-mpx.c | ||
1343 | index 1e04afd..430db3f 100644 | ||
1344 | --- a/gdb/features/i386/i386-mpx.c | ||
1345 | +++ b/gdb/features/i386/i386-mpx.c | ||
1346 | @@ -130,16 +130,6 @@ initialize_tdesc_i386_mpx (void) | ||
1347 | tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128"); | ||
1348 | tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr"); | ||
1349 | |||
1350 | - feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx"); | ||
1351 | - tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128"); | ||
1352 | - tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128"); | ||
1353 | - tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128"); | ||
1354 | - tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128"); | ||
1355 | - tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128"); | ||
1356 | - tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128"); | ||
1357 | - tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128"); | ||
1358 | - tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128"); | ||
1359 | - | ||
1360 | feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx"); | ||
1361 | type = tdesc_create_struct (feature, "br128"); | ||
1362 | field_type = tdesc_named_type (feature, "uint64"); | ||
1363 | @@ -171,12 +161,12 @@ initialize_tdesc_i386_mpx (void) | ||
1364 | field_type = tdesc_named_type (feature, "_bndcfgu"); | ||
1365 | tdesc_add_field (type, "config", field_type); | ||
1366 | |||
1367 | - tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128"); | ||
1368 | - tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128"); | ||
1369 | - tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128"); | ||
1370 | - tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128"); | ||
1371 | - tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu"); | ||
1372 | - tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status"); | ||
1373 | + tdesc_create_reg (feature, "bnd0raw", 41, 1, NULL, 128, "br128"); | ||
1374 | + tdesc_create_reg (feature, "bnd1raw", 42, 1, NULL, 128, "br128"); | ||
1375 | + tdesc_create_reg (feature, "bnd2raw", 43, 1, NULL, 128, "br128"); | ||
1376 | + tdesc_create_reg (feature, "bnd3raw", 44, 1, NULL, 128, "br128"); | ||
1377 | + tdesc_create_reg (feature, "bndcfgu", 45, 1, NULL, 64, "cfgu"); | ||
1378 | + tdesc_create_reg (feature, "bndstatus", 46, 1, NULL, 64, "status"); | ||
1379 | |||
1380 | tdesc_i386_mpx = result; | ||
1381 | } | ||
1382 | diff --git a/gdb/features/i386/i386-mpx.xml b/gdb/features/i386/i386-mpx.xml | ||
1383 | index 52a68db..c1806cb 100644 | ||
1384 | --- a/gdb/features/i386/i386-mpx.xml | ||
1385 | +++ b/gdb/features/i386/i386-mpx.xml | ||
1386 | @@ -12,6 +12,5 @@ | ||
1387 | <architecture>i386</architecture> | ||
1388 | <xi:include href="32bit-core.xml"/> | ||
1389 | <xi:include href="32bit-sse.xml"/> | ||
1390 | - <xi:include href="32bit-avx.xml"/> | ||
1391 | <xi:include href="32bit-mpx.xml"/> | ||
1392 | </target> | ||
1393 | diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in | ||
1394 | index 1e874e3..dee2ea1 100644 | ||
1395 | --- a/gdb/gdbserver/Makefile.in | ||
1396 | +++ b/gdb/gdbserver/Makefile.in | ||
1397 | @@ -376,9 +376,11 @@ clean: | ||
1398 | rm -f xml-builtin.c stamp-xml | ||
1399 | rm -f i386-avx.c i386-avx-linux.c | ||
1400 | rm -f i386-mpx.c i386-mpx-linux.c | ||
1401 | + rm -f i386-avx-mpx.c i386-avx-mpx-linux.c | ||
1402 | rm -f i386-avx512.c i386-avx512-linux.c | ||
1403 | rm -f amd64-avx.c amd64-avx-linux.c | ||
1404 | rm -f amd64-mpx.c amd64-mpx-linux.c | ||
1405 | + rm -f amd64-avx-mpx.c amd64-avx-mpx-linux.c | ||
1406 | rm -f amd64-avx512.c amd64-avx512-linux.c | ||
1407 | rm -f i386-mmx.c i386-mmx-linux.c | ||
1408 | rm -f x32.c x32-linux.c | ||
1409 | @@ -495,6 +497,21 @@ regcache-ipa.o: regcache.c | ||
1410 | i386-linux-ipa.o: i386-linux.c | ||
1411 | $(IPAGENT_COMPILE) $< | ||
1412 | $(POSTCOMPILE) | ||
1413 | +i386-mmx-linux-ipa.o: i386-mmx-linux.c | ||
1414 | + $(IPAGENT_COMPILE) $< | ||
1415 | + $(POSTCOMPILE) | ||
1416 | +i386-avx-linux-ipa.o: i386-avx-linux.c | ||
1417 | + $(IPAGENT_COMPILE) $< | ||
1418 | + $(POSTCOMPILE) | ||
1419 | +i386-mpx-linux-ipa.o: i386-mpx-linux.c | ||
1420 | + $(IPAGENT_COMPILE) $< | ||
1421 | + $(POSTCOMPILE) | ||
1422 | +i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c | ||
1423 | + $(IPAGENT_COMPILE) $< | ||
1424 | + $(POSTCOMPILE) | ||
1425 | +i386-avx512-linux-ipa.o: i386-avx512-linux.c | ||
1426 | + $(IPAGENT_COMPILE) $< | ||
1427 | + $(POSTCOMPILE) | ||
1428 | linux-i386-ipa.o: linux-i386-ipa.c | ||
1429 | $(IPAGENT_COMPILE) $< | ||
1430 | $(POSTCOMPILE) | ||
1431 | @@ -504,6 +521,18 @@ linux-amd64-ipa.o: linux-amd64-ipa.c | ||
1432 | amd64-linux-ipa.o: amd64-linux.c | ||
1433 | $(IPAGENT_COMPILE) $< | ||
1434 | $(POSTCOMPILE) | ||
1435 | +amd64-avx-linux-ipa.o: amd64-avx-linux.c | ||
1436 | + $(IPAGENT_COMPILE) $< | ||
1437 | + $(POSTCOMPILE) | ||
1438 | +amd64-mpx-linux-ipa.o: amd64-mpx-linux.c | ||
1439 | + $(IPAGENT_COMPILE) $< | ||
1440 | + $(POSTCOMPILE) | ||
1441 | +amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c | ||
1442 | + $(IPAGENT_COMPILE) $< | ||
1443 | + $(POSTCOMPILE) | ||
1444 | +amd64-avx512-linux-ipa.o: amd64-avx512-linux.c | ||
1445 | + $(IPAGENT_COMPILE) $< | ||
1446 | + $(POSTCOMPILE) | ||
1447 | linux-aarch64-ipa.o: linux-aarch64-ipa.c | ||
1448 | $(IPAGENT_COMPILE) $< | ||
1449 | $(POSTCOMPILE) | ||
1450 | @@ -694,6 +723,10 @@ i386-mpx.c : $(srcdir)/../regformats/i386/i386-mpx.dat $(regdat_sh) | ||
1451 | $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mpx.dat i386-mpx.c | ||
1452 | i386-mpx-linux.c : $(srcdir)/../regformats/i386/i386-mpx-linux.dat $(regdat_sh) | ||
1453 | $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mpx-linux.dat i386-mpx-linux.c | ||
1454 | +i386-avx-mpx.c : $(srcdir)/../regformats/i386/i386-avx-mpx.dat $(regdat_sh) | ||
1455 | + $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx.dat i386-avx-mpx.c | ||
1456 | +i386-avx-mpx-linux.c : $(srcdir)/../regformats/i386/i386-avx-mpx-linux.dat $(regdat_sh) | ||
1457 | + $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx-linux.dat i386-avx-mpx-linux.c | ||
1458 | i386-mmx.c : $(srcdir)/../regformats/i386/i386-mmx.dat $(regdat_sh) | ||
1459 | $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mmx.dat i386-mmx.c | ||
1460 | i386-mmx-linux.c : $(srcdir)/../regformats/i386/i386-mmx-linux.dat $(regdat_sh) | ||
1461 | @@ -808,6 +841,10 @@ amd64-mpx.c : $(srcdir)/../regformats/i386/amd64-mpx.dat $(regdat_sh) | ||
1462 | $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-mpx.dat amd64-mpx.c | ||
1463 | amd64-mpx-linux.c : $(srcdir)/../regformats/i386/amd64-mpx-linux.dat $(regdat_sh) | ||
1464 | $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-mpx-linux.dat amd64-mpx-linux.c | ||
1465 | +amd64-avx-mpx.c : $(srcdir)/../regformats/i386/amd64-avx-mpx.dat $(regdat_sh) | ||
1466 | + $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx.dat amd64-avx-mpx.c | ||
1467 | +amd64-avx-mpx-linux.c : $(srcdir)/../regformats/i386/amd64-avx-mpx-linux.dat $(regdat_sh) | ||
1468 | + $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx-linux.dat amd64-avx-mpx-linux.c | ||
1469 | x32.c : $(srcdir)/../regformats/i386/x32.dat $(regdat_sh) | ||
1470 | $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32.dat x32.c | ||
1471 | x32-linux.c : $(srcdir)/../regformats/i386/x32-linux.dat $(regdat_sh) | ||
1472 | diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv | ||
1473 | index a54b9e7..4935a36 100644 | ||
1474 | --- a/gdb/gdbserver/configure.srv | ||
1475 | +++ b/gdb/gdbserver/configure.srv | ||
1476 | @@ -24,20 +24,23 @@ | ||
1477 | # Default hostio_last_error implementation | ||
1478 | srv_hostio_err_objs="hostio-errno.o" | ||
1479 | |||
1480 | -srv_i386_regobj="i386.o i386-avx.o i386-avx512.o i386-mpx.o i386-mmx.o" | ||
1481 | -srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx512-linux.o i386-mpx-linux.o i386-mmx-linux.o" | ||
1482 | -srv_amd64_regobj="amd64.o amd64-avx.o amd64-avx512.o amd64-mpx.o x32.o x32-avx.o x32-avx512.o" | ||
1483 | -srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx512-linux.o amd64-mpx-linux.o x32-linux.o x32-avx-linux.o x32-avx512-linux.o" | ||
1484 | +srv_i386_regobj="i386.o i386-avx.o i386-avx512.o i386-mpx.o i386-avx-mpx.o i386-mmx.o" | ||
1485 | +srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx512-linux.o i386-mpx-linux.o i386-avx-mpx-linux.o i386-mmx-linux.o" | ||
1486 | +srv_amd64_regobj="amd64.o amd64-avx.o amd64-avx512.o amd64-mpx.o amd64-avx-mpx.o x32.o x32-avx.o x32-avx512.o" | ||
1487 | +srv_amd64_linux_regobj="amd64-linux.o amd64-avx-linux.o amd64-avx512-linux.o amd64-mpx-linux.o amd64-avx-mpx-linux.o x32-linux.o x32-avx-linux.o x32-avx512-linux.o" | ||
1488 | + | ||
1489 | + | ||
1490 | +ipa_i386_linux_regobj="i386-linux-ipa.o i386-avx-linux-ipa.o i386-avx-mpx-linux-ipa.o i386-avx512-linux-ipa.o i386-mpx-linux-ipa.o i386-mmx-linux-ipa.o" | ||
1491 | +ipa_amd64_linux_regobj="amd64-linux-ipa.o amd64-avx-linux-ipa.o amd64-avx-mpx-linux-ipa.o amd64-avx512-linux-ipa.o amd64-mpx-linux-ipa.o" | ||
1492 | |||
1493 | -ipa_i386_linux_regobj=i386-linux-ipa.o | ||
1494 | -ipa_amd64_linux_regobj=amd64-linux-ipa.o | ||
1495 | |||
1496 | srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml i386/32bit-avx512.xml i386/32bit-mpx.xml" | ||
1497 | srv_i386_64bit_xmlfiles="i386/64bit-core.xml i386/64bit-sse.xml i386/64bit-avx.xml i386/64bit-avx512.xml i386/x32-core.xml i386/64bit-mpx.xml" | ||
1498 | -srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-avx512.xml i386/i386-mpx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles" | ||
1499 | -srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml i386/amd64-avx512.xml i386/x32.xml i386/x32-avx.xml i386/x32-avx512.xml i386/amd64-mpx.xml $srv_i386_64bit_xmlfiles" | ||
1500 | -srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-avx512-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml i386/i386-mpx-linux.xml $srv_i386_32bit_xmlfiles" | ||
1501 | -srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/amd64-avx512-linux.xml i386/64bit-linux.xml i386/amd64-mpx-linux.xml i386/x32-linux.xml i386/x32-avx-linux.xml i386/x32-avx512-linux.xml $srv_i386_64bit_xmlfiles" | ||
1502 | +srv_i386_xmlfiles="i386/i386.xml i386/i386-avx.xml i386/i386-avx512.xml i386/i386-mpx.xml i386/i386-avx-mpx.xml i386/i386-mmx.xml $srv_i386_32bit_xmlfiles" | ||
1503 | +srv_amd64_xmlfiles="i386/amd64.xml i386/amd64-avx.xml i386/amd64-avx512.xml i386/x32.xml i386/x32-avx.xml i386/x32-avx512.xml i386/amd64-mpx.xml i386/amd64-avx-mpx.xml $srv_i386_64bit_xmlfiles" | ||
1504 | +srv_i386_linux_xmlfiles="i386/i386-linux.xml i386/i386-avx-linux.xml i386/i386-avx512-linux.xml i386/i386-mmx-linux.xml i386/32bit-linux.xml i386/i386-mpx-linux.xml i386/i386-avx-mpx-linux.xml $srv_i386_32bit_xmlfiles" | ||
1505 | +srv_amd64_linux_xmlfiles="i386/amd64-linux.xml i386/amd64-avx-linux.xml i386/amd64-avx512-linux.xml i386/64bit-linux.xml i386/amd64-mpx-linux.xml i386/amd64-avx-mpx-linux.xml i386/x32-linux.xml i386/x32-avx-linux.xml i386/x32-avx512-linux.xml $srv_i386_64bit_xmlfiles" | ||
1506 | + | ||
1507 | |||
1508 | |||
1509 | # Linux object files. This is so we don't have to repeat | ||
1510 | diff --git a/gdb/gdbserver/linux-aarch64-ipa.c b/gdb/gdbserver/linux-aarch64-ipa.c | ||
1511 | index 758708d..f1eaa70 100644 | ||
1512 | --- a/gdb/gdbserver/linux-aarch64-ipa.c | ||
1513 | +++ b/gdb/gdbserver/linux-aarch64-ipa.c | ||
1514 | @@ -143,9 +143,18 @@ gdb_agent_get_raw_reg (const unsigned char *raw_regs, int regnum) | ||
1515 | + aarch64_ft_collect_regmap[regnum] * FT_CR_SIZE); | ||
1516 | } | ||
1517 | |||
1518 | +/* Return target_desc to use for IPA, given the tdesc index passed by | ||
1519 | + gdbserver. Index is ignored, since we have only one tdesc | ||
1520 | + at the moment. */ | ||
1521 | + | ||
1522 | +const struct target_desc * | ||
1523 | +get_ipa_tdesc (int idx) | ||
1524 | +{ | ||
1525 | + return tdesc_aarch64; | ||
1526 | +} | ||
1527 | + | ||
1528 | void | ||
1529 | initialize_low_tracepoint (void) | ||
1530 | { | ||
1531 | init_registers_aarch64 (); | ||
1532 | - ipa_tdesc = tdesc_aarch64; | ||
1533 | } | ||
1534 | diff --git a/gdb/gdbserver/linux-amd64-ipa.c b/gdb/gdbserver/linux-amd64-ipa.c | ||
1535 | index 2eeedcd..f9c72a0 100644 | ||
1536 | --- a/gdb/gdbserver/linux-amd64-ipa.c | ||
1537 | +++ b/gdb/gdbserver/linux-amd64-ipa.c | ||
1538 | @@ -20,6 +20,7 @@ | ||
1539 | |||
1540 | #include "server.h" | ||
1541 | #include "tracepoint.h" | ||
1542 | +#include "linux-x86-tdesc.h" | ||
1543 | |||
1544 | /* Defined in auto-generated file amd64-linux.c. */ | ||
1545 | void init_registers_amd64_linux (void); | ||
1546 | @@ -166,9 +167,37 @@ supply_static_tracepoint_registers (struct regcache *regcache, | ||
1547 | |||
1548 | #endif /* HAVE_UST */ | ||
1549 | |||
1550 | +/* Return target_desc to use for IPA, given the tdesc index passed by | ||
1551 | + gdbserver. */ | ||
1552 | + | ||
1553 | +const struct target_desc * | ||
1554 | +get_ipa_tdesc (int idx) | ||
1555 | +{ | ||
1556 | + switch (idx) | ||
1557 | + { | ||
1558 | + case X86_TDESC_SSE: | ||
1559 | + return tdesc_amd64_linux; | ||
1560 | + case X86_TDESC_AVX: | ||
1561 | + return tdesc_amd64_avx_linux; | ||
1562 | + case X86_TDESC_MPX: | ||
1563 | + return tdesc_amd64_mpx_linux; | ||
1564 | + case X86_TDESC_AVX_MPX: | ||
1565 | + return tdesc_amd64_avx_mpx_linux; | ||
1566 | + case X86_TDESC_AVX512: | ||
1567 | + return tdesc_amd64_avx512_linux; | ||
1568 | + default: | ||
1569 | + internal_error (__FILE__, __LINE__, | ||
1570 | + "unknown ipa tdesc index: %d", idx); | ||
1571 | + return tdesc_amd64_linux; | ||
1572 | + } | ||
1573 | +} | ||
1574 | + | ||
1575 | void | ||
1576 | initialize_low_tracepoint (void) | ||
1577 | { | ||
1578 | init_registers_amd64_linux (); | ||
1579 | - ipa_tdesc = tdesc_amd64_linux; | ||
1580 | + init_registers_amd64_avx_linux (); | ||
1581 | + init_registers_amd64_avx_mpx_linux (); | ||
1582 | + init_registers_amd64_mpx_linux (); | ||
1583 | + init_registers_amd64_avx512_linux (); | ||
1584 | } | ||
1585 | diff --git a/gdb/gdbserver/linux-i386-ipa.c b/gdb/gdbserver/linux-i386-ipa.c | ||
1586 | index 11dc038..d7a8e7d 100644 | ||
1587 | --- a/gdb/gdbserver/linux-i386-ipa.c | ||
1588 | +++ b/gdb/gdbserver/linux-i386-ipa.c | ||
1589 | @@ -21,6 +21,7 @@ | ||
1590 | #include "server.h" | ||
1591 | #include <sys/mman.h> | ||
1592 | #include "tracepoint.h" | ||
1593 | +#include "linux-x86-tdesc.h" | ||
1594 | |||
1595 | /* GDB register numbers. */ | ||
1596 | |||
1597 | @@ -47,10 +48,6 @@ enum i386_gdb_regnum | ||
1598 | |||
1599 | #define i386_num_regs 16 | ||
1600 | |||
1601 | -/* Defined in auto-generated file i386-linux.c. */ | ||
1602 | -void init_registers_i386_linux (void); | ||
1603 | -extern const struct target_desc *tdesc_i386_linux; | ||
1604 | - | ||
1605 | #define FT_CR_EAX 15 | ||
1606 | #define FT_CR_ECX 14 | ||
1607 | #define FT_CR_EDX 13 | ||
1608 | @@ -247,10 +244,40 @@ initialize_fast_tracepoint_trampoline_buffer (void) | ||
1609 | } | ||
1610 | } | ||
1611 | |||
1612 | +/* Return target_desc to use for IPA, given the tdesc index passed by | ||
1613 | + gdbserver. */ | ||
1614 | + | ||
1615 | +const struct target_desc * | ||
1616 | +get_ipa_tdesc (int idx) | ||
1617 | +{ | ||
1618 | + switch (idx) | ||
1619 | + { | ||
1620 | + case X86_TDESC_MMX: | ||
1621 | + return tdesc_i386_mmx_linux; | ||
1622 | + case X86_TDESC_SSE: | ||
1623 | + return tdesc_i386_linux; | ||
1624 | + case X86_TDESC_AVX: | ||
1625 | + return tdesc_i386_avx_linux; | ||
1626 | + case X86_TDESC_MPX: | ||
1627 | + return tdesc_i386_mpx_linux; | ||
1628 | + case X86_TDESC_AVX_MPX: | ||
1629 | + return tdesc_i386_avx_mpx_linux; | ||
1630 | + case X86_TDESC_AVX512: | ||
1631 | + return tdesc_i386_avx512_linux; | ||
1632 | + default: | ||
1633 | + internal_error (__FILE__, __LINE__, | ||
1634 | + "unknown ipa tdesc index: %d", idx); | ||
1635 | + return tdesc_i386_linux; | ||
1636 | + } | ||
1637 | +} | ||
1638 | + | ||
1639 | void | ||
1640 | initialize_low_tracepoint (void) | ||
1641 | { | ||
1642 | + init_registers_i386_mmx_linux (); | ||
1643 | init_registers_i386_linux (); | ||
1644 | - ipa_tdesc = tdesc_i386_linux; | ||
1645 | + init_registers_i386_avx_linux (); | ||
1646 | + init_registers_i386_mpx_linux (); | ||
1647 | + init_registers_i386_avx512_linux (); | ||
1648 | initialize_fast_tracepoint_trampoline_buffer (); | ||
1649 | } | ||
1650 | diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c | ||
1651 | index 8b025bd..a142c2c 100644 | ||
1652 | --- a/gdb/gdbserver/linux-low.c | ||
1653 | +++ b/gdb/gdbserver/linux-low.c | ||
1654 | @@ -6432,6 +6432,15 @@ linux_supports_catch_syscall (void) | ||
1655 | } | ||
1656 | |||
1657 | static int | ||
1658 | +linux_get_ipa_tdesc_idx (void) | ||
1659 | +{ | ||
1660 | + if (the_low_target.get_ipa_tdesc_idx == NULL) | ||
1661 | + return 0; | ||
1662 | + | ||
1663 | + return (*the_low_target.get_ipa_tdesc_idx) (); | ||
1664 | +} | ||
1665 | + | ||
1666 | +static int | ||
1667 | linux_supports_tracepoints (void) | ||
1668 | { | ||
1669 | if (*the_low_target.supports_tracepoints == NULL) | ||
1670 | @@ -7408,6 +7417,7 @@ static struct target_ops linux_target_ops = { | ||
1671 | linux_breakpoint_kind_from_current_state, | ||
1672 | linux_supports_software_single_step, | ||
1673 | linux_supports_catch_syscall, | ||
1674 | + linux_get_ipa_tdesc_idx, | ||
1675 | }; | ||
1676 | |||
1677 | #ifdef HAVE_LINUX_REGSETS | ||
1678 | diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h | ||
1679 | index 4ec8550..d4946c1 100644 | ||
1680 | --- a/gdb/gdbserver/linux-low.h | ||
1681 | +++ b/gdb/gdbserver/linux-low.h | ||
1682 | @@ -246,6 +246,9 @@ struct linux_target_ops | ||
1683 | due to SYSCALL_SIGTRAP. */ | ||
1684 | void (*get_syscall_trapinfo) (struct regcache *regcache, | ||
1685 | int *sysno, int *sysret); | ||
1686 | + | ||
1687 | + /* See target.h. */ | ||
1688 | + int (*get_ipa_tdesc_idx) (void); | ||
1689 | }; | ||
1690 | |||
1691 | extern struct linux_target_ops the_low_target; | ||
1692 | diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c | ||
1693 | index 0c4954a..2535959 100644 | ||
1694 | --- a/gdb/gdbserver/linux-x86-low.c | ||
1695 | +++ b/gdb/gdbserver/linux-x86-low.c | ||
1696 | @@ -45,57 +45,7 @@ | ||
1697 | #include "nat/linux-nat.h" | ||
1698 | #include "nat/x86-linux.h" | ||
1699 | #include "nat/x86-linux-dregs.h" | ||
1700 | - | ||
1701 | -#ifdef __x86_64__ | ||
1702 | -/* Defined in auto-generated file amd64-linux.c. */ | ||
1703 | -void init_registers_amd64_linux (void); | ||
1704 | -extern const struct target_desc *tdesc_amd64_linux; | ||
1705 | - | ||
1706 | -/* Defined in auto-generated file amd64-avx-linux.c. */ | ||
1707 | -void init_registers_amd64_avx_linux (void); | ||
1708 | -extern const struct target_desc *tdesc_amd64_avx_linux; | ||
1709 | - | ||
1710 | -/* Defined in auto-generated file amd64-avx512-linux.c. */ | ||
1711 | -void init_registers_amd64_avx512_linux (void); | ||
1712 | -extern const struct target_desc *tdesc_amd64_avx512_linux; | ||
1713 | - | ||
1714 | -/* Defined in auto-generated file amd64-mpx-linux.c. */ | ||
1715 | -void init_registers_amd64_mpx_linux (void); | ||
1716 | -extern const struct target_desc *tdesc_amd64_mpx_linux; | ||
1717 | - | ||
1718 | -/* Defined in auto-generated file x32-linux.c. */ | ||
1719 | -void init_registers_x32_linux (void); | ||
1720 | -extern const struct target_desc *tdesc_x32_linux; | ||
1721 | - | ||
1722 | -/* Defined in auto-generated file x32-avx-linux.c. */ | ||
1723 | -void init_registers_x32_avx_linux (void); | ||
1724 | -extern const struct target_desc *tdesc_x32_avx_linux; | ||
1725 | - | ||
1726 | -/* Defined in auto-generated file x32-avx512-linux.c. */ | ||
1727 | -void init_registers_x32_avx512_linux (void); | ||
1728 | -extern const struct target_desc *tdesc_x32_avx512_linux; | ||
1729 | - | ||
1730 | -#endif | ||
1731 | - | ||
1732 | -/* Defined in auto-generated file i386-linux.c. */ | ||
1733 | -void init_registers_i386_linux (void); | ||
1734 | -extern const struct target_desc *tdesc_i386_linux; | ||
1735 | - | ||
1736 | -/* Defined in auto-generated file i386-mmx-linux.c. */ | ||
1737 | -void init_registers_i386_mmx_linux (void); | ||
1738 | -extern const struct target_desc *tdesc_i386_mmx_linux; | ||
1739 | - | ||
1740 | -/* Defined in auto-generated file i386-avx-linux.c. */ | ||
1741 | -void init_registers_i386_avx_linux (void); | ||
1742 | -extern const struct target_desc *tdesc_i386_avx_linux; | ||
1743 | - | ||
1744 | -/* Defined in auto-generated file i386-avx512-linux.c. */ | ||
1745 | -void init_registers_i386_avx512_linux (void); | ||
1746 | -extern const struct target_desc *tdesc_i386_avx512_linux; | ||
1747 | - | ||
1748 | -/* Defined in auto-generated file i386-mpx-linux.c. */ | ||
1749 | -void init_registers_i386_mpx_linux (void); | ||
1750 | -extern const struct target_desc *tdesc_i386_mpx_linux; | ||
1751 | +#include "linux-x86-tdesc.h" | ||
1752 | |||
1753 | #ifdef __x86_64__ | ||
1754 | static struct target_desc *tdesc_amd64_linux_no_xml; | ||
1755 | @@ -839,6 +789,9 @@ x86_linux_read_description (void) | ||
1756 | case X86_XSTATE_AVX512_MASK: | ||
1757 | return tdesc_amd64_avx512_linux; | ||
1758 | |||
1759 | + case X86_XSTATE_AVX_MPX_MASK: | ||
1760 | + return tdesc_amd64_avx_mpx_linux; | ||
1761 | + | ||
1762 | case X86_XSTATE_MPX_MASK: | ||
1763 | return tdesc_amd64_mpx_linux; | ||
1764 | |||
1765 | @@ -886,6 +839,9 @@ x86_linux_read_description (void) | ||
1766 | case (X86_XSTATE_MPX_MASK): | ||
1767 | return tdesc_i386_mpx_linux; | ||
1768 | |||
1769 | + case (X86_XSTATE_AVX_MPX_MASK): | ||
1770 | + return tdesc_i386_avx_mpx_linux; | ||
1771 | + | ||
1772 | case (X86_XSTATE_AVX_MASK): | ||
1773 | return tdesc_i386_avx_linux; | ||
1774 | |||
1775 | @@ -2891,6 +2847,42 @@ x86_supports_hardware_single_step (void) | ||
1776 | return 1; | ||
1777 | } | ||
1778 | |||
1779 | +static int | ||
1780 | +x86_get_ipa_tdesc_idx (void) | ||
1781 | +{ | ||
1782 | + struct regcache *regcache = get_thread_regcache (current_thread, 0); | ||
1783 | + const struct target_desc *tdesc = regcache->tdesc; | ||
1784 | + | ||
1785 | +#ifdef __x86_64__ | ||
1786 | + if (tdesc == tdesc_amd64_linux || tdesc == tdesc_amd64_linux_no_xml | ||
1787 | + || tdesc == tdesc_x32_linux) | ||
1788 | + return X86_TDESC_SSE; | ||
1789 | + if (tdesc == tdesc_amd64_avx_linux || tdesc == tdesc_x32_avx_linux) | ||
1790 | + return X86_TDESC_AVX; | ||
1791 | + if (tdesc == tdesc_amd64_mpx_linux) | ||
1792 | + return X86_TDESC_MPX; | ||
1793 | + if (tdesc == tdesc_amd64_avx_mpx_linux) | ||
1794 | + return X86_TDESC_AVX_MPX; | ||
1795 | + if (tdesc == tdesc_amd64_avx512_linux || tdesc == tdesc_x32_avx512_linux) | ||
1796 | + return X86_TDESC_AVX512; | ||
1797 | +#endif | ||
1798 | + | ||
1799 | + if (tdesc == tdesc_i386_mmx_linux) | ||
1800 | + return X86_TDESC_MMX; | ||
1801 | + if (tdesc == tdesc_i386_linux || tdesc == tdesc_i386_linux_no_xml) | ||
1802 | + return X86_TDESC_SSE; | ||
1803 | + if (tdesc == tdesc_i386_avx_linux) | ||
1804 | + return X86_TDESC_AVX; | ||
1805 | + if (tdesc == tdesc_i386_mpx_linux) | ||
1806 | + return X86_TDESC_MPX; | ||
1807 | + if (tdesc == tdesc_i386_avx_mpx_linux) | ||
1808 | + return X86_TDESC_AVX_MPX; | ||
1809 | + if (tdesc == tdesc_i386_avx512_linux) | ||
1810 | + return X86_TDESC_AVX512; | ||
1811 | + | ||
1812 | + return 0; | ||
1813 | +} | ||
1814 | + | ||
1815 | /* This is initialized assuming an amd64 target. | ||
1816 | x86_arch_setup will correct it for i386 or amd64 targets. */ | ||
1817 | |||
1818 | @@ -2934,6 +2926,7 @@ struct linux_target_ops the_low_target = | ||
1819 | NULL, /* breakpoint_kind_from_current_state */ | ||
1820 | x86_supports_hardware_single_step, | ||
1821 | x86_get_syscall_trapinfo, | ||
1822 | + x86_get_ipa_tdesc_idx, | ||
1823 | }; | ||
1824 | |||
1825 | void | ||
1826 | @@ -2945,6 +2938,7 @@ initialize_low_arch (void) | ||
1827 | init_registers_amd64_avx_linux (); | ||
1828 | init_registers_amd64_avx512_linux (); | ||
1829 | init_registers_amd64_mpx_linux (); | ||
1830 | + init_registers_amd64_avx_mpx_linux (); | ||
1831 | |||
1832 | init_registers_x32_linux (); | ||
1833 | init_registers_x32_avx_linux (); | ||
1834 | @@ -2959,6 +2953,7 @@ initialize_low_arch (void) | ||
1835 | init_registers_i386_avx_linux (); | ||
1836 | init_registers_i386_avx512_linux (); | ||
1837 | init_registers_i386_mpx_linux (); | ||
1838 | + init_registers_i386_avx_mpx_linux (); | ||
1839 | |||
1840 | tdesc_i386_linux_no_xml = XNEW (struct target_desc); | ||
1841 | copy_target_description (tdesc_i386_linux_no_xml, tdesc_i386_linux); | ||
1842 | diff --git a/gdb/gdbserver/linux-x86-tdesc.h b/gdb/gdbserver/linux-x86-tdesc.h | ||
1843 | new file mode 100644 | ||
1844 | index 0000000..720f50c | ||
1845 | --- /dev/null | ||
1846 | +++ b/gdb/gdbserver/linux-x86-tdesc.h | ||
1847 | @@ -0,0 +1,98 @@ | ||
1848 | +/* Low level support for x86 (i386 and x86-64), shared between gdbserver | ||
1849 | + and IPA. | ||
1850 | + | ||
1851 | + Copyright (C) 2016 Free Software Foundation, Inc. | ||
1852 | + | ||
1853 | + This file is part of GDB. | ||
1854 | + | ||
1855 | + This program is free software; you can redistribute it and/or modify | ||
1856 | + it under the terms of the GNU General Public License as published by | ||
1857 | + the Free Software Foundation; either version 3 of the License, or | ||
1858 | + (at your option) any later version. | ||
1859 | + | ||
1860 | + This program is distributed in the hope that it will be useful, | ||
1861 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
1862 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
1863 | + GNU General Public License for more details. | ||
1864 | + | ||
1865 | + You should have received a copy of the GNU General Public License | ||
1866 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
1867 | + | ||
1868 | +/* Note: since IPA obviously knows what ABI it's running on (i386 vs x86_64 | ||
1869 | + vs x32), it's sufficient to pass only the register set here. This, | ||
1870 | + together with the ABI known at IPA compile time, maps to a tdesc. */ | ||
1871 | + | ||
1872 | +enum x86_linux_tdesc { | ||
1873 | + X86_TDESC_MMX = 0, | ||
1874 | + X86_TDESC_SSE = 1, | ||
1875 | + X86_TDESC_AVX = 2, | ||
1876 | + X86_TDESC_MPX = 3, | ||
1877 | + X86_TDESC_AVX_MPX = 4, | ||
1878 | + X86_TDESC_AVX512 = 5, | ||
1879 | +}; | ||
1880 | + | ||
1881 | +#ifdef __x86_64__ | ||
1882 | + | ||
1883 | +#if defined __LP64__ || !defined IN_PROCESS_AGENT | ||
1884 | +/* Defined in auto-generated file amd64-linux.c. */ | ||
1885 | +void init_registers_amd64_linux (void); | ||
1886 | +extern const struct target_desc *tdesc_amd64_linux; | ||
1887 | + | ||
1888 | +/* Defined in auto-generated file amd64-avx-linux.c. */ | ||
1889 | +void init_registers_amd64_avx_linux (void); | ||
1890 | +extern const struct target_desc *tdesc_amd64_avx_linux; | ||
1891 | + | ||
1892 | +/* Defined in auto-generated file amd64-avx512-linux.c. */ | ||
1893 | +void init_registers_amd64_avx512_linux (void); | ||
1894 | +extern const struct target_desc *tdesc_amd64_avx512_linux; | ||
1895 | + | ||
1896 | +/* Defined in auto-generated file amd64-avx-mpx-linux.c. */ | ||
1897 | +void init_registers_amd64_avx_mpx_linux (void); | ||
1898 | +extern const struct target_desc *tdesc_amd64_avx_mpx_linux; | ||
1899 | + | ||
1900 | +/* Defined in auto-generated file amd64-mpx-linux.c. */ | ||
1901 | +void init_registers_amd64_mpx_linux (void); | ||
1902 | +extern const struct target_desc *tdesc_amd64_mpx_linux; | ||
1903 | +#endif | ||
1904 | + | ||
1905 | +#if defined __ILP32__ || !defined IN_PROCESS_AGENT | ||
1906 | +/* Defined in auto-generated file x32-linux.c. */ | ||
1907 | +void init_registers_x32_linux (void); | ||
1908 | +extern const struct target_desc *tdesc_x32_linux; | ||
1909 | + | ||
1910 | +/* Defined in auto-generated file x32-avx-linux.c. */ | ||
1911 | +void init_registers_x32_avx_linux (void); | ||
1912 | +extern const struct target_desc *tdesc_x32_avx_linux; | ||
1913 | + | ||
1914 | +/* Defined in auto-generated file x32-avx512-linux.c. */ | ||
1915 | +void init_registers_x32_avx512_linux (void); | ||
1916 | +extern const struct target_desc *tdesc_x32_avx512_linux; | ||
1917 | +#endif | ||
1918 | + | ||
1919 | +#endif | ||
1920 | + | ||
1921 | +#if defined __i386__ || !defined IN_PROCESS_AGENT | ||
1922 | +/* Defined in auto-generated file i386-linux.c. */ | ||
1923 | +void init_registers_i386_linux (void); | ||
1924 | +extern const struct target_desc *tdesc_i386_linux; | ||
1925 | + | ||
1926 | +/* Defined in auto-generated file i386-mmx-linux.c. */ | ||
1927 | +void init_registers_i386_mmx_linux (void); | ||
1928 | +extern const struct target_desc *tdesc_i386_mmx_linux; | ||
1929 | + | ||
1930 | +/* Defined in auto-generated file i386-avx-linux.c. */ | ||
1931 | +void init_registers_i386_avx_linux (void); | ||
1932 | +extern const struct target_desc *tdesc_i386_avx_linux; | ||
1933 | + | ||
1934 | +/* Defined in auto-generated file i386-avx-mpx-linux.c. */ | ||
1935 | +void init_registers_i386_avx_mpx_linux (void); | ||
1936 | +extern const struct target_desc *tdesc_i386_avx_mpx_linux; | ||
1937 | + | ||
1938 | +/* Defined in auto-generated file i386-avx512-linux.c. */ | ||
1939 | +void init_registers_i386_avx512_linux (void); | ||
1940 | +extern const struct target_desc *tdesc_i386_avx512_linux; | ||
1941 | + | ||
1942 | +/* Defined in auto-generated file i386-mpx-linux.c. */ | ||
1943 | +void init_registers_i386_mpx_linux (void); | ||
1944 | +extern const struct target_desc *tdesc_i386_mpx_linux; | ||
1945 | +#endif | ||
1946 | diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h | ||
1947 | index 5af2051..4c14c20 100644 | ||
1948 | --- a/gdb/gdbserver/target.h | ||
1949 | +++ b/gdb/gdbserver/target.h | ||
1950 | @@ -471,6 +471,9 @@ struct target_ops | ||
1951 | /* Return 1 if the target supports catch syscall, 0 (or leave the | ||
1952 | callback NULL) otherwise. */ | ||
1953 | int (*supports_catch_syscall) (void); | ||
1954 | + | ||
1955 | + /* Return tdesc index for IPA. */ | ||
1956 | + int (*get_ipa_tdesc_idx) (void); | ||
1957 | }; | ||
1958 | |||
1959 | extern struct target_ops *the_target; | ||
1960 | @@ -550,6 +553,10 @@ int kill_inferior (int); | ||
1961 | (the_target->supports_catch_syscall ? \ | ||
1962 | (*the_target->supports_catch_syscall) () : 0) | ||
1963 | |||
1964 | +#define target_get_ipa_tdesc_idx() \ | ||
1965 | + (the_target->get_ipa_tdesc_idx \ | ||
1966 | + ? (*the_target->get_ipa_tdesc_idx) () : 0) | ||
1967 | + | ||
1968 | #define target_supports_tracepoints() \ | ||
1969 | (the_target->supports_tracepoints \ | ||
1970 | ? (*the_target->supports_tracepoints) () : 0) | ||
1971 | diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c | ||
1972 | index 0671999..cc86677 100644 | ||
1973 | --- a/gdb/gdbserver/tracepoint.c | ||
1974 | +++ b/gdb/gdbserver/tracepoint.c | ||
1975 | @@ -134,6 +134,7 @@ trace_vdebug (const char *fmt, ...) | ||
1976 | # define ust_loaded IPA_SYM_EXPORTED_NAME (ust_loaded) | ||
1977 | # define helper_thread_id IPA_SYM_EXPORTED_NAME (helper_thread_id) | ||
1978 | # define cmd_buf IPA_SYM_EXPORTED_NAME (cmd_buf) | ||
1979 | +# define ipa_tdesc_idx IPA_SYM_EXPORTED_NAME (ipa_tdesc_idx) | ||
1980 | #endif | ||
1981 | |||
1982 | #ifndef IN_PROCESS_AGENT | ||
1983 | @@ -171,6 +172,7 @@ struct ipa_sym_addresses | ||
1984 | CORE_ADDR addr_get_trace_state_variable_value; | ||
1985 | CORE_ADDR addr_set_trace_state_variable_value; | ||
1986 | CORE_ADDR addr_ust_loaded; | ||
1987 | + CORE_ADDR addr_ipa_tdesc_idx; | ||
1988 | }; | ||
1989 | |||
1990 | static struct | ||
1991 | @@ -207,6 +209,7 @@ static struct | ||
1992 | IPA_SYM(get_trace_state_variable_value), | ||
1993 | IPA_SYM(set_trace_state_variable_value), | ||
1994 | IPA_SYM(ust_loaded), | ||
1995 | + IPA_SYM(ipa_tdesc_idx), | ||
1996 | }; | ||
1997 | |||
1998 | static struct ipa_sym_addresses ipa_sym_addrs; | ||
1999 | @@ -3231,6 +3234,11 @@ cmd_qtstart (char *packet) | ||
2000 | |||
2001 | *packet = '\0'; | ||
2002 | |||
2003 | + /* Tell IPA about the correct tdesc. */ | ||
2004 | + if (write_inferior_integer (ipa_sym_addrs.addr_ipa_tdesc_idx, | ||
2005 | + target_get_ipa_tdesc_idx ())) | ||
2006 | + error ("Error setting ipa_tdesc_idx variable in lib"); | ||
2007 | + | ||
2008 | /* Start out empty. */ | ||
2009 | if (agent_loaded_p ()) | ||
2010 | write_inferior_data_ptr (ipa_sym_addrs.addr_tracepoints, 0); | ||
2011 | @@ -4714,19 +4722,20 @@ collect_data_at_step (struct tracepoint_hit_ctx *ctx, | ||
2012 | #endif | ||
2013 | |||
2014 | #ifdef IN_PROCESS_AGENT | ||
2015 | -/* The target description used by the IPA. Given that the IPA library | ||
2016 | - is built for a specific architecture that is loaded into the | ||
2017 | - inferior, there only needs to be one such description per | ||
2018 | - build. */ | ||
2019 | -const struct target_desc *ipa_tdesc; | ||
2020 | +/* The target description index for IPA. Passed from gdbserver, used | ||
2021 | + to select ipa_tdesc. */ | ||
2022 | +EXTERN_C_PUSH | ||
2023 | +IP_AGENT_EXPORT_VAR int ipa_tdesc_idx; | ||
2024 | +EXTERN_C_POP | ||
2025 | #endif | ||
2026 | |||
2027 | static struct regcache * | ||
2028 | get_context_regcache (struct tracepoint_hit_ctx *ctx) | ||
2029 | { | ||
2030 | struct regcache *regcache = NULL; | ||
2031 | - | ||
2032 | #ifdef IN_PROCESS_AGENT | ||
2033 | + const struct target_desc *ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx); | ||
2034 | + | ||
2035 | if (ctx->type == fast_tracepoint) | ||
2036 | { | ||
2037 | struct fast_tracepoint_ctx *fctx = (struct fast_tracepoint_ctx *) ctx; | ||
2038 | @@ -5799,11 +5808,13 @@ IP_AGENT_EXPORT_FUNC void | ||
2039 | gdb_collect (struct tracepoint *tpoint, unsigned char *regs) | ||
2040 | { | ||
2041 | struct fast_tracepoint_ctx ctx; | ||
2042 | + const struct target_desc *ipa_tdesc; | ||
2043 | |||
2044 | /* Don't do anything until the trace run is completely set up. */ | ||
2045 | if (!tracing) | ||
2046 | return; | ||
2047 | |||
2048 | + ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx); | ||
2049 | ctx.base.type = fast_tracepoint; | ||
2050 | ctx.regs = regs; | ||
2051 | ctx.regcache_initted = 0; | ||
2052 | @@ -6660,6 +6671,7 @@ gdb_probe (const struct marker *mdata, void *probe_private, | ||
2053 | { | ||
2054 | struct tracepoint *tpoint; | ||
2055 | struct static_tracepoint_ctx ctx; | ||
2056 | + const struct target_desc *ipa_tdesc; | ||
2057 | |||
2058 | /* Don't do anything until the trace run is completely set up. */ | ||
2059 | if (!tracing) | ||
2060 | @@ -6668,6 +6680,7 @@ gdb_probe (const struct marker *mdata, void *probe_private, | ||
2061 | return; | ||
2062 | } | ||
2063 | |||
2064 | + ipa_tdesc = get_ipa_tdesc (ipa_tdesc_idx); | ||
2065 | ctx.base.type = static_tracepoint; | ||
2066 | ctx.regcache_initted = 0; | ||
2067 | ctx.regs = regs; | ||
2068 | diff --git a/gdb/gdbserver/tracepoint.h b/gdb/gdbserver/tracepoint.h | ||
2069 | index cab89cf..e30f4f7 100644 | ||
2070 | --- a/gdb/gdbserver/tracepoint.h | ||
2071 | +++ b/gdb/gdbserver/tracepoint.h | ||
2072 | @@ -124,6 +124,7 @@ int handle_tracepoint_bkpts (struct thread_info *tinfo, CORE_ADDR stop_pc); | ||
2073 | |||
2074 | #ifdef IN_PROCESS_AGENT | ||
2075 | void initialize_low_tracepoint (void); | ||
2076 | +const struct target_desc *get_ipa_tdesc (int idx); | ||
2077 | void supply_fast_tracepoint_registers (struct regcache *regcache, | ||
2078 | const unsigned char *regs); | ||
2079 | void supply_static_tracepoint_registers (struct regcache *regcache, | ||
2080 | @@ -131,9 +132,6 @@ void supply_static_tracepoint_registers (struct regcache *regcache, | ||
2081 | CORE_ADDR pc); | ||
2082 | void set_trampoline_buffer_space (CORE_ADDR begin, CORE_ADDR end, | ||
2083 | char *errmsg); | ||
2084 | - | ||
2085 | -extern const struct target_desc *ipa_tdesc; | ||
2086 | - | ||
2087 | #else | ||
2088 | void stop_tracing (void); | ||
2089 | |||
2090 | diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c | ||
2091 | index af39e78..df47efd 100644 | ||
2092 | --- a/gdb/i386-linux-tdep.c | ||
2093 | +++ b/gdb/i386-linux-tdep.c | ||
2094 | @@ -47,6 +47,7 @@ | ||
2095 | #include "features/i386/i386-linux.c" | ||
2096 | #include "features/i386/i386-mmx-linux.c" | ||
2097 | #include "features/i386/i386-mpx-linux.c" | ||
2098 | +#include "features/i386/i386-avx-mpx-linux.c" | ||
2099 | #include "features/i386/i386-avx-linux.c" | ||
2100 | #include "features/i386/i386-avx512-linux.c" | ||
2101 | |||
2102 | @@ -630,6 +631,8 @@ i386_linux_core_read_description (struct gdbarch *gdbarch, | ||
2103 | return tdesc_i386_avx512_linux; | ||
2104 | case X86_XSTATE_MPX_MASK: | ||
2105 | return tdesc_i386_mpx_linux; | ||
2106 | + case X86_XSTATE_AVX_MPX_MASK: | ||
2107 | + return tdesc_i386_avx_mpx_linux; | ||
2108 | case X86_XSTATE_AVX_MASK: | ||
2109 | return tdesc_i386_avx_linux; | ||
2110 | case X86_XSTATE_SSE_MASK: | ||
2111 | @@ -1018,5 +1021,6 @@ _initialize_i386_linux_tdep (void) | ||
2112 | initialize_tdesc_i386_mmx_linux (); | ||
2113 | initialize_tdesc_i386_avx_linux (); | ||
2114 | initialize_tdesc_i386_mpx_linux (); | ||
2115 | + initialize_tdesc_i386_avx_mpx_linux (); | ||
2116 | initialize_tdesc_i386_avx512_linux (); | ||
2117 | } | ||
2118 | diff --git a/gdb/i386-linux-tdep.h b/gdb/i386-linux-tdep.h | ||
2119 | index ecc9e31..0cb0c4d 100644 | ||
2120 | --- a/gdb/i386-linux-tdep.h | ||
2121 | +++ b/gdb/i386-linux-tdep.h | ||
2122 | @@ -42,6 +42,7 @@ extern struct target_desc *tdesc_i386_linux; | ||
2123 | extern struct target_desc *tdesc_i386_mmx_linux; | ||
2124 | extern struct target_desc *tdesc_i386_avx_linux; | ||
2125 | extern struct target_desc *tdesc_i386_mpx_linux; | ||
2126 | +extern struct target_desc *tdesc_i386_avx_mpx_linux; | ||
2127 | extern struct target_desc *tdesc_i386_avx512_linux; | ||
2128 | |||
2129 | /* Format of XSAVE extended state is: | ||
2130 | diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c | ||
2131 | index b706463..1ec0a08 100644 | ||
2132 | --- a/gdb/i386-tdep.c | ||
2133 | +++ b/gdb/i386-tdep.c | ||
2134 | @@ -53,6 +53,7 @@ | ||
2135 | #include "features/i386/i386.c" | ||
2136 | #include "features/i386/i386-avx.c" | ||
2137 | #include "features/i386/i386-mpx.c" | ||
2138 | +#include "features/i386/i386-avx-mpx.c" | ||
2139 | #include "features/i386/i386-avx512.c" | ||
2140 | #include "features/i386/i386-mmx.c" | ||
2141 | |||
2142 | @@ -8618,6 +8619,8 @@ i386_target_description (uint64_t xcr0) | ||
2143 | case X86_XSTATE_MPX_AVX512_MASK: | ||
2144 | case X86_XSTATE_AVX512_MASK: | ||
2145 | return tdesc_i386_avx512; | ||
2146 | + case X86_XSTATE_AVX_MPX_MASK: | ||
2147 | + return tdesc_i386_avx_mpx; | ||
2148 | case X86_XSTATE_MPX_MASK: | ||
2149 | return tdesc_i386_mpx; | ||
2150 | case X86_XSTATE_AVX_MASK: | ||
2151 | @@ -8957,6 +8960,7 @@ Show Intel Memory Protection Extensions specific variables."), | ||
2152 | initialize_tdesc_i386_mmx (); | ||
2153 | initialize_tdesc_i386_avx (); | ||
2154 | initialize_tdesc_i386_mpx (); | ||
2155 | + initialize_tdesc_i386_avx_mpx (); | ||
2156 | initialize_tdesc_i386_avx512 (); | ||
2157 | |||
2158 | /* Tell remote stub that we support XML target description. */ | ||
2159 | diff --git a/gdb/regformats/i386/amd64-avx-mpx-linux.dat b/gdb/regformats/i386/amd64-avx-mpx-linux.dat | ||
2160 | new file mode 100644 | ||
2161 | index 0000000..6d45324 | ||
2162 | --- /dev/null | ||
2163 | +++ b/gdb/regformats/i386/amd64-avx-mpx-linux.dat | ||
2164 | @@ -0,0 +1,85 @@ | ||
2165 | +# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: | ||
2166 | +# Generated from: i386/amd64-avx-mpx-linux.xml | ||
2167 | +name:amd64_avx_mpx_linux | ||
2168 | +xmltarget:amd64-avx-mpx-linux.xml | ||
2169 | +expedite:rbp,rsp,rip | ||
2170 | +64:rax | ||
2171 | +64:rbx | ||
2172 | +64:rcx | ||
2173 | +64:rdx | ||
2174 | +64:rsi | ||
2175 | +64:rdi | ||
2176 | +64:rbp | ||
2177 | +64:rsp | ||
2178 | +64:r8 | ||
2179 | +64:r9 | ||
2180 | +64:r10 | ||
2181 | +64:r11 | ||
2182 | +64:r12 | ||
2183 | +64:r13 | ||
2184 | +64:r14 | ||
2185 | +64:r15 | ||
2186 | +64:rip | ||
2187 | +32:eflags | ||
2188 | +32:cs | ||
2189 | +32:ss | ||
2190 | +32:ds | ||
2191 | +32:es | ||
2192 | +32:fs | ||
2193 | +32:gs | ||
2194 | +80:st0 | ||
2195 | +80:st1 | ||
2196 | +80:st2 | ||
2197 | +80:st3 | ||
2198 | +80:st4 | ||
2199 | +80:st5 | ||
2200 | +80:st6 | ||
2201 | +80:st7 | ||
2202 | +32:fctrl | ||
2203 | +32:fstat | ||
2204 | +32:ftag | ||
2205 | +32:fiseg | ||
2206 | +32:fioff | ||
2207 | +32:foseg | ||
2208 | +32:fooff | ||
2209 | +32:fop | ||
2210 | +128:xmm0 | ||
2211 | +128:xmm1 | ||
2212 | +128:xmm2 | ||
2213 | +128:xmm3 | ||
2214 | +128:xmm4 | ||
2215 | +128:xmm5 | ||
2216 | +128:xmm6 | ||
2217 | +128:xmm7 | ||
2218 | +128:xmm8 | ||
2219 | +128:xmm9 | ||
2220 | +128:xmm10 | ||
2221 | +128:xmm11 | ||
2222 | +128:xmm12 | ||
2223 | +128:xmm13 | ||
2224 | +128:xmm14 | ||
2225 | +128:xmm15 | ||
2226 | +32:mxcsr | ||
2227 | +64:orig_rax | ||
2228 | +128:ymm0h | ||
2229 | +128:ymm1h | ||
2230 | +128:ymm2h | ||
2231 | +128:ymm3h | ||
2232 | +128:ymm4h | ||
2233 | +128:ymm5h | ||
2234 | +128:ymm6h | ||
2235 | +128:ymm7h | ||
2236 | +128:ymm8h | ||
2237 | +128:ymm9h | ||
2238 | +128:ymm10h | ||
2239 | +128:ymm11h | ||
2240 | +128:ymm12h | ||
2241 | +128:ymm13h | ||
2242 | +128:ymm14h | ||
2243 | +128:ymm15h | ||
2244 | +128:bnd0raw | ||
2245 | +128:bnd1raw | ||
2246 | +128:bnd2raw | ||
2247 | +128:bnd3raw | ||
2248 | +64:bndcfgu | ||
2249 | +64:bndstatus | ||
2250 | diff --git a/gdb/regformats/i386/amd64-avx-mpx.dat b/gdb/regformats/i386/amd64-avx-mpx.dat | ||
2251 | new file mode 100644 | ||
2252 | index 0000000..d985641 | ||
2253 | --- /dev/null | ||
2254 | +++ b/gdb/regformats/i386/amd64-avx-mpx.dat | ||
2255 | @@ -0,0 +1,84 @@ | ||
2256 | +# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: | ||
2257 | +# Generated from: i386/amd64-avx-mpx.xml | ||
2258 | +name:amd64_avx_mpx | ||
2259 | +xmltarget:amd64-avx-mpx.xml | ||
2260 | +expedite:rbp,rsp,rip | ||
2261 | +64:rax | ||
2262 | +64:rbx | ||
2263 | +64:rcx | ||
2264 | +64:rdx | ||
2265 | +64:rsi | ||
2266 | +64:rdi | ||
2267 | +64:rbp | ||
2268 | +64:rsp | ||
2269 | +64:r8 | ||
2270 | +64:r9 | ||
2271 | +64:r10 | ||
2272 | +64:r11 | ||
2273 | +64:r12 | ||
2274 | +64:r13 | ||
2275 | +64:r14 | ||
2276 | +64:r15 | ||
2277 | +64:rip | ||
2278 | +32:eflags | ||
2279 | +32:cs | ||
2280 | +32:ss | ||
2281 | +32:ds | ||
2282 | +32:es | ||
2283 | +32:fs | ||
2284 | +32:gs | ||
2285 | +80:st0 | ||
2286 | +80:st1 | ||
2287 | +80:st2 | ||
2288 | +80:st3 | ||
2289 | +80:st4 | ||
2290 | +80:st5 | ||
2291 | +80:st6 | ||
2292 | +80:st7 | ||
2293 | +32:fctrl | ||
2294 | +32:fstat | ||
2295 | +32:ftag | ||
2296 | +32:fiseg | ||
2297 | +32:fioff | ||
2298 | +32:foseg | ||
2299 | +32:fooff | ||
2300 | +32:fop | ||
2301 | +128:xmm0 | ||
2302 | +128:xmm1 | ||
2303 | +128:xmm2 | ||
2304 | +128:xmm3 | ||
2305 | +128:xmm4 | ||
2306 | +128:xmm5 | ||
2307 | +128:xmm6 | ||
2308 | +128:xmm7 | ||
2309 | +128:xmm8 | ||
2310 | +128:xmm9 | ||
2311 | +128:xmm10 | ||
2312 | +128:xmm11 | ||
2313 | +128:xmm12 | ||
2314 | +128:xmm13 | ||
2315 | +128:xmm14 | ||
2316 | +128:xmm15 | ||
2317 | +32:mxcsr | ||
2318 | +128:ymm0h | ||
2319 | +128:ymm1h | ||
2320 | +128:ymm2h | ||
2321 | +128:ymm3h | ||
2322 | +128:ymm4h | ||
2323 | +128:ymm5h | ||
2324 | +128:ymm6h | ||
2325 | +128:ymm7h | ||
2326 | +128:ymm8h | ||
2327 | +128:ymm9h | ||
2328 | +128:ymm10h | ||
2329 | +128:ymm11h | ||
2330 | +128:ymm12h | ||
2331 | +128:ymm13h | ||
2332 | +128:ymm14h | ||
2333 | +128:ymm15h | ||
2334 | +128:bnd0raw | ||
2335 | +128:bnd1raw | ||
2336 | +128:bnd2raw | ||
2337 | +128:bnd3raw | ||
2338 | +64:bndcfgu | ||
2339 | +64:bndstatus | ||
2340 | diff --git a/gdb/regformats/i386/amd64-mpx-linux.dat b/gdb/regformats/i386/amd64-mpx-linux.dat | ||
2341 | index 7a05cfe..523ae01 100644 | ||
2342 | --- a/gdb/regformats/i386/amd64-mpx-linux.dat | ||
2343 | +++ b/gdb/regformats/i386/amd64-mpx-linux.dat | ||
2344 | @@ -61,22 +61,6 @@ expedite:rbp,rsp,rip | ||
2345 | 128:xmm15 | ||
2346 | 32:mxcsr | ||
2347 | 64:orig_rax | ||
2348 | -128:ymm0h | ||
2349 | -128:ymm1h | ||
2350 | -128:ymm2h | ||
2351 | -128:ymm3h | ||
2352 | -128:ymm4h | ||
2353 | -128:ymm5h | ||
2354 | -128:ymm6h | ||
2355 | -128:ymm7h | ||
2356 | -128:ymm8h | ||
2357 | -128:ymm9h | ||
2358 | -128:ymm10h | ||
2359 | -128:ymm11h | ||
2360 | -128:ymm12h | ||
2361 | -128:ymm13h | ||
2362 | -128:ymm14h | ||
2363 | -128:ymm15h | ||
2364 | 128:bnd0raw | ||
2365 | 128:bnd1raw | ||
2366 | 128:bnd2raw | ||
2367 | diff --git a/gdb/regformats/i386/amd64-mpx.dat b/gdb/regformats/i386/amd64-mpx.dat | ||
2368 | index 1b75f4d..43b8776 100644 | ||
2369 | --- a/gdb/regformats/i386/amd64-mpx.dat | ||
2370 | +++ b/gdb/regformats/i386/amd64-mpx.dat | ||
2371 | @@ -60,22 +60,6 @@ expedite:rbp,rsp,rip | ||
2372 | 128:xmm14 | ||
2373 | 128:xmm15 | ||
2374 | 32:mxcsr | ||
2375 | -128:ymm0h | ||
2376 | -128:ymm1h | ||
2377 | -128:ymm2h | ||
2378 | -128:ymm3h | ||
2379 | -128:ymm4h | ||
2380 | -128:ymm5h | ||
2381 | -128:ymm6h | ||
2382 | -128:ymm7h | ||
2383 | -128:ymm8h | ||
2384 | -128:ymm9h | ||
2385 | -128:ymm10h | ||
2386 | -128:ymm11h | ||
2387 | -128:ymm12h | ||
2388 | -128:ymm13h | ||
2389 | -128:ymm14h | ||
2390 | -128:ymm15h | ||
2391 | 128:bnd0raw | ||
2392 | 128:bnd1raw | ||
2393 | 128:bnd2raw | ||
2394 | diff --git a/gdb/regformats/i386/i386-avx-mpx-linux.dat b/gdb/regformats/i386/i386-avx-mpx-linux.dat | ||
2395 | new file mode 100644 | ||
2396 | index 0000000..831c476 | ||
2397 | --- /dev/null | ||
2398 | +++ b/gdb/regformats/i386/i386-avx-mpx-linux.dat | ||
2399 | @@ -0,0 +1,61 @@ | ||
2400 | +# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: | ||
2401 | +# Generated from: i386/i386-avx-mpx-linux.xml | ||
2402 | +name:i386_avx_mpx_linux | ||
2403 | +xmltarget:i386-avx-mpx-linux.xml | ||
2404 | +expedite:ebp,esp,eip | ||
2405 | +32:eax | ||
2406 | +32:ecx | ||
2407 | +32:edx | ||
2408 | +32:ebx | ||
2409 | +32:esp | ||
2410 | +32:ebp | ||
2411 | +32:esi | ||
2412 | +32:edi | ||
2413 | +32:eip | ||
2414 | +32:eflags | ||
2415 | +32:cs | ||
2416 | +32:ss | ||
2417 | +32:ds | ||
2418 | +32:es | ||
2419 | +32:fs | ||
2420 | +32:gs | ||
2421 | +80:st0 | ||
2422 | +80:st1 | ||
2423 | +80:st2 | ||
2424 | +80:st3 | ||
2425 | +80:st4 | ||
2426 | +80:st5 | ||
2427 | +80:st6 | ||
2428 | +80:st7 | ||
2429 | +32:fctrl | ||
2430 | +32:fstat | ||
2431 | +32:ftag | ||
2432 | +32:fiseg | ||
2433 | +32:fioff | ||
2434 | +32:foseg | ||
2435 | +32:fooff | ||
2436 | +32:fop | ||
2437 | +128:xmm0 | ||
2438 | +128:xmm1 | ||
2439 | +128:xmm2 | ||
2440 | +128:xmm3 | ||
2441 | +128:xmm4 | ||
2442 | +128:xmm5 | ||
2443 | +128:xmm6 | ||
2444 | +128:xmm7 | ||
2445 | +32:mxcsr | ||
2446 | +32:orig_eax | ||
2447 | +128:ymm0h | ||
2448 | +128:ymm1h | ||
2449 | +128:ymm2h | ||
2450 | +128:ymm3h | ||
2451 | +128:ymm4h | ||
2452 | +128:ymm5h | ||
2453 | +128:ymm6h | ||
2454 | +128:ymm7h | ||
2455 | +128:bnd0raw | ||
2456 | +128:bnd1raw | ||
2457 | +128:bnd2raw | ||
2458 | +128:bnd3raw | ||
2459 | +64:bndcfgu | ||
2460 | +64:bndstatus | ||
2461 | diff --git a/gdb/regformats/i386/i386-avx-mpx.dat b/gdb/regformats/i386/i386-avx-mpx.dat | ||
2462 | new file mode 100644 | ||
2463 | index 0000000..8caef75 | ||
2464 | --- /dev/null | ||
2465 | +++ b/gdb/regformats/i386/i386-avx-mpx.dat | ||
2466 | @@ -0,0 +1,60 @@ | ||
2467 | +# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: | ||
2468 | +# Generated from: i386/i386-avx-mpx.xml | ||
2469 | +name:i386_avx_mpx | ||
2470 | +xmltarget:i386-avx-mpx.xml | ||
2471 | +expedite:ebp,esp,eip | ||
2472 | +32:eax | ||
2473 | +32:ecx | ||
2474 | +32:edx | ||
2475 | +32:ebx | ||
2476 | +32:esp | ||
2477 | +32:ebp | ||
2478 | +32:esi | ||
2479 | +32:edi | ||
2480 | +32:eip | ||
2481 | +32:eflags | ||
2482 | +32:cs | ||
2483 | +32:ss | ||
2484 | +32:ds | ||
2485 | +32:es | ||
2486 | +32:fs | ||
2487 | +32:gs | ||
2488 | +80:st0 | ||
2489 | +80:st1 | ||
2490 | +80:st2 | ||
2491 | +80:st3 | ||
2492 | +80:st4 | ||
2493 | +80:st5 | ||
2494 | +80:st6 | ||
2495 | +80:st7 | ||
2496 | +32:fctrl | ||
2497 | +32:fstat | ||
2498 | +32:ftag | ||
2499 | +32:fiseg | ||
2500 | +32:fioff | ||
2501 | +32:foseg | ||
2502 | +32:fooff | ||
2503 | +32:fop | ||
2504 | +128:xmm0 | ||
2505 | +128:xmm1 | ||
2506 | +128:xmm2 | ||
2507 | +128:xmm3 | ||
2508 | +128:xmm4 | ||
2509 | +128:xmm5 | ||
2510 | +128:xmm6 | ||
2511 | +128:xmm7 | ||
2512 | +32:mxcsr | ||
2513 | +128:ymm0h | ||
2514 | +128:ymm1h | ||
2515 | +128:ymm2h | ||
2516 | +128:ymm3h | ||
2517 | +128:ymm4h | ||
2518 | +128:ymm5h | ||
2519 | +128:ymm6h | ||
2520 | +128:ymm7h | ||
2521 | +128:bnd0raw | ||
2522 | +128:bnd1raw | ||
2523 | +128:bnd2raw | ||
2524 | +128:bnd3raw | ||
2525 | +64:bndcfgu | ||
2526 | +64:bndstatus | ||
2527 | diff --git a/gdb/regformats/i386/i386-mpx-linux.dat b/gdb/regformats/i386/i386-mpx-linux.dat | ||
2528 | index b52b68d..1dcdce9 100644 | ||
2529 | --- a/gdb/regformats/i386/i386-mpx-linux.dat | ||
2530 | +++ b/gdb/regformats/i386/i386-mpx-linux.dat | ||
2531 | @@ -45,14 +45,6 @@ expedite:ebp,esp,eip | ||
2532 | 128:xmm7 | ||
2533 | 32:mxcsr | ||
2534 | 32:orig_eax | ||
2535 | -128:ymm0h | ||
2536 | -128:ymm1h | ||
2537 | -128:ymm2h | ||
2538 | -128:ymm3h | ||
2539 | -128:ymm4h | ||
2540 | -128:ymm5h | ||
2541 | -128:ymm6h | ||
2542 | -128:ymm7h | ||
2543 | 128:bnd0raw | ||
2544 | 128:bnd1raw | ||
2545 | 128:bnd2raw | ||
2546 | diff --git a/gdb/regformats/i386/i386-mpx.dat b/gdb/regformats/i386/i386-mpx.dat | ||
2547 | index 0ea420b..dda5164 100644 | ||
2548 | --- a/gdb/regformats/i386/i386-mpx.dat | ||
2549 | +++ b/gdb/regformats/i386/i386-mpx.dat | ||
2550 | @@ -44,14 +44,6 @@ expedite:ebp,esp,eip | ||
2551 | 128:xmm6 | ||
2552 | 128:xmm7 | ||
2553 | 32:mxcsr | ||
2554 | -128:ymm0h | ||
2555 | -128:ymm1h | ||
2556 | -128:ymm2h | ||
2557 | -128:ymm3h | ||
2558 | -128:ymm4h | ||
2559 | -128:ymm5h | ||
2560 | -128:ymm6h | ||
2561 | -128:ymm7h | ||
2562 | 128:bnd0raw | ||
2563 | 128:bnd1raw | ||
2564 | 128:bnd2raw | ||
2565 | diff --git a/gdb/testsuite/gdb.trace/ftrace.exp b/gdb/testsuite/gdb.trace/ftrace.exp | ||
2566 | index 15ad7e7..3a94471 100644 | ||
2567 | --- a/gdb/testsuite/gdb.trace/ftrace.exp | ||
2568 | +++ b/gdb/testsuite/gdb.trace/ftrace.exp | ||
2569 | @@ -132,7 +132,6 @@ proc test_fast_tracepoints {} { | ||
2570 | gdb_test "tfind pc *set_point" "Found trace frame .*" \ | ||
2571 | "tfind set_point frame, first time" | ||
2572 | |||
2573 | - setup_kfail "gdb/13808" "x86_64-*-linux*" | ||
2574 | gdb_test "print globvar" " = 1" | ||
2575 | |||
2576 | gdb_test "tfind pc *set_point" "Found trace frame .*" \ | ||
2577 | diff --git a/gdb/x86-linux-nat.c b/gdb/x86-linux-nat.c | ||
2578 | index 3cc18c1..107576f 100644 | ||
2579 | --- a/gdb/x86-linux-nat.c | ||
2580 | +++ b/gdb/x86-linux-nat.c | ||
2581 | @@ -215,6 +215,11 @@ x86_linux_read_description (struct target_ops *ops) | ||
2582 | return tdesc_x32_avx_linux; /* No MPX on x32 using AVX. */ | ||
2583 | else | ||
2584 | return tdesc_amd64_mpx_linux; | ||
2585 | + case X86_XSTATE_AVX_MPX_MASK: | ||
2586 | + if (is_x32) | ||
2587 | + return tdesc_x32_avx_linux; /* No MPX on x32 using AVX. */ | ||
2588 | + else | ||
2589 | + return tdesc_amd64_avx_mpx_linux; | ||
2590 | case X86_XSTATE_AVX_MASK: | ||
2591 | if (is_x32) | ||
2592 | return tdesc_x32_avx_linux; | ||
2593 | @@ -237,6 +242,8 @@ x86_linux_read_description (struct target_ops *ops) | ||
2594 | return tdesc_i386_avx512_linux; | ||
2595 | case X86_XSTATE_MPX_MASK: | ||
2596 | return tdesc_i386_mpx_linux; | ||
2597 | + case X86_XSTATE_AVX_MPX_MASK: | ||
2598 | + return tdesc_i386_avx_mpx_linux; | ||
2599 | case X86_XSTATE_AVX_MASK: | ||
2600 | return tdesc_i386_avx_linux; | ||
2601 | default: | ||