summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2016-05-19 15:24:13 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-22 08:43:01 +0100
commitda4bfbef46e52d2b647a837a47d0f5cb813ba8b2 (patch)
treeac6d8cbc8265c74c78556e71ab9b8cb4955dcc0a /meta/recipes-devtools/gdb
parenteff84a76acea1a0842194106a66684511f409842 (diff)
downloadpoky-da4bfbef46e52d2b647a837a47d0f5cb813ba8b2.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: 350fd5d16888b3882b861ce955a3383e99420bd4) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gdb')
-rw-r--r--meta/recipes-devtools/gdb/gdb-7.10.1.inc1
-rw-r--r--meta/recipes-devtools/gdb/gdb/0001-7.10.1-Add-target-descriptions-for-AVX-MPX.patch2170
2 files changed, 2171 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gdb/gdb-7.10.1.inc b/meta/recipes-devtools/gdb/gdb-7.10.1.inc
index a9267d5548..92530e0a15 100644
--- a/meta/recipes-devtools/gdb/gdb-7.10.1.inc
+++ b/meta/recipes-devtools/gdb/gdb-7.10.1.inc
@@ -7,3 +7,4 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
7SRC_URI[md5sum] = "b93a2721393e5fa226375b42d567d90b" 7SRC_URI[md5sum] = "b93a2721393e5fa226375b42d567d90b"
8SRC_URI[sha256sum] = "ff14f8050e6484508c73cbfa63731e57901478490ca1672dc0b5e2b03f6af622" 8SRC_URI[sha256sum] = "ff14f8050e6484508c73cbfa63731e57901478490ca1672dc0b5e2b03f6af622"
9 9
10SRC_URI += "file://0001-7.10.1-Add-target-descriptions-for-AVX-MPX.patch"
diff --git a/meta/recipes-devtools/gdb/gdb/0001-7.10.1-Add-target-descriptions-for-AVX-MPX.patch b/meta/recipes-devtools/gdb/gdb/0001-7.10.1-Add-target-descriptions-for-AVX-MPX.patch
new file mode 100644
index 0000000000..38834c7b2b
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/0001-7.10.1-Add-target-descriptions-for-AVX-MPX.patch
@@ -0,0 +1,2170 @@
1From 70b530509d21409b788715751c1e7af76111bf9b Mon Sep 17 00:00:00 2001
2From: Walfred Tedeschi <walfred.tedeschi@intel.com>
3Date: Fri, 13 May 2016 11:16:23 +0200
4Subject: [PATCH] Add target descriptions for AVX + MPX
5
6The current MPX target descriptions assume that MPX is always combined
7with AVX, however that's not correct. We can have machines with MPX
8and without AVX; or machines with AVX and without MPX.
9
10This patch adds new target descriptions for machines that support
11both MPX and AVX, as duplicates of the existing MPX descriptions.
12
13The following commit will remove AVX from the MPX-only descriptions.
14
152016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
16
17gdb/ChangeLog:
18
19 * amd64-linux-tdep.c (features/i386/amd64-avx-mpx-linux.c):
20 New include.
21 (amd64_linux_core_read_description): Add case for
22 X86_XSTATE_AVX_MPX_MASK.
23 (_initialize_amd64_linux_tdep): Call initialize_tdesc_amd64_avx_mpx_linux.
24 * amd64-linux-tdep.h (tdesc_amd64_avx_mpx_linux): New definition.
25 * amd64-tdep.c (features/i386/amd64-avx-mpx.c): New include.
26 (amd64_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
27 (_initialize_amd64_tdep): Call initialize_tdesc_amd64_avx_mpx.
28 * common/x86-xstate.h (X86_XSTATE_MPX_MASK): Remove AVX bits.
29 (X86_XSTATE_AVX_MPX_MASK): New case.
30 * features/Makefile (i386/i386-avx-mpx, i386/i386-avx-mpx-linux)
31 (i386/amd64-avx-mpx, i386/amd64-avx-mpx-linux): New rules.
32 (i386/i386-avx-mpx-expedite, i386/i386-avx-mpx-linux-expedite)
33 (i386/amd64-avx-mpx-expedite, i386/amd64-avx-mpx-linux-expedite):
34 New expedites.
35 * i386-linux-tdep.c (features/i386/i386-avx-mpx-linux.c): New
36 include.
37 (i386_linux_core_read_description): Add case
38 X86_XSTATE_AVX_MPX_MASK.
39 (_initialize_i386_linux_tdep): Call
40 initialize_tdesc_i386_avx_mpx_linux.
41 * i386-linux-tdep.h (tdesc_i386_avx_mpx_linux): New include.
42 * i386-tdep.c (features/i386/i386-avx-mpx.c): New include.
43 (i386_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
44 * x86-linux-nat.c (x86_linux_read_description): Add case for
45 X86_XSTATE_AVX_MPX_MASK.
46 * features/i386/amd64-avx-mpx-linux.xml: New file.
47 * features/i386/i386-avx-mpx-linux.xml: New file.
48 * features/i386/i386-avx-mpx.xml: New file.
49 * features/i386/amd64-avx-mpx.xml: New file.
50 * features/i386/amd64-avx-mpx-linux.c: Generated.
51 * features/i386/amd64-avx-mpx.c: Generated.
52 * features/i386/i386-avx-mpx-linux.c: Generated.
53 * features/i386/i386-avx-mpx.c: Generated.
54 * regformats/i386/amd64-avx-mpx-linux.dat: Generated.
55 * regformats/i386/amd64-avx-mpx.dat: Generated.
56 * regformats/i386/i386-avx-mpx-linux.dat: Generated.
57 * regformats/i386/i386-avx-mpx.dat: Generated.
58
59gdb/gdbserver/ChangeLog:
60
61 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
62 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
63 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
64 (amd64-avx-mpx-linux.c): New rules.
65 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
66 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
67 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
68 (srv_amd64_regobj): Add amd64-avx-mpx.o.
69 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
70 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
71 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
72 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
73 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
74 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
75 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
76 * linux-x86-low.c (x86_linux_read_description): Add case for
77 X86_XSTATE_AVX_MPX_MASK.
78 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
79 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
80 init_registers_i386_avx_mpx_linux.
81 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
82 (initialize_low_tracepoint): Call
83 init_registers_i386_avx_mpx_linux.
84 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
85 (initialize_low_tracepoint): Call
86 init_registers_amd64_avx_mpx_linux.
87 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
88 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
89 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
90 declarations.
91
92Change-Id: I7b0642263cfa3e47b626022796e5dd3627b92ba8
93
94Upstream-Status: Backport
95Signed-off-by: Saul Wold <sgw@linux.intel.com>
96---
97 gdb/ChangeLog | 57 ++++++++
98 gdb/amd64-linux-tdep.c | 7 +
99 gdb/amd64-linux-tdep.h | 1 +
100 gdb/amd64-tdep.c | 4 +
101 gdb/common/x86-xstate.h | 5 +-
102 gdb/features/Makefile | 18 +++
103 gdb/features/i386/amd64-avx-mpx-linux.c | 211 ++++++++++++++++++++++++++++
104 gdb/features/i386/amd64-avx-mpx-linux.xml | 19 +++
105 gdb/features/i386/amd64-avx-mpx.c | 206 +++++++++++++++++++++++++++
106 gdb/features/i386/amd64-avx-mpx.xml | 17 +++
107 gdb/features/i386/amd64-mpx-linux.c | 30 +---
108 gdb/features/i386/amd64-mpx-linux.xml | 1 -
109 gdb/features/i386/amd64-mpx.c | 30 +---
110 gdb/features/i386/amd64-mpx.xml | 1 -
111 gdb/features/i386/i386-avx-mpx-linux.c | 187 ++++++++++++++++++++++++
112 gdb/features/i386/i386-avx-mpx-linux.xml | 19 +++
113 gdb/features/i386/i386-avx-mpx.c | 182 ++++++++++++++++++++++++
114 gdb/features/i386/i386-avx-mpx.xml | 17 +++
115 gdb/features/i386/i386-mpx-linux.c | 22 +--
116 gdb/features/i386/i386-mpx-linux.xml | 1 -
117 gdb/features/i386/i386-mpx.c | 22 +--
118 gdb/features/i386/i386-mpx.xml | 1 -
119 gdb/gdbserver/ChangeLog | 33 +++++
120 gdb/gdbserver/Makefile.in | 10 ++
121 gdb/gdbserver/configure.srv | 17 +--
122 gdb/gdbserver/linux-x86-low.c | 16 +++
123 gdb/i386-linux-tdep.c | 4 +
124 gdb/i386-linux-tdep.h | 1 +
125 gdb/i386-tdep.c | 4 +
126 gdb/regformats/i386/amd64-avx-mpx-linux.dat | 85 +++++++++++
127 gdb/regformats/i386/amd64-avx-mpx.dat | 84 +++++++++++
128 gdb/regformats/i386/amd64-mpx-linux.dat | 16 ---
129 gdb/regformats/i386/amd64-mpx.dat | 16 ---
130 gdb/regformats/i386/i386-avx-mpx-linux.dat | 61 ++++++++
131 gdb/regformats/i386/i386-avx-mpx.dat | 60 ++++++++
132 gdb/regformats/i386/i386-mpx-linux.dat | 8 --
133 gdb/regformats/i386/i386-mpx.dat | 8 --
134 gdb/x86-linux-nat.c | 7 +
135 38 files changed, 1346 insertions(+), 142 deletions(-)
136 create mode 100644 gdb/features/i386/amd64-avx-mpx-linux.c
137 create mode 100644 gdb/features/i386/amd64-avx-mpx-linux.xml
138 create mode 100644 gdb/features/i386/amd64-avx-mpx.c
139 create mode 100644 gdb/features/i386/amd64-avx-mpx.xml
140 create mode 100644 gdb/features/i386/i386-avx-mpx-linux.c
141 create mode 100644 gdb/features/i386/i386-avx-mpx-linux.xml
142 create mode 100644 gdb/features/i386/i386-avx-mpx.c
143 create mode 100644 gdb/features/i386/i386-avx-mpx.xml
144 create mode 100644 gdb/regformats/i386/amd64-avx-mpx-linux.dat
145 create mode 100644 gdb/regformats/i386/amd64-avx-mpx.dat
146 create mode 100644 gdb/regformats/i386/i386-avx-mpx-linux.dat
147 create mode 100644 gdb/regformats/i386/i386-avx-mpx.dat
148
149Index: gdb-7.10.1/gdb/ChangeLog
150===================================================================
151--- gdb-7.10.1.orig/gdb/ChangeLog
152+++ gdb-7.10.1/gdb/ChangeLog
153@@ -1,3 +1,60 @@
154+2016-04-14 Walfred Tedeschi <walfred.tedeschi@intel.com>
155+
156+ * features/i386/amd64-mpx-linux.xml: Remove AVX feature.
157+ * features/i386/amd64-mpx.xml: Remove AVX feature.
158+ * features/i386/i386-mpx-linux.xml: Remove AVX feature.
159+ * features/i386/i386-mpx.xml: Remove AVX feature.
160+ * features/i386/amd64-mpx-linux.c: Regenerate.
161+ * features/i386/amd64-mpx.c: Regenerate.
162+ * features/i386/i386-mpx-linux.c: Regenerate.
163+ * features/i386/i386-mpx.c: Regenerate.
164+ * regformats/i386/amd64-mpx-linux.dat: Regenerate.
165+ * regformats/i386/amd64-mpx.dat: Regenerate.
166+ * regformats/i386/i386-mpx-linux.dat: Regenerate.
167+ * regformats/i386/i386-mpx.dat: Regenerate.
168+
169+2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
170+
171+ * amd64-linux-tdep.c (features/i386/amd64-avx-mpx-linux.c):
172+ New include.
173+ (amd64_linux_core_read_description): Add case for
174+ X86_XSTATE_AVX_MPX_MASK.
175+ (_initialize_amd64_linux_tdep): Call initialize_tdesc_amd64_avx_mpx_linux.
176+ * amd64-linux-tdep.h (tdesc_amd64_avx_mpx_linux): New definition.
177+ * amd64-tdep.c (features/i386/amd64-avx-mpx.c): New include.
178+ (amd64_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
179+ (_initialize_amd64_tdep): Call initialize_tdesc_amd64_avx_mpx.
180+ * common/x86-xstate.h (X86_XSTATE_MPX_MASK): Remove AVX bits.
181+ (X86_XSTATE_AVX_MPX_MASK): New case.
182+ * features/Makefile (i386/i386-avx-mpx, i386/i386-avx-mpx-linux)
183+ (i386/amd64-avx-mpx, i386/amd64-avx-mpx-linux): New rules.
184+ (i386/i386-avx-mpx-expedite, i386/i386-avx-mpx-linux-expedite)
185+ (i386/amd64-avx-mpx-expedite, i386/amd64-avx-mpx-linux-expedite):
186+ New expedites.
187+ * i386-linux-tdep.c (features/i386/i386-avx-mpx-linux.c): New
188+ include.
189+ (i386_linux_core_read_description): Add case
190+ X86_XSTATE_AVX_MPX_MASK.
191+ (_initialize_i386_linux_tdep): Call
192+ initialize_tdesc_i386_avx_mpx_linux.
193+ * i386-linux-tdep.h (tdesc_i386_avx_mpx_linux): New include.
194+ * i386-tdep.c (features/i386/i386-avx-mpx.c): New include.
195+ (i386_target_description): Add case for X86_XSTATE_AVX_MPX_MASK.
196+ * x86-linux-nat.c (x86_linux_read_description): Add case for
197+ X86_XSTATE_AVX_MPX_MASK.
198+ * features/i386/amd64-avx-mpx-linux.xml: New file.
199+ * features/i386/i386-avx-mpx-linux.xml: New file.
200+ * features/i386/i386-avx-mpx.xml: New file.
201+ * features/i386/amd64-avx-mpx.xml: New file.
202+ * features/i386/amd64-avx-mpx-linux.c: Generated.
203+ * features/i386/amd64-avx-mpx.c: Generated.
204+ * features/i386/i386-avx-mpx-linux.c: Generated.
205+ * features/i386/i386-avx-mpx.c: Generated.
206+ * regformats/i386/amd64-avx-mpx-linux.dat: Generated.
207+ * regformats/i386/amd64-avx-mpx.dat: Generated.
208+ * regformats/i386/i386-avx-mpx-linux.dat: Generated.
209+ * regformats/i386/i386-avx-mpx.dat: Generated.
210+
211 2015-12-05 Joel Brobecker <brobecker@adacore.com>
212
213 * version.in: Set GDB version number to 7.10.1.
214Index: gdb-7.10.1/gdb/amd64-linux-tdep.c
215===================================================================
216--- gdb-7.10.1.orig/gdb/amd64-linux-tdep.c
217+++ gdb-7.10.1/gdb/amd64-linux-tdep.c
218@@ -43,6 +43,7 @@
219 #include "features/i386/amd64-linux.c"
220 #include "features/i386/amd64-avx-linux.c"
221 #include "features/i386/amd64-mpx-linux.c"
222+#include "features/i386/amd64-avx-mpx-linux.c"
223 #include "features/i386/amd64-avx512-linux.c"
224
225 #include "features/i386/x32-linux.c"
226@@ -1589,6 +1590,11 @@ amd64_linux_core_read_description (struc
227 return tdesc_x32_avx_linux; /* No x32 MPX falling back to AVX. */
228 else
229 return tdesc_amd64_mpx_linux;
230+ case X86_XSTATE_AVX_MPX_MASK:
231+ if (gdbarch_ptr_bit (gdbarch) == 32)
232+ return tdesc_x32_avx_linux; /* No x32 MPX falling back to AVX. */
233+ else
234+ return tdesc_amd64_avx_mpx_linux;
235 case X86_XSTATE_AVX_MASK:
236 if (gdbarch_ptr_bit (gdbarch) == 32)
237 return tdesc_x32_avx_linux;
238@@ -2280,6 +2286,7 @@ _initialize_amd64_linux_tdep (void)
239 initialize_tdesc_amd64_linux ();
240 initialize_tdesc_amd64_avx_linux ();
241 initialize_tdesc_amd64_mpx_linux ();
242+ initialize_tdesc_amd64_avx_mpx_linux ();
243 initialize_tdesc_amd64_avx512_linux ();
244
245 initialize_tdesc_x32_linux ();
246Index: gdb-7.10.1/gdb/amd64-linux-tdep.h
247===================================================================
248--- gdb-7.10.1.orig/gdb/amd64-linux-tdep.h
249+++ gdb-7.10.1/gdb/amd64-linux-tdep.h
250@@ -35,6 +35,7 @@
251 extern struct target_desc *tdesc_amd64_linux;
252 extern struct target_desc *tdesc_amd64_avx_linux;
253 extern struct target_desc *tdesc_amd64_mpx_linux;
254+extern struct target_desc *tdesc_amd64_avx_mpx_linux;
255 extern struct target_desc *tdesc_amd64_avx512_linux;
256
257 extern struct target_desc *tdesc_x32_linux;
258Index: gdb-7.10.1/gdb/amd64-tdep.c
259===================================================================
260--- gdb-7.10.1.orig/gdb/amd64-tdep.c
261+++ gdb-7.10.1/gdb/amd64-tdep.c
262@@ -44,6 +44,7 @@
263 #include "features/i386/amd64.c"
264 #include "features/i386/amd64-avx.c"
265 #include "features/i386/amd64-mpx.c"
266+#include "features/i386/amd64-avx-mpx.c"
267 #include "features/i386/amd64-avx512.c"
268
269 #include "features/i386/x32.c"
270@@ -3133,6 +3134,8 @@ amd64_target_description (uint64_t xcr0)
271 return tdesc_amd64_avx512;
272 case X86_XSTATE_MPX_MASK:
273 return tdesc_amd64_mpx;
274+ case X86_XSTATE_AVX_MPX_MASK:
275+ return tdesc_amd64_avx_mpx;
276 case X86_XSTATE_AVX_MASK:
277 return tdesc_amd64_avx;
278 default:
279@@ -3149,6 +3152,7 @@ _initialize_amd64_tdep (void)
280 initialize_tdesc_amd64 ();
281 initialize_tdesc_amd64_avx ();
282 initialize_tdesc_amd64_mpx ();
283+ initialize_tdesc_amd64_avx_mpx ();
284 initialize_tdesc_amd64_avx512 ();
285
286 initialize_tdesc_x32 ();
287Index: gdb-7.10.1/gdb/common/x86-xstate.h
288===================================================================
289--- gdb-7.10.1.orig/gdb/common/x86-xstate.h
290+++ gdb-7.10.1/gdb/common/x86-xstate.h
291@@ -39,9 +39,10 @@
292 #define X86_XSTATE_X87_MASK X86_XSTATE_X87
293 #define X86_XSTATE_SSE_MASK (X86_XSTATE_X87 | X86_XSTATE_SSE)
294 #define X86_XSTATE_AVX_MASK (X86_XSTATE_SSE_MASK | X86_XSTATE_AVX)
295-#define X86_XSTATE_MPX_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_MPX)
296+#define X86_XSTATE_MPX_MASK (X86_XSTATE_SSE_MASK | X86_XSTATE_MPX)
297+#define X86_XSTATE_AVX_MPX_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_MPX)
298 #define X86_XSTATE_AVX512_MASK (X86_XSTATE_AVX_MASK | X86_XSTATE_AVX512)
299-#define X86_XSTATE_MPX_AVX512_MASK (X86_XSTATE_MPX_MASK | X86_XSTATE_AVX512)
300+#define X86_XSTATE_MPX_AVX512_MASK (X86_XSTATE_AVX_MPX_MASK | X86_XSTATE_AVX512)
301
302 #define X86_XSTATE_ALL_MASK (X86_XSTATE_MPX_AVX512_MASK)
303
304Index: gdb-7.10.1/gdb/features/Makefile
305===================================================================
306--- gdb-7.10.1.orig/gdb/features/Makefile
307+++ gdb-7.10.1/gdb/features/Makefile
308@@ -50,9 +50,11 @@ WHICH = aarch64 \
309 i386/amd64 i386/amd64-linux \
310 i386/i386-avx i386/i386-avx-linux \
311 i386/i386-mpx i386/i386-mpx-linux \
312+ i386/i386-avx-mpx i386/i386-avx-mpx-linux \
313 i386/i386-avx512 i386/i386-avx512-linux \
314 i386/amd64-avx i386/amd64-avx-linux \
315 i386/amd64-mpx i386/amd64-mpx-linux \
316+ i386/amd64-avx-mpx i386/amd64-avx-mpx-linux \
317 i386/amd64-avx512 i386/amd64-avx512-linux \
318 i386/x32 i386/x32-linux \
319 i386/x32-avx i386/x32-avx-linux \
320@@ -83,7 +85,9 @@ i386/amd64-linux-expedite = rbp,rsp,rip
321 i386/i386-avx-expedite = ebp,esp,eip
322 i386/i386-avx-linux-expedite = ebp,esp,eip
323 i386/i386-mpx-expedite = ebp,esp,eip
324+i386/i386-avx-mpx-expedite = ebp,esp,eip
325 i386/i386-mpx-linux-expedite = ebp,esp,eip
326+i386/i386-avx-mpx-linux-expedite = ebp,esp,eip
327 i386/i386-avx512-expedite = ebp,esp,eip
328 i386/i386-avx512-linux-expedite = ebp,esp,eip
329 i386/i386-mmx-expedite = ebp,esp,eip
330@@ -91,7 +95,9 @@ i386/i386-mmx-linux-expedite = ebp,esp,e
331 i386/amd64-avx-expedite = rbp,rsp,rip
332 i386/amd64-avx-linux-expedite = rbp,rsp,rip
333 i386/amd64-mpx-expedite = rbp,rsp,rip
334+i386/amd64-avx-mpx-expedite = rbp,rsp,rip
335 i386/amd64-mpx-linux-expedite = rbp,rsp,rip
336+i386/amd64-avx-mpx-linux-expedite = rbp,rsp,rip
337 i386/amd64-avx512-expedite = rbp,rsp,rip
338 i386/amd64-avx512-linux-expedite = rbp,rsp,rip
339 i386/x32-expedite = rbp,rsp,rip
340@@ -156,6 +162,8 @@ XMLTOC = \
341 i386/amd64-linux.xml \
342 i386/amd64-mpx-linux.xml \
343 i386/amd64-mpx.xml \
344+ i386/amd64-avx-mpx-linux.xml \
345+ i386/amd64-avx-mpx.xml \
346 i386/amd64.xml \
347 i386/i386-avx-linux.xml \
348 i386/i386-avx.xml \
349@@ -166,6 +174,8 @@ XMLTOC = \
350 i386/i386-mmx.xml \
351 i386/i386-mpx-linux.xml \
352 i386/i386-mpx.xml \
353+ i386/i386-avx-mpx-linux.xml \
354+ i386/i386-avx-mpx.xml \
355 i386/i386.xml \
356 i386/x32-avx-linux.xml \
357 i386/x32-avx.xml \
358@@ -271,6 +281,10 @@ $(outdir)/i386/i386-mpx.dat: i386/32bit-
359 i386/32bit-mpx.xml
360 $(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
361 i386/32bit-linux.xml i386/32bit-mpx.xml
362+$(outdir)/i386/i386-mpx-linux.dat: i386/32bit-core.xml \
363+ i386/32bit-linux.xml i386/32bit-mpx.xml
364+$(outdir)/i386/i386-avx-mpx-linux.dat: i386/32bit-core.xml \
365+ i386/32bit-linux.xml i386/32bit-mpx.xml
366 $(outdir)/i386/i386-avx512.dat: i386/32bit-core.xml i386/32bit-avx.xml \
367 i386/32bit-mpx.xml i386/32bit-avx512.xml
368 $(outdir)/i386/i386-avx512-linux.dat: i386/32bit-core.xml i386/32bit-avx.xml \
369@@ -282,8 +296,12 @@ $(outdir)/i386/amd64-avx-linux.dat: i386
370 i386/64bit-linux.xml
371 $(outdir)/i386/amd64-mpx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
372 i386/64bit-linux.xml i386/64bit-mpx.xml
373+$(outdir)/i386/amd64-avx-mpx-linux.dat: i386/64bit-core.xml \
374+ i386/64bit-linux.xml i386/64bit-mpx.xml
375 $(outdir)/i386/amd64-mpx.dat: i386/64bit-core.xml i386/64bit-avx.xml \
376 i386/64bit-mpx.xml
377+$(outdir)/i386/amd64-avx-mpx.dat: i386/64bit-core.xml \
378+ i386/64bit-mpx.xml
379 $(outdir)/i386/amd64-avx512.dat: i386/64bit-core.xml i386/64bit-avx.xml \
380 i386/64bit-mpx.xml i386/64bit-avx512.xml
381 $(outdir)/i386/amd64-avx512-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
382Index: gdb-7.10.1/gdb/features/i386/amd64-avx-mpx-linux.c
383===================================================================
384--- /dev/null
385+++ gdb-7.10.1/gdb/features/i386/amd64-avx-mpx-linux.c
386@@ -0,0 +1,211 @@
387+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
388+ Original: amd64-avx-mpx-linux.xml */
389+
390+#include "defs.h"
391+#include "osabi.h"
392+#include "target-descriptions.h"
393+
394+struct target_desc *tdesc_amd64_avx_mpx_linux;
395+static void
396+initialize_tdesc_amd64_avx_mpx_linux (void)
397+{
398+ struct target_desc *result = allocate_target_description ();
399+ struct tdesc_feature *feature;
400+ struct tdesc_type *field_type;
401+ struct tdesc_type *type;
402+
403+ set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
404+
405+ set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
406+
407+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
408+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
409+ tdesc_add_flag (field_type, 0, "CF");
410+ tdesc_add_flag (field_type, 1, "");
411+ tdesc_add_flag (field_type, 2, "PF");
412+ tdesc_add_flag (field_type, 4, "AF");
413+ tdesc_add_flag (field_type, 6, "ZF");
414+ tdesc_add_flag (field_type, 7, "SF");
415+ tdesc_add_flag (field_type, 8, "TF");
416+ tdesc_add_flag (field_type, 9, "IF");
417+ tdesc_add_flag (field_type, 10, "DF");
418+ tdesc_add_flag (field_type, 11, "OF");
419+ tdesc_add_flag (field_type, 14, "NT");
420+ tdesc_add_flag (field_type, 16, "RF");
421+ tdesc_add_flag (field_type, 17, "VM");
422+ tdesc_add_flag (field_type, 18, "AC");
423+ tdesc_add_flag (field_type, 19, "VIF");
424+ tdesc_add_flag (field_type, 20, "VIP");
425+ tdesc_add_flag (field_type, 21, "ID");
426+
427+ tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
428+ tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
429+ tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
430+ tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
431+ tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
432+ tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
433+ tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
434+ tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
435+ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
436+ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
437+ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
438+ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
439+ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
440+ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
441+ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
442+ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
443+ tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
444+ tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
445+ tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
446+ tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
447+ tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
448+ tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
449+ tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
450+ tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
451+ tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
452+ tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
453+ tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
454+ tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
455+ tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
456+ tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
457+ tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
458+ tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
459+ tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
460+ tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
461+ tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
462+ tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
463+ tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
464+ tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
465+ tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
466+ tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
467+
468+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
469+ field_type = tdesc_named_type (feature, "ieee_single");
470+ tdesc_create_vector (feature, "v4f", field_type, 4);
471+
472+ field_type = tdesc_named_type (feature, "ieee_double");
473+ tdesc_create_vector (feature, "v2d", field_type, 2);
474+
475+ field_type = tdesc_named_type (feature, "int8");
476+ tdesc_create_vector (feature, "v16i8", field_type, 16);
477+
478+ field_type = tdesc_named_type (feature, "int16");
479+ tdesc_create_vector (feature, "v8i16", field_type, 8);
480+
481+ field_type = tdesc_named_type (feature, "int32");
482+ tdesc_create_vector (feature, "v4i32", field_type, 4);
483+
484+ field_type = tdesc_named_type (feature, "int64");
485+ tdesc_create_vector (feature, "v2i64", field_type, 2);
486+
487+ type = tdesc_create_union (feature, "vec128");
488+ field_type = tdesc_named_type (feature, "v4f");
489+ tdesc_add_field (type, "v4_float", field_type);
490+ field_type = tdesc_named_type (feature, "v2d");
491+ tdesc_add_field (type, "v2_double", field_type);
492+ field_type = tdesc_named_type (feature, "v16i8");
493+ tdesc_add_field (type, "v16_int8", field_type);
494+ field_type = tdesc_named_type (feature, "v8i16");
495+ tdesc_add_field (type, "v8_int16", field_type);
496+ field_type = tdesc_named_type (feature, "v4i32");
497+ tdesc_add_field (type, "v4_int32", field_type);
498+ field_type = tdesc_named_type (feature, "v2i64");
499+ tdesc_add_field (type, "v2_int64", field_type);
500+ field_type = tdesc_named_type (feature, "uint128");
501+ tdesc_add_field (type, "uint128", field_type);
502+
503+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
504+ tdesc_add_flag (field_type, 0, "IE");
505+ tdesc_add_flag (field_type, 1, "DE");
506+ tdesc_add_flag (field_type, 2, "ZE");
507+ tdesc_add_flag (field_type, 3, "OE");
508+ tdesc_add_flag (field_type, 4, "UE");
509+ tdesc_add_flag (field_type, 5, "PE");
510+ tdesc_add_flag (field_type, 6, "DAZ");
511+ tdesc_add_flag (field_type, 7, "IM");
512+ tdesc_add_flag (field_type, 8, "DM");
513+ tdesc_add_flag (field_type, 9, "ZM");
514+ tdesc_add_flag (field_type, 10, "OM");
515+ tdesc_add_flag (field_type, 11, "UM");
516+ tdesc_add_flag (field_type, 12, "PM");
517+ tdesc_add_flag (field_type, 15, "FZ");
518+
519+ tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
520+ tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
521+ tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
522+ tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
523+ tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
524+ tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
525+ tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
526+ tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
527+ tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
528+ tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
529+ tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
530+ tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
531+ tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
532+ tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
533+ tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
534+ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
535+ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
536+
537+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
538+ tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
539+
540+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
541+ tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
542+ tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
543+ tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
544+ tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
545+ tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
546+ tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
547+ tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
548+ tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
549+ tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
550+ tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
551+ tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
552+ tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
553+ tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
554+ tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
555+ tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
556+ tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
557+
558+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
559+ type = tdesc_create_struct (feature, "br128");
560+ field_type = tdesc_named_type (feature, "uint64");
561+ tdesc_add_field (type, "lbound", field_type);
562+ field_type = tdesc_named_type (feature, "uint64");
563+ tdesc_add_field (type, "ubound_raw", field_type);
564+
565+ type = tdesc_create_struct (feature, "_bndstatus");
566+ tdesc_set_struct_size (type, 8);
567+ tdesc_add_bitfield (type, "bde", 2, 63);
568+ tdesc_add_bitfield (type, "error", 0, 1);
569+
570+ type = tdesc_create_union (feature, "status");
571+ field_type = tdesc_named_type (feature, "data_ptr");
572+ tdesc_add_field (type, "raw", field_type);
573+ field_type = tdesc_named_type (feature, "_bndstatus");
574+ tdesc_add_field (type, "status", field_type);
575+
576+ type = tdesc_create_struct (feature, "_bndcfgu");
577+ tdesc_set_struct_size (type, 8);
578+ tdesc_add_bitfield (type, "base", 12, 63);
579+ tdesc_add_bitfield (type, "reserved", 2, 11);
580+ tdesc_add_bitfield (type, "preserved", 1, 1);
581+ tdesc_add_bitfield (type, "enabled", 0, 0);
582+
583+ type = tdesc_create_union (feature, "cfgu");
584+ field_type = tdesc_named_type (feature, "data_ptr");
585+ tdesc_add_field (type, "raw", field_type);
586+ field_type = tdesc_named_type (feature, "_bndcfgu");
587+ tdesc_add_field (type, "config", field_type);
588+
589+ tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128");
590+ tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128");
591+ tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128");
592+ tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128");
593+ tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu");
594+ tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status");
595+
596+ tdesc_amd64_avx_mpx_linux = result;
597+}
598Index: gdb-7.10.1/gdb/features/i386/amd64-avx-mpx-linux.xml
599===================================================================
600--- /dev/null
601+++ gdb-7.10.1/gdb/features/i386/amd64-avx-mpx-linux.xml
602@@ -0,0 +1,19 @@
603+<?xml version="1.0"?>
604+<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
605+
606+ Copying and distribution of this file, with or without modification,
607+ are permitted in any medium without royalty provided the copyright
608+ notice and this notice are preserved. -->
609+
610+<!-- AMD64 with AVX and MPX - Includes Linux-only special "register". -->
611+
612+<!DOCTYPE target SYSTEM "gdb-target.dtd">
613+<target>
614+ <architecture>i386:x86-64</architecture>
615+ <osabi>GNU/Linux</osabi>
616+ <xi:include href="64bit-core.xml"/>
617+ <xi:include href="64bit-sse.xml"/>
618+ <xi:include href="64bit-linux.xml"/>
619+ <xi:include href="64bit-avx.xml"/>
620+ <xi:include href="64bit-mpx.xml"/>
621+</target>
622Index: gdb-7.10.1/gdb/features/i386/amd64-avx-mpx.c
623===================================================================
624--- /dev/null
625+++ gdb-7.10.1/gdb/features/i386/amd64-avx-mpx.c
626@@ -0,0 +1,206 @@
627+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
628+ Original: amd64-avx-mpx.xml */
629+
630+#include "defs.h"
631+#include "osabi.h"
632+#include "target-descriptions.h"
633+
634+struct target_desc *tdesc_amd64_avx_mpx;
635+static void
636+initialize_tdesc_amd64_avx_mpx (void)
637+{
638+ struct target_desc *result = allocate_target_description ();
639+ struct tdesc_feature *feature;
640+ struct tdesc_type *field_type;
641+ struct tdesc_type *type;
642+
643+ set_tdesc_architecture (result, bfd_scan_arch ("i386:x86-64"));
644+
645+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
646+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
647+ tdesc_add_flag (field_type, 0, "CF");
648+ tdesc_add_flag (field_type, 1, "");
649+ tdesc_add_flag (field_type, 2, "PF");
650+ tdesc_add_flag (field_type, 4, "AF");
651+ tdesc_add_flag (field_type, 6, "ZF");
652+ tdesc_add_flag (field_type, 7, "SF");
653+ tdesc_add_flag (field_type, 8, "TF");
654+ tdesc_add_flag (field_type, 9, "IF");
655+ tdesc_add_flag (field_type, 10, "DF");
656+ tdesc_add_flag (field_type, 11, "OF");
657+ tdesc_add_flag (field_type, 14, "NT");
658+ tdesc_add_flag (field_type, 16, "RF");
659+ tdesc_add_flag (field_type, 17, "VM");
660+ tdesc_add_flag (field_type, 18, "AC");
661+ tdesc_add_flag (field_type, 19, "VIF");
662+ tdesc_add_flag (field_type, 20, "VIP");
663+ tdesc_add_flag (field_type, 21, "ID");
664+
665+ tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
666+ tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
667+ tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
668+ tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
669+ tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
670+ tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
671+ tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "data_ptr");
672+ tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "data_ptr");
673+ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
674+ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
675+ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
676+ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
677+ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
678+ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
679+ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
680+ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
681+ tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "code_ptr");
682+ tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
683+ tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
684+ tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
685+ tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
686+ tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
687+ tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
688+ tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
689+ tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
690+ tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
691+ tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
692+ tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
693+ tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
694+ tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
695+ tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
696+ tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
697+ tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
698+ tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
699+ tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
700+ tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
701+ tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
702+ tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
703+ tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
704+ tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
705+
706+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
707+ field_type = tdesc_named_type (feature, "ieee_single");
708+ tdesc_create_vector (feature, "v4f", field_type, 4);
709+
710+ field_type = tdesc_named_type (feature, "ieee_double");
711+ tdesc_create_vector (feature, "v2d", field_type, 2);
712+
713+ field_type = tdesc_named_type (feature, "int8");
714+ tdesc_create_vector (feature, "v16i8", field_type, 16);
715+
716+ field_type = tdesc_named_type (feature, "int16");
717+ tdesc_create_vector (feature, "v8i16", field_type, 8);
718+
719+ field_type = tdesc_named_type (feature, "int32");
720+ tdesc_create_vector (feature, "v4i32", field_type, 4);
721+
722+ field_type = tdesc_named_type (feature, "int64");
723+ tdesc_create_vector (feature, "v2i64", field_type, 2);
724+
725+ type = tdesc_create_union (feature, "vec128");
726+ field_type = tdesc_named_type (feature, "v4f");
727+ tdesc_add_field (type, "v4_float", field_type);
728+ field_type = tdesc_named_type (feature, "v2d");
729+ tdesc_add_field (type, "v2_double", field_type);
730+ field_type = tdesc_named_type (feature, "v16i8");
731+ tdesc_add_field (type, "v16_int8", field_type);
732+ field_type = tdesc_named_type (feature, "v8i16");
733+ tdesc_add_field (type, "v8_int16", field_type);
734+ field_type = tdesc_named_type (feature, "v4i32");
735+ tdesc_add_field (type, "v4_int32", field_type);
736+ field_type = tdesc_named_type (feature, "v2i64");
737+ tdesc_add_field (type, "v2_int64", field_type);
738+ field_type = tdesc_named_type (feature, "uint128");
739+ tdesc_add_field (type, "uint128", field_type);
740+
741+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
742+ tdesc_add_flag (field_type, 0, "IE");
743+ tdesc_add_flag (field_type, 1, "DE");
744+ tdesc_add_flag (field_type, 2, "ZE");
745+ tdesc_add_flag (field_type, 3, "OE");
746+ tdesc_add_flag (field_type, 4, "UE");
747+ tdesc_add_flag (field_type, 5, "PE");
748+ tdesc_add_flag (field_type, 6, "DAZ");
749+ tdesc_add_flag (field_type, 7, "IM");
750+ tdesc_add_flag (field_type, 8, "DM");
751+ tdesc_add_flag (field_type, 9, "ZM");
752+ tdesc_add_flag (field_type, 10, "OM");
753+ tdesc_add_flag (field_type, 11, "UM");
754+ tdesc_add_flag (field_type, 12, "PM");
755+ tdesc_add_flag (field_type, 15, "FZ");
756+
757+ tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
758+ tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
759+ tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
760+ tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
761+ tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
762+ tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
763+ tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
764+ tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
765+ tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
766+ tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
767+ tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
768+ tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
769+ tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
770+ tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
771+ tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
772+ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
773+ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
774+
775+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
776+ tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
777+ tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
778+ tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
779+ tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
780+ tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
781+ tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
782+ tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
783+ tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
784+ tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
785+ tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
786+ tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
787+ tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
788+ tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
789+ tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
790+ tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
791+ tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
792+
793+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
794+ type = tdesc_create_struct (feature, "br128");
795+ field_type = tdesc_named_type (feature, "uint64");
796+ tdesc_add_field (type, "lbound", field_type);
797+ field_type = tdesc_named_type (feature, "uint64");
798+ tdesc_add_field (type, "ubound_raw", field_type);
799+
800+ type = tdesc_create_struct (feature, "_bndstatus");
801+ tdesc_set_struct_size (type, 8);
802+ tdesc_add_bitfield (type, "bde", 2, 63);
803+ tdesc_add_bitfield (type, "error", 0, 1);
804+
805+ type = tdesc_create_union (feature, "status");
806+ field_type = tdesc_named_type (feature, "data_ptr");
807+ tdesc_add_field (type, "raw", field_type);
808+ field_type = tdesc_named_type (feature, "_bndstatus");
809+ tdesc_add_field (type, "status", field_type);
810+
811+ type = tdesc_create_struct (feature, "_bndcfgu");
812+ tdesc_set_struct_size (type, 8);
813+ tdesc_add_bitfield (type, "base", 12, 63);
814+ tdesc_add_bitfield (type, "reserved", 2, 11);
815+ tdesc_add_bitfield (type, "preserved", 1, 1);
816+ tdesc_add_bitfield (type, "enabled", 0, 0);
817+
818+ type = tdesc_create_union (feature, "cfgu");
819+ field_type = tdesc_named_type (feature, "data_ptr");
820+ tdesc_add_field (type, "raw", field_type);
821+ field_type = tdesc_named_type (feature, "_bndcfgu");
822+ tdesc_add_field (type, "config", field_type);
823+
824+ tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
825+ tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
826+ tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
827+ tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
828+ tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
829+ tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
830+
831+ tdesc_amd64_avx_mpx = result;
832+}
833Index: gdb-7.10.1/gdb/features/i386/amd64-avx-mpx.xml
834===================================================================
835--- /dev/null
836+++ gdb-7.10.1/gdb/features/i386/amd64-avx-mpx.xml
837@@ -0,0 +1,17 @@
838+<?xml version="1.0"?>
839+<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
840+
841+ Copying and distribution of this file, with or without modification,
842+ are permitted in any medium without royalty provided the copyright
843+ notice and this notice are preserved. -->
844+
845+<!-- AMD64 with AVX and MPX -->
846+
847+<!DOCTYPE target SYSTEM "gdb-target.dtd">
848+<target>
849+ <architecture>i386:x86-64</architecture>
850+ <xi:include href="64bit-core.xml"/>
851+ <xi:include href="64bit-sse.xml"/>
852+ <xi:include href="64bit-avx.xml"/>
853+ <xi:include href="64bit-mpx.xml"/>
854+</target>
855Index: gdb-7.10.1/gdb/features/i386/amd64-mpx-linux.c
856===================================================================
857--- gdb-7.10.1.orig/gdb/features/i386/amd64-mpx-linux.c
858+++ gdb-7.10.1/gdb/features/i386/amd64-mpx-linux.c
859@@ -151,24 +151,6 @@ initialize_tdesc_amd64_mpx_linux (void)
860 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
861 tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
862
863- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
864- tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
865- tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
866- tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
867- tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
868- tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
869- tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
870- tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
871- tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
872- tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
873- tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
874- tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
875- tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
876- tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
877- tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
878- tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
879- tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
880-
881 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
882 type = tdesc_create_struct (feature, "br128");
883 field_type = tdesc_named_type (feature, "uint64");
884@@ -200,12 +182,12 @@ initialize_tdesc_amd64_mpx_linux (void)
885 field_type = tdesc_named_type (feature, "_bndcfgu");
886 tdesc_add_field (type, "config", field_type);
887
888- tdesc_create_reg (feature, "bnd0raw", 74, 1, NULL, 128, "br128");
889- tdesc_create_reg (feature, "bnd1raw", 75, 1, NULL, 128, "br128");
890- tdesc_create_reg (feature, "bnd2raw", 76, 1, NULL, 128, "br128");
891- tdesc_create_reg (feature, "bnd3raw", 77, 1, NULL, 128, "br128");
892- tdesc_create_reg (feature, "bndcfgu", 78, 1, NULL, 64, "cfgu");
893- tdesc_create_reg (feature, "bndstatus", 79, 1, NULL, 64, "status");
894+ tdesc_create_reg (feature, "bnd0raw", 58, 1, NULL, 128, "br128");
895+ tdesc_create_reg (feature, "bnd1raw", 59, 1, NULL, 128, "br128");
896+ tdesc_create_reg (feature, "bnd2raw", 60, 1, NULL, 128, "br128");
897+ tdesc_create_reg (feature, "bnd3raw", 61, 1, NULL, 128, "br128");
898+ tdesc_create_reg (feature, "bndcfgu", 62, 1, NULL, 64, "cfgu");
899+ tdesc_create_reg (feature, "bndstatus", 63, 1, NULL, 64, "status");
900
901 tdesc_amd64_mpx_linux = result;
902 }
903Index: gdb-7.10.1/gdb/features/i386/amd64-mpx-linux.xml
904===================================================================
905--- gdb-7.10.1.orig/gdb/features/i386/amd64-mpx-linux.xml
906+++ gdb-7.10.1/gdb/features/i386/amd64-mpx-linux.xml
907@@ -14,6 +14,5 @@
908 <xi:include href="64bit-core.xml"/>
909 <xi:include href="64bit-sse.xml"/>
910 <xi:include href="64bit-linux.xml"/>
911- <xi:include href="64bit-avx.xml"/>
912 <xi:include href="64bit-mpx.xml"/>
913 </target>
914Index: gdb-7.10.1/gdb/features/i386/amd64-mpx.c
915===================================================================
916--- gdb-7.10.1.orig/gdb/features/i386/amd64-mpx.c
917+++ gdb-7.10.1/gdb/features/i386/amd64-mpx.c
918@@ -146,24 +146,6 @@ initialize_tdesc_amd64_mpx (void)
919 tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
920 tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
921
922- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
923- tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
924- tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
925- tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
926- tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
927- tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
928- tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
929- tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
930- tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
931- tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
932- tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
933- tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
934- tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
935- tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
936- tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
937- tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
938- tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
939-
940 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
941 type = tdesc_create_struct (feature, "br128");
942 field_type = tdesc_named_type (feature, "uint64");
943@@ -195,12 +177,12 @@ initialize_tdesc_amd64_mpx (void)
944 field_type = tdesc_named_type (feature, "_bndcfgu");
945 tdesc_add_field (type, "config", field_type);
946
947- tdesc_create_reg (feature, "bnd0raw", 73, 1, NULL, 128, "br128");
948- tdesc_create_reg (feature, "bnd1raw", 74, 1, NULL, 128, "br128");
949- tdesc_create_reg (feature, "bnd2raw", 75, 1, NULL, 128, "br128");
950- tdesc_create_reg (feature, "bnd3raw", 76, 1, NULL, 128, "br128");
951- tdesc_create_reg (feature, "bndcfgu", 77, 1, NULL, 64, "cfgu");
952- tdesc_create_reg (feature, "bndstatus", 78, 1, NULL, 64, "status");
953+ tdesc_create_reg (feature, "bnd0raw", 57, 1, NULL, 128, "br128");
954+ tdesc_create_reg (feature, "bnd1raw", 58, 1, NULL, 128, "br128");
955+ tdesc_create_reg (feature, "bnd2raw", 59, 1, NULL, 128, "br128");
956+ tdesc_create_reg (feature, "bnd3raw", 60, 1, NULL, 128, "br128");
957+ tdesc_create_reg (feature, "bndcfgu", 61, 1, NULL, 64, "cfgu");
958+ tdesc_create_reg (feature, "bndstatus", 62, 1, NULL, 64, "status");
959
960 tdesc_amd64_mpx = result;
961 }
962Index: gdb-7.10.1/gdb/features/i386/amd64-mpx.xml
963===================================================================
964--- gdb-7.10.1.orig/gdb/features/i386/amd64-mpx.xml
965+++ gdb-7.10.1/gdb/features/i386/amd64-mpx.xml
966@@ -12,6 +12,5 @@
967 <architecture>i386:x86-64</architecture>
968 <xi:include href="64bit-core.xml"/>
969 <xi:include href="64bit-sse.xml"/>
970- <xi:include href="64bit-avx.xml"/>
971 <xi:include href="64bit-mpx.xml"/>
972 </target>
973Index: gdb-7.10.1/gdb/features/i386/i386-avx-mpx-linux.c
974===================================================================
975--- /dev/null
976+++ gdb-7.10.1/gdb/features/i386/i386-avx-mpx-linux.c
977@@ -0,0 +1,187 @@
978+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
979+ Original: i386-avx-mpx-linux.xml */
980+
981+#include "defs.h"
982+#include "osabi.h"
983+#include "target-descriptions.h"
984+
985+struct target_desc *tdesc_i386_avx_mpx_linux;
986+static void
987+initialize_tdesc_i386_avx_mpx_linux (void)
988+{
989+ struct target_desc *result = allocate_target_description ();
990+ struct tdesc_feature *feature;
991+ struct tdesc_type *field_type;
992+ struct tdesc_type *type;
993+
994+ set_tdesc_architecture (result, bfd_scan_arch ("i386"));
995+
996+ set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
997+
998+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
999+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
1000+ tdesc_add_flag (field_type, 0, "CF");
1001+ tdesc_add_flag (field_type, 1, "");
1002+ tdesc_add_flag (field_type, 2, "PF");
1003+ tdesc_add_flag (field_type, 4, "AF");
1004+ tdesc_add_flag (field_type, 6, "ZF");
1005+ tdesc_add_flag (field_type, 7, "SF");
1006+ tdesc_add_flag (field_type, 8, "TF");
1007+ tdesc_add_flag (field_type, 9, "IF");
1008+ tdesc_add_flag (field_type, 10, "DF");
1009+ tdesc_add_flag (field_type, 11, "OF");
1010+ tdesc_add_flag (field_type, 14, "NT");
1011+ tdesc_add_flag (field_type, 16, "RF");
1012+ tdesc_add_flag (field_type, 17, "VM");
1013+ tdesc_add_flag (field_type, 18, "AC");
1014+ tdesc_add_flag (field_type, 19, "VIF");
1015+ tdesc_add_flag (field_type, 20, "VIP");
1016+ tdesc_add_flag (field_type, 21, "ID");
1017+
1018+ tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
1019+ tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
1020+ tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
1021+ tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
1022+ tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
1023+ tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
1024+ tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
1025+ tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
1026+ tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
1027+ tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
1028+ tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
1029+ tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
1030+ tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
1031+ tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
1032+ tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
1033+ tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
1034+ tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
1035+ tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
1036+ tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
1037+ tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
1038+ tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
1039+ tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
1040+ tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
1041+ tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
1042+ tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
1043+ tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
1044+ tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
1045+ tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
1046+ tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
1047+ tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
1048+ tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
1049+ tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
1050+
1051+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
1052+ field_type = tdesc_named_type (feature, "ieee_single");
1053+ tdesc_create_vector (feature, "v4f", field_type, 4);
1054+
1055+ field_type = tdesc_named_type (feature, "ieee_double");
1056+ tdesc_create_vector (feature, "v2d", field_type, 2);
1057+
1058+ field_type = tdesc_named_type (feature, "int8");
1059+ tdesc_create_vector (feature, "v16i8", field_type, 16);
1060+
1061+ field_type = tdesc_named_type (feature, "int16");
1062+ tdesc_create_vector (feature, "v8i16", field_type, 8);
1063+
1064+ field_type = tdesc_named_type (feature, "int32");
1065+ tdesc_create_vector (feature, "v4i32", field_type, 4);
1066+
1067+ field_type = tdesc_named_type (feature, "int64");
1068+ tdesc_create_vector (feature, "v2i64", field_type, 2);
1069+
1070+ type = tdesc_create_union (feature, "vec128");
1071+ field_type = tdesc_named_type (feature, "v4f");
1072+ tdesc_add_field (type, "v4_float", field_type);
1073+ field_type = tdesc_named_type (feature, "v2d");
1074+ tdesc_add_field (type, "v2_double", field_type);
1075+ field_type = tdesc_named_type (feature, "v16i8");
1076+ tdesc_add_field (type, "v16_int8", field_type);
1077+ field_type = tdesc_named_type (feature, "v8i16");
1078+ tdesc_add_field (type, "v8_int16", field_type);
1079+ field_type = tdesc_named_type (feature, "v4i32");
1080+ tdesc_add_field (type, "v4_int32", field_type);
1081+ field_type = tdesc_named_type (feature, "v2i64");
1082+ tdesc_add_field (type, "v2_int64", field_type);
1083+ field_type = tdesc_named_type (feature, "uint128");
1084+ tdesc_add_field (type, "uint128", field_type);
1085+
1086+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
1087+ tdesc_add_flag (field_type, 0, "IE");
1088+ tdesc_add_flag (field_type, 1, "DE");
1089+ tdesc_add_flag (field_type, 2, "ZE");
1090+ tdesc_add_flag (field_type, 3, "OE");
1091+ tdesc_add_flag (field_type, 4, "UE");
1092+ tdesc_add_flag (field_type, 5, "PE");
1093+ tdesc_add_flag (field_type, 6, "DAZ");
1094+ tdesc_add_flag (field_type, 7, "IM");
1095+ tdesc_add_flag (field_type, 8, "DM");
1096+ tdesc_add_flag (field_type, 9, "ZM");
1097+ tdesc_add_flag (field_type, 10, "OM");
1098+ tdesc_add_flag (field_type, 11, "UM");
1099+ tdesc_add_flag (field_type, 12, "PM");
1100+ tdesc_add_flag (field_type, 15, "FZ");
1101+
1102+ tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
1103+ tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
1104+ tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
1105+ tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
1106+ tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
1107+ tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
1108+ tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
1109+ tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
1110+ tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
1111+
1112+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
1113+ tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
1114+
1115+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
1116+ tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
1117+ tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
1118+ tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
1119+ tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
1120+ tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
1121+ tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
1122+ tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
1123+ tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
1124+
1125+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
1126+ type = tdesc_create_struct (feature, "br128");
1127+ field_type = tdesc_named_type (feature, "uint64");
1128+ tdesc_add_field (type, "lbound", field_type);
1129+ field_type = tdesc_named_type (feature, "uint64");
1130+ tdesc_add_field (type, "ubound_raw", field_type);
1131+
1132+ type = tdesc_create_struct (feature, "_bndstatus");
1133+ tdesc_set_struct_size (type, 8);
1134+ tdesc_add_bitfield (type, "bde", 2, 31);
1135+ tdesc_add_bitfield (type, "error", 0, 1);
1136+
1137+ type = tdesc_create_union (feature, "status");
1138+ field_type = tdesc_named_type (feature, "data_ptr");
1139+ tdesc_add_field (type, "raw", field_type);
1140+ field_type = tdesc_named_type (feature, "_bndstatus");
1141+ tdesc_add_field (type, "status", field_type);
1142+
1143+ type = tdesc_create_struct (feature, "_bndcfgu");
1144+ tdesc_set_struct_size (type, 8);
1145+ tdesc_add_bitfield (type, "base", 12, 31);
1146+ tdesc_add_bitfield (type, "reserved", 2, 11);
1147+ tdesc_add_bitfield (type, "preserved", 1, 1);
1148+ tdesc_add_bitfield (type, "enabled", 0, 1);
1149+
1150+ type = tdesc_create_union (feature, "cfgu");
1151+ field_type = tdesc_named_type (feature, "data_ptr");
1152+ tdesc_add_field (type, "raw", field_type);
1153+ field_type = tdesc_named_type (feature, "_bndcfgu");
1154+ tdesc_add_field (type, "config", field_type);
1155+
1156+ tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128");
1157+ tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128");
1158+ tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128");
1159+ tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128");
1160+ tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu");
1161+ tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status");
1162+
1163+ tdesc_i386_avx_mpx_linux = result;
1164+}
1165Index: gdb-7.10.1/gdb/features/i386/i386-avx-mpx-linux.xml
1166===================================================================
1167--- /dev/null
1168+++ gdb-7.10.1/gdb/features/i386/i386-avx-mpx-linux.xml
1169@@ -0,0 +1,19 @@
1170+<?xml version="1.0"?>
1171+<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
1172+
1173+ Copying and distribution of this file, with or without modification,
1174+ are permitted in any medium without royalty provided the copyright
1175+ notice and this notice are preserved. -->
1176+
1177+<!-- I386 with AVX and MPX- Includes Linux-only special "register". -->
1178+
1179+<!DOCTYPE target SYSTEM "gdb-target.dtd">
1180+<target>
1181+ <architecture>i386</architecture>
1182+ <osabi>GNU/Linux</osabi>
1183+ <xi:include href="32bit-core.xml"/>
1184+ <xi:include href="32bit-sse.xml"/>
1185+ <xi:include href="32bit-linux.xml"/>
1186+ <xi:include href="32bit-avx.xml"/>
1187+ <xi:include href="32bit-mpx.xml"/>
1188+</target>
1189Index: gdb-7.10.1/gdb/features/i386/i386-avx-mpx.c
1190===================================================================
1191--- /dev/null
1192+++ gdb-7.10.1/gdb/features/i386/i386-avx-mpx.c
1193@@ -0,0 +1,182 @@
1194+/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
1195+ Original: i386-avx-mpx.xml */
1196+
1197+#include "defs.h"
1198+#include "osabi.h"
1199+#include "target-descriptions.h"
1200+
1201+struct target_desc *tdesc_i386_avx_mpx;
1202+static void
1203+initialize_tdesc_i386_avx_mpx (void)
1204+{
1205+ struct target_desc *result = allocate_target_description ();
1206+ struct tdesc_feature *feature;
1207+ struct tdesc_type *field_type;
1208+ struct tdesc_type *type;
1209+
1210+ set_tdesc_architecture (result, bfd_scan_arch ("i386"));
1211+
1212+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
1213+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
1214+ tdesc_add_flag (field_type, 0, "CF");
1215+ tdesc_add_flag (field_type, 1, "");
1216+ tdesc_add_flag (field_type, 2, "PF");
1217+ tdesc_add_flag (field_type, 4, "AF");
1218+ tdesc_add_flag (field_type, 6, "ZF");
1219+ tdesc_add_flag (field_type, 7, "SF");
1220+ tdesc_add_flag (field_type, 8, "TF");
1221+ tdesc_add_flag (field_type, 9, "IF");
1222+ tdesc_add_flag (field_type, 10, "DF");
1223+ tdesc_add_flag (field_type, 11, "OF");
1224+ tdesc_add_flag (field_type, 14, "NT");
1225+ tdesc_add_flag (field_type, 16, "RF");
1226+ tdesc_add_flag (field_type, 17, "VM");
1227+ tdesc_add_flag (field_type, 18, "AC");
1228+ tdesc_add_flag (field_type, 19, "VIF");
1229+ tdesc_add_flag (field_type, 20, "VIP");
1230+ tdesc_add_flag (field_type, 21, "ID");
1231+
1232+ tdesc_create_reg (feature, "eax", 0, 1, NULL, 32, "int32");
1233+ tdesc_create_reg (feature, "ecx", 1, 1, NULL, 32, "int32");
1234+ tdesc_create_reg (feature, "edx", 2, 1, NULL, 32, "int32");
1235+ tdesc_create_reg (feature, "ebx", 3, 1, NULL, 32, "int32");
1236+ tdesc_create_reg (feature, "esp", 4, 1, NULL, 32, "data_ptr");
1237+ tdesc_create_reg (feature, "ebp", 5, 1, NULL, 32, "data_ptr");
1238+ tdesc_create_reg (feature, "esi", 6, 1, NULL, 32, "int32");
1239+ tdesc_create_reg (feature, "edi", 7, 1, NULL, 32, "int32");
1240+ tdesc_create_reg (feature, "eip", 8, 1, NULL, 32, "code_ptr");
1241+ tdesc_create_reg (feature, "eflags", 9, 1, NULL, 32, "i386_eflags");
1242+ tdesc_create_reg (feature, "cs", 10, 1, NULL, 32, "int32");
1243+ tdesc_create_reg (feature, "ss", 11, 1, NULL, 32, "int32");
1244+ tdesc_create_reg (feature, "ds", 12, 1, NULL, 32, "int32");
1245+ tdesc_create_reg (feature, "es", 13, 1, NULL, 32, "int32");
1246+ tdesc_create_reg (feature, "fs", 14, 1, NULL, 32, "int32");
1247+ tdesc_create_reg (feature, "gs", 15, 1, NULL, 32, "int32");
1248+ tdesc_create_reg (feature, "st0", 16, 1, NULL, 80, "i387_ext");
1249+ tdesc_create_reg (feature, "st1", 17, 1, NULL, 80, "i387_ext");
1250+ tdesc_create_reg (feature, "st2", 18, 1, NULL, 80, "i387_ext");
1251+ tdesc_create_reg (feature, "st3", 19, 1, NULL, 80, "i387_ext");
1252+ tdesc_create_reg (feature, "st4", 20, 1, NULL, 80, "i387_ext");
1253+ tdesc_create_reg (feature, "st5", 21, 1, NULL, 80, "i387_ext");
1254+ tdesc_create_reg (feature, "st6", 22, 1, NULL, 80, "i387_ext");
1255+ tdesc_create_reg (feature, "st7", 23, 1, NULL, 80, "i387_ext");
1256+ tdesc_create_reg (feature, "fctrl", 24, 1, "float", 32, "int");
1257+ tdesc_create_reg (feature, "fstat", 25, 1, "float", 32, "int");
1258+ tdesc_create_reg (feature, "ftag", 26, 1, "float", 32, "int");
1259+ tdesc_create_reg (feature, "fiseg", 27, 1, "float", 32, "int");
1260+ tdesc_create_reg (feature, "fioff", 28, 1, "float", 32, "int");
1261+ tdesc_create_reg (feature, "foseg", 29, 1, "float", 32, "int");
1262+ tdesc_create_reg (feature, "fooff", 30, 1, "float", 32, "int");
1263+ tdesc_create_reg (feature, "fop", 31, 1, "float", 32, "int");
1264+
1265+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
1266+ field_type = tdesc_named_type (feature, "ieee_single");
1267+ tdesc_create_vector (feature, "v4f", field_type, 4);
1268+
1269+ field_type = tdesc_named_type (feature, "ieee_double");
1270+ tdesc_create_vector (feature, "v2d", field_type, 2);
1271+
1272+ field_type = tdesc_named_type (feature, "int8");
1273+ tdesc_create_vector (feature, "v16i8", field_type, 16);
1274+
1275+ field_type = tdesc_named_type (feature, "int16");
1276+ tdesc_create_vector (feature, "v8i16", field_type, 8);
1277+
1278+ field_type = tdesc_named_type (feature, "int32");
1279+ tdesc_create_vector (feature, "v4i32", field_type, 4);
1280+
1281+ field_type = tdesc_named_type (feature, "int64");
1282+ tdesc_create_vector (feature, "v2i64", field_type, 2);
1283+
1284+ type = tdesc_create_union (feature, "vec128");
1285+ field_type = tdesc_named_type (feature, "v4f");
1286+ tdesc_add_field (type, "v4_float", field_type);
1287+ field_type = tdesc_named_type (feature, "v2d");
1288+ tdesc_add_field (type, "v2_double", field_type);
1289+ field_type = tdesc_named_type (feature, "v16i8");
1290+ tdesc_add_field (type, "v16_int8", field_type);
1291+ field_type = tdesc_named_type (feature, "v8i16");
1292+ tdesc_add_field (type, "v8_int16", field_type);
1293+ field_type = tdesc_named_type (feature, "v4i32");
1294+ tdesc_add_field (type, "v4_int32", field_type);
1295+ field_type = tdesc_named_type (feature, "v2i64");
1296+ tdesc_add_field (type, "v2_int64", field_type);
1297+ field_type = tdesc_named_type (feature, "uint128");
1298+ tdesc_add_field (type, "uint128", field_type);
1299+
1300+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
1301+ tdesc_add_flag (field_type, 0, "IE");
1302+ tdesc_add_flag (field_type, 1, "DE");
1303+ tdesc_add_flag (field_type, 2, "ZE");
1304+ tdesc_add_flag (field_type, 3, "OE");
1305+ tdesc_add_flag (field_type, 4, "UE");
1306+ tdesc_add_flag (field_type, 5, "PE");
1307+ tdesc_add_flag (field_type, 6, "DAZ");
1308+ tdesc_add_flag (field_type, 7, "IM");
1309+ tdesc_add_flag (field_type, 8, "DM");
1310+ tdesc_add_flag (field_type, 9, "ZM");
1311+ tdesc_add_flag (field_type, 10, "OM");
1312+ tdesc_add_flag (field_type, 11, "UM");
1313+ tdesc_add_flag (field_type, 12, "PM");
1314+ tdesc_add_flag (field_type, 15, "FZ");
1315+
1316+ tdesc_create_reg (feature, "xmm0", 32, 1, NULL, 128, "vec128");
1317+ tdesc_create_reg (feature, "xmm1", 33, 1, NULL, 128, "vec128");
1318+ tdesc_create_reg (feature, "xmm2", 34, 1, NULL, 128, "vec128");
1319+ tdesc_create_reg (feature, "xmm3", 35, 1, NULL, 128, "vec128");
1320+ tdesc_create_reg (feature, "xmm4", 36, 1, NULL, 128, "vec128");
1321+ tdesc_create_reg (feature, "xmm5", 37, 1, NULL, 128, "vec128");
1322+ tdesc_create_reg (feature, "xmm6", 38, 1, NULL, 128, "vec128");
1323+ tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
1324+ tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
1325+
1326+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
1327+ tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
1328+ tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
1329+ tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
1330+ tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
1331+ tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
1332+ tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
1333+ tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
1334+ tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
1335+
1336+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
1337+ type = tdesc_create_struct (feature, "br128");
1338+ field_type = tdesc_named_type (feature, "uint64");
1339+ tdesc_add_field (type, "lbound", field_type);
1340+ field_type = tdesc_named_type (feature, "uint64");
1341+ tdesc_add_field (type, "ubound_raw", field_type);
1342+
1343+ type = tdesc_create_struct (feature, "_bndstatus");
1344+ tdesc_set_struct_size (type, 8);
1345+ tdesc_add_bitfield (type, "bde", 2, 31);
1346+ tdesc_add_bitfield (type, "error", 0, 1);
1347+
1348+ type = tdesc_create_union (feature, "status");
1349+ field_type = tdesc_named_type (feature, "data_ptr");
1350+ tdesc_add_field (type, "raw", field_type);
1351+ field_type = tdesc_named_type (feature, "_bndstatus");
1352+ tdesc_add_field (type, "status", field_type);
1353+
1354+ type = tdesc_create_struct (feature, "_bndcfgu");
1355+ tdesc_set_struct_size (type, 8);
1356+ tdesc_add_bitfield (type, "base", 12, 31);
1357+ tdesc_add_bitfield (type, "reserved", 2, 11);
1358+ tdesc_add_bitfield (type, "preserved", 1, 1);
1359+ tdesc_add_bitfield (type, "enabled", 0, 1);
1360+
1361+ type = tdesc_create_union (feature, "cfgu");
1362+ field_type = tdesc_named_type (feature, "data_ptr");
1363+ tdesc_add_field (type, "raw", field_type);
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+
1374+ tdesc_i386_avx_mpx = result;
1375+}
1376Index: gdb-7.10.1/gdb/features/i386/i386-avx-mpx.xml
1377===================================================================
1378--- /dev/null
1379+++ gdb-7.10.1/gdb/features/i386/i386-avx-mpx.xml
1380@@ -0,0 +1,17 @@
1381+<?xml version="1.0"?>
1382+<!-- Copyright (C) 2013-2016 Free Software Foundation, Inc.
1383+
1384+ Copying and distribution of this file, with or without modification,
1385+ are permitted in any medium without royalty provided the copyright
1386+ notice and this notice are preserved. -->
1387+
1388+<!-- I386 with AVX and MPX -->
1389+
1390+<!DOCTYPE target SYSTEM "gdb-target.dtd">
1391+<target>
1392+ <architecture>i386</architecture>
1393+ <xi:include href="32bit-core.xml"/>
1394+ <xi:include href="32bit-sse.xml"/>
1395+ <xi:include href="32bit-avx.xml"/>
1396+ <xi:include href="32bit-mpx.xml"/>
1397+</target>
1398Index: gdb-7.10.1/gdb/features/i386/i386-mpx-linux.c
1399===================================================================
1400--- gdb-7.10.1.orig/gdb/features/i386/i386-mpx-linux.c
1401+++ gdb-7.10.1/gdb/features/i386/i386-mpx-linux.c
1402@@ -135,16 +135,6 @@ initialize_tdesc_i386_mpx_linux (void)
1403 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
1404 tdesc_create_reg (feature, "orig_eax", 41, 1, NULL, 32, "int");
1405
1406- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
1407- tdesc_create_reg (feature, "ymm0h", 42, 1, NULL, 128, "uint128");
1408- tdesc_create_reg (feature, "ymm1h", 43, 1, NULL, 128, "uint128");
1409- tdesc_create_reg (feature, "ymm2h", 44, 1, NULL, 128, "uint128");
1410- tdesc_create_reg (feature, "ymm3h", 45, 1, NULL, 128, "uint128");
1411- tdesc_create_reg (feature, "ymm4h", 46, 1, NULL, 128, "uint128");
1412- tdesc_create_reg (feature, "ymm5h", 47, 1, NULL, 128, "uint128");
1413- tdesc_create_reg (feature, "ymm6h", 48, 1, NULL, 128, "uint128");
1414- tdesc_create_reg (feature, "ymm7h", 49, 1, NULL, 128, "uint128");
1415-
1416 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
1417 type = tdesc_create_struct (feature, "br128");
1418 field_type = tdesc_named_type (feature, "uint64");
1419@@ -176,12 +166,12 @@ initialize_tdesc_i386_mpx_linux (void)
1420 field_type = tdesc_named_type (feature, "_bndcfgu");
1421 tdesc_add_field (type, "config", field_type);
1422
1423- tdesc_create_reg (feature, "bnd0raw", 50, 1, NULL, 128, "br128");
1424- tdesc_create_reg (feature, "bnd1raw", 51, 1, NULL, 128, "br128");
1425- tdesc_create_reg (feature, "bnd2raw", 52, 1, NULL, 128, "br128");
1426- tdesc_create_reg (feature, "bnd3raw", 53, 1, NULL, 128, "br128");
1427- tdesc_create_reg (feature, "bndcfgu", 54, 1, NULL, 64, "cfgu");
1428- tdesc_create_reg (feature, "bndstatus", 55, 1, NULL, 64, "status");
1429+ tdesc_create_reg (feature, "bnd0raw", 42, 1, NULL, 128, "br128");
1430+ tdesc_create_reg (feature, "bnd1raw", 43, 1, NULL, 128, "br128");
1431+ tdesc_create_reg (feature, "bnd2raw", 44, 1, NULL, 128, "br128");
1432+ tdesc_create_reg (feature, "bnd3raw", 45, 1, NULL, 128, "br128");
1433+ tdesc_create_reg (feature, "bndcfgu", 46, 1, NULL, 64, "cfgu");
1434+ tdesc_create_reg (feature, "bndstatus", 47, 1, NULL, 64, "status");
1435
1436 tdesc_i386_mpx_linux = result;
1437 }
1438Index: gdb-7.10.1/gdb/features/i386/i386-mpx-linux.xml
1439===================================================================
1440--- gdb-7.10.1.orig/gdb/features/i386/i386-mpx-linux.xml
1441+++ gdb-7.10.1/gdb/features/i386/i386-mpx-linux.xml
1442@@ -14,6 +14,5 @@
1443 <xi:include href="32bit-core.xml"/>
1444 <xi:include href="32bit-sse.xml"/>
1445 <xi:include href="32bit-linux.xml"/>
1446- <xi:include href="32bit-avx.xml"/>
1447 <xi:include href="32bit-mpx.xml"/>
1448 </target>
1449Index: gdb-7.10.1/gdb/features/i386/i386-mpx.c
1450===================================================================
1451--- gdb-7.10.1.orig/gdb/features/i386/i386-mpx.c
1452+++ gdb-7.10.1/gdb/features/i386/i386-mpx.c
1453@@ -130,16 +130,6 @@ initialize_tdesc_i386_mpx (void)
1454 tdesc_create_reg (feature, "xmm7", 39, 1, NULL, 128, "vec128");
1455 tdesc_create_reg (feature, "mxcsr", 40, 1, "vector", 32, "i386_mxcsr");
1456
1457- feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
1458- tdesc_create_reg (feature, "ymm0h", 41, 1, NULL, 128, "uint128");
1459- tdesc_create_reg (feature, "ymm1h", 42, 1, NULL, 128, "uint128");
1460- tdesc_create_reg (feature, "ymm2h", 43, 1, NULL, 128, "uint128");
1461- tdesc_create_reg (feature, "ymm3h", 44, 1, NULL, 128, "uint128");
1462- tdesc_create_reg (feature, "ymm4h", 45, 1, NULL, 128, "uint128");
1463- tdesc_create_reg (feature, "ymm5h", 46, 1, NULL, 128, "uint128");
1464- tdesc_create_reg (feature, "ymm6h", 47, 1, NULL, 128, "uint128");
1465- tdesc_create_reg (feature, "ymm7h", 48, 1, NULL, 128, "uint128");
1466-
1467 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
1468 type = tdesc_create_struct (feature, "br128");
1469 field_type = tdesc_named_type (feature, "uint64");
1470@@ -171,12 +161,12 @@ initialize_tdesc_i386_mpx (void)
1471 field_type = tdesc_named_type (feature, "_bndcfgu");
1472 tdesc_add_field (type, "config", field_type);
1473
1474- tdesc_create_reg (feature, "bnd0raw", 49, 1, NULL, 128, "br128");
1475- tdesc_create_reg (feature, "bnd1raw", 50, 1, NULL, 128, "br128");
1476- tdesc_create_reg (feature, "bnd2raw", 51, 1, NULL, 128, "br128");
1477- tdesc_create_reg (feature, "bnd3raw", 52, 1, NULL, 128, "br128");
1478- tdesc_create_reg (feature, "bndcfgu", 53, 1, NULL, 64, "cfgu");
1479- tdesc_create_reg (feature, "bndstatus", 54, 1, NULL, 64, "status");
1480+ tdesc_create_reg (feature, "bnd0raw", 41, 1, NULL, 128, "br128");
1481+ tdesc_create_reg (feature, "bnd1raw", 42, 1, NULL, 128, "br128");
1482+ tdesc_create_reg (feature, "bnd2raw", 43, 1, NULL, 128, "br128");
1483+ tdesc_create_reg (feature, "bnd3raw", 44, 1, NULL, 128, "br128");
1484+ tdesc_create_reg (feature, "bndcfgu", 45, 1, NULL, 64, "cfgu");
1485+ tdesc_create_reg (feature, "bndstatus", 46, 1, NULL, 64, "status");
1486
1487 tdesc_i386_mpx = result;
1488 }
1489Index: gdb-7.10.1/gdb/features/i386/i386-mpx.xml
1490===================================================================
1491--- gdb-7.10.1.orig/gdb/features/i386/i386-mpx.xml
1492+++ gdb-7.10.1/gdb/features/i386/i386-mpx.xml
1493@@ -12,6 +12,5 @@
1494 <architecture>i386</architecture>
1495 <xi:include href="32bit-core.xml"/>
1496 <xi:include href="32bit-sse.xml"/>
1497- <xi:include href="32bit-avx.xml"/>
1498 <xi:include href="32bit-mpx.xml"/>
1499 </target>
1500Index: gdb-7.10.1/gdb/gdbserver/ChangeLog
1501===================================================================
1502--- gdb-7.10.1.orig/gdb/gdbserver/ChangeLog
1503+++ gdb-7.10.1/gdb/gdbserver/ChangeLog
1504@@ -1,3 +1,36 @@
1505+2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1506+
1507+ * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1508+ i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1509+ (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1510+ (amd64-avx-mpx-linux.c): New rules.
1511+ (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1512+ * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1513+ (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1514+ (srv_amd64_regobj): Add amd64-avx-mpx.o.
1515+ (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1516+ (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1517+ (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1518+ (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1519+ (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1520+ (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1521+ (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1522+ * linux-x86-low.c (x86_linux_read_description): Add case for
1523+ X86_XSTATE_AVX_MPX_MASK.
1524+ (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1525+ (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1526+ init_registers_i386_avx_mpx_linux.
1527+ * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1528+ (initialize_low_tracepoint): Call
1529+ init_registers_i386_avx_mpx_linux.
1530+ * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1531+ (initialize_low_tracepoint): Call
1532+ init_registers_amd64_avx_mpx_linux.
1533+ * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1534+ (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1535+ (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1536+ declarations.
1537+
1538 2015-09-15 Pedro Alves <palves@redhat.com>
1539
1540 PR remote/18965
1541Index: gdb-7.10.1/gdb/gdbserver/Makefile.in
1542===================================================================
1543--- gdb-7.10.1.orig/gdb/gdbserver/Makefile.in
1544+++ gdb-7.10.1/gdb/gdbserver/Makefile.in
1545@@ -371,9 +371,11 @@ clean:
1546 rm -f xml-builtin.c stamp-xml
1547 rm -f i386-avx.c i386-avx-linux.c
1548 rm -f i386-mpx.c i386-mpx-linux.c
1549+ rm -f i386-avx-mpx.c i386-avx-mpx-linux.c
1550 rm -f i386-avx512.c i386-avx512-linux.c
1551 rm -f amd64-avx.c amd64-avx-linux.c
1552 rm -f amd64-mpx.c amd64-mpx-linux.c
1553+ rm -f amd64-avx-mpx.c amd64-avx-mpx-linux.c
1554 rm -f amd64-avx512.c amd64-avx512-linux.c
1555 rm -f i386-mmx.c i386-mmx-linux.c
1556 rm -f x32.c x32-linux.c
1557@@ -653,6 +655,10 @@ i386-mpx.c : $(srcdir)/../regformats/i38
1558 $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mpx.dat i386-mpx.c
1559 i386-mpx-linux.c : $(srcdir)/../regformats/i386/i386-mpx-linux.dat $(regdat_sh)
1560 $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mpx-linux.dat i386-mpx-linux.c
1561+i386-avx-mpx.c : $(srcdir)/../regformats/i386/i386-avx-mpx.dat $(regdat_sh)
1562+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx.dat i386-avx-mpx.c
1563+i386-avx-mpx-linux.c : $(srcdir)/../regformats/i386/i386-avx-mpx-linux.dat $(regdat_sh)
1564+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-avx-mpx-linux.dat i386-avx-mpx-linux.c
1565 i386-mmx.c : $(srcdir)/../regformats/i386/i386-mmx.dat $(regdat_sh)
1566 $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/i386-mmx.dat i386-mmx.c
1567 i386-mmx-linux.c : $(srcdir)/../regformats/i386/i386-mmx-linux.dat $(regdat_sh)
1568@@ -767,6 +773,10 @@ amd64-mpx.c : $(srcdir)/../regformats/i3
1569 $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-mpx.dat amd64-mpx.c
1570 amd64-mpx-linux.c : $(srcdir)/../regformats/i386/amd64-mpx-linux.dat $(regdat_sh)
1571 $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-mpx-linux.dat amd64-mpx-linux.c
1572+amd64-avx-mpx.c : $(srcdir)/../regformats/i386/amd64-avx-mpx.dat $(regdat_sh)
1573+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx.dat amd64-avx-mpx.c
1574+amd64-avx-mpx-linux.c : $(srcdir)/../regformats/i386/amd64-avx-mpx-linux.dat $(regdat_sh)
1575+ $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/amd64-avx-mpx-linux.dat amd64-avx-mpx-linux.c
1576 x32.c : $(srcdir)/../regformats/i386/x32.dat $(regdat_sh)
1577 $(SHELL) $(regdat_sh) $(srcdir)/../regformats/i386/x32.dat x32.c
1578 x32-linux.c : $(srcdir)/../regformats/i386/x32-linux.dat $(regdat_sh)
1579Index: gdb-7.10.1/gdb/gdbserver/configure.srv
1580===================================================================
1581--- gdb-7.10.1.orig/gdb/gdbserver/configure.srv
1582+++ gdb-7.10.1/gdb/gdbserver/configure.srv
1583@@ -24,20 +24,21 @@
1584 # Default hostio_last_error implementation
1585 srv_hostio_err_objs="hostio-errno.o"
1586
1587-srv_i386_regobj="i386.o i386-avx.o i386-avx512.o i386-mpx.o i386-mmx.o"
1588-srv_i386_linux_regobj="i386-linux.o i386-avx-linux.o i386-avx512-linux.o i386-mpx-linux.o i386-mmx-linux.o"
1589-srv_amd64_regobj="amd64.o amd64-avx.o amd64-avx512.o amd64-mpx.o x32.o x32-avx.o x32-avx512.o"
1590-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"
1591+srv_i386_regobj="i386.o i386-avx.o i386-avx512.o i386-mpx.o i386-avx-mpx.o i386-mmx.o"
1592+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"
1593+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"
1594+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"
1595
1596 ipa_i386_linux_regobj=i386-linux-ipa.o
1597 ipa_amd64_linux_regobj=amd64-linux-ipa.o
1598
1599+
1600 srv_i386_32bit_xmlfiles="i386/32bit-core.xml i386/32bit-sse.xml i386/32bit-avx.xml i386/32bit-avx512.xml i386/32bit-mpx.xml"
1601 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"
1602-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"
1603-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"
1604-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"
1605-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"
1606+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"
1607+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-mpx-avx.xml $srv_i386_64bit_xmlfiles"
1608+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"
1609+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"
1610
1611
1612 # Linux object files. This is so we don't have to repeat
1613Index: gdb-7.10.1/gdb/gdbserver/linux-x86-low.c
1614===================================================================
1615--- gdb-7.10.1.orig/gdb/gdbserver/linux-x86-low.c
1616+++ gdb-7.10.1/gdb/gdbserver/linux-x86-low.c
1617@@ -58,6 +58,10 @@ extern const struct target_desc *tdesc_a
1618 void init_registers_amd64_mpx_linux (void);
1619 extern const struct target_desc *tdesc_amd64_mpx_linux;
1620
1621+/* Defined in auto-generated file amd64-avx-mpx-linux.c. */
1622+void init_registers_amd64_avx_mpx_linux (void);
1623+extern const struct target_desc *tdesc_amd64_avx_mpx_linux;
1624+
1625 /* Defined in auto-generated file x32-linux.c. */
1626 void init_registers_x32_linux (void);
1627 extern const struct target_desc *tdesc_x32_linux;
1628@@ -84,6 +88,10 @@ extern const struct target_desc *tdesc_i
1629 void init_registers_i386_avx_linux (void);
1630 extern const struct target_desc *tdesc_i386_avx_linux;
1631
1632+/* Defined in auto-generated file i386-avx-mpx-linux.c. */
1633+void init_registers_i386_avx_mpx_linux (void);
1634+extern const struct target_desc *tdesc_i386_avx_mpx_linux;
1635+
1636 /* Defined in auto-generated file i386-avx512-linux.c. */
1637 void init_registers_i386_avx512_linux (void);
1638 extern const struct target_desc *tdesc_i386_avx512_linux;
1639@@ -1248,6 +1256,9 @@ x86_linux_read_description (void)
1640 case X86_XSTATE_AVX512_MASK:
1641 return tdesc_amd64_avx512_linux;
1642
1643+ case X86_XSTATE_AVX_MPX_MASK:
1644+ return tdesc_amd64_avx_mpx_linux;
1645+
1646 case X86_XSTATE_MPX_MASK:
1647 return tdesc_amd64_mpx_linux;
1648
1649@@ -1295,6 +1306,9 @@ x86_linux_read_description (void)
1650 case (X86_XSTATE_MPX_MASK):
1651 return tdesc_i386_mpx_linux;
1652
1653+ case (X86_XSTATE_AVX_MPX_MASK):
1654+ return tdesc_i386_avx_mpx_linux;
1655+
1656 case (X86_XSTATE_AVX_MASK):
1657 return tdesc_i386_avx_linux;
1658
1659@@ -3302,6 +3316,7 @@ initialize_low_arch (void)
1660 init_registers_amd64_avx_linux ();
1661 init_registers_amd64_avx512_linux ();
1662 init_registers_amd64_mpx_linux ();
1663+ init_registers_amd64_avx_mpx_linux ();
1664
1665 init_registers_x32_linux ();
1666 init_registers_x32_avx_linux ();
1667@@ -3316,6 +3331,7 @@ initialize_low_arch (void)
1668 init_registers_i386_avx_linux ();
1669 init_registers_i386_avx512_linux ();
1670 init_registers_i386_mpx_linux ();
1671+ init_registers_i386_avx_mpx_linux ();
1672
1673 tdesc_i386_linux_no_xml = xmalloc (sizeof (struct target_desc));
1674 copy_target_description (tdesc_i386_linux_no_xml, tdesc_i386_linux);
1675Index: gdb-7.10.1/gdb/i386-linux-tdep.c
1676===================================================================
1677--- gdb-7.10.1.orig/gdb/i386-linux-tdep.c
1678+++ gdb-7.10.1/gdb/i386-linux-tdep.c
1679@@ -47,6 +47,7 @@
1680 #include "features/i386/i386-linux.c"
1681 #include "features/i386/i386-mmx-linux.c"
1682 #include "features/i386/i386-mpx-linux.c"
1683+#include "features/i386/i386-avx-mpx-linux.c"
1684 #include "features/i386/i386-avx-linux.c"
1685 #include "features/i386/i386-avx512-linux.c"
1686
1687@@ -630,6 +631,8 @@ i386_linux_core_read_description (struct
1688 return tdesc_i386_avx512_linux;
1689 case X86_XSTATE_MPX_MASK:
1690 return tdesc_i386_mpx_linux;
1691+ case X86_XSTATE_AVX_MPX_MASK:
1692+ return tdesc_i386_avx_mpx_linux;
1693 case X86_XSTATE_AVX_MASK:
1694 return tdesc_i386_avx_linux;
1695 case X86_XSTATE_SSE_MASK:
1696@@ -1010,5 +1013,6 @@ _initialize_i386_linux_tdep (void)
1697 initialize_tdesc_i386_mmx_linux ();
1698 initialize_tdesc_i386_avx_linux ();
1699 initialize_tdesc_i386_mpx_linux ();
1700+ initialize_tdesc_i386_avx_mpx_linux ();
1701 initialize_tdesc_i386_avx512_linux ();
1702 }
1703Index: gdb-7.10.1/gdb/i386-linux-tdep.h
1704===================================================================
1705--- gdb-7.10.1.orig/gdb/i386-linux-tdep.h
1706+++ gdb-7.10.1/gdb/i386-linux-tdep.h
1707@@ -42,6 +42,7 @@ extern struct target_desc *tdesc_i386_li
1708 extern struct target_desc *tdesc_i386_mmx_linux;
1709 extern struct target_desc *tdesc_i386_avx_linux;
1710 extern struct target_desc *tdesc_i386_mpx_linux;
1711+extern struct target_desc *tdesc_i386_avx_mpx_linux;
1712 extern struct target_desc *tdesc_i386_avx512_linux;
1713
1714 /* Format of XSAVE extended state is:
1715Index: gdb-7.10.1/gdb/i386-tdep.c
1716===================================================================
1717--- gdb-7.10.1.orig/gdb/i386-tdep.c
1718+++ gdb-7.10.1/gdb/i386-tdep.c
1719@@ -53,6 +53,7 @@
1720 #include "features/i386/i386.c"
1721 #include "features/i386/i386-avx.c"
1722 #include "features/i386/i386-mpx.c"
1723+#include "features/i386/i386-avx-mpx.c"
1724 #include "features/i386/i386-avx512.c"
1725 #include "features/i386/i386-mmx.c"
1726
1727@@ -8608,6 +8609,8 @@ i386_target_description (uint64_t xcr0)
1728 case X86_XSTATE_MPX_AVX512_MASK:
1729 case X86_XSTATE_AVX512_MASK:
1730 return tdesc_i386_avx512;
1731+ case X86_XSTATE_AVX_MPX_MASK:
1732+ return tdesc_i386_avx_mpx;
1733 case X86_XSTATE_MPX_MASK:
1734 return tdesc_i386_mpx;
1735 case X86_XSTATE_AVX_MASK:
1736@@ -8945,6 +8948,7 @@ Show Intel(R) Memory Protection Extensio
1737 initialize_tdesc_i386_mmx ();
1738 initialize_tdesc_i386_avx ();
1739 initialize_tdesc_i386_mpx ();
1740+ initialize_tdesc_i386_avx_mpx ();
1741 initialize_tdesc_i386_avx512 ();
1742
1743 /* Tell remote stub that we support XML target description. */
1744Index: gdb-7.10.1/gdb/regformats/i386/amd64-avx-mpx-linux.dat
1745===================================================================
1746--- /dev/null
1747+++ gdb-7.10.1/gdb/regformats/i386/amd64-avx-mpx-linux.dat
1748@@ -0,0 +1,85 @@
1749+# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
1750+# Generated from: i386/amd64-avx-mpx-linux.xml
1751+name:amd64_avx_mpx_linux
1752+xmltarget:amd64-avx-mpx-linux.xml
1753+expedite:rbp,rsp,rip
1754+64:rax
1755+64:rbx
1756+64:rcx
1757+64:rdx
1758+64:rsi
1759+64:rdi
1760+64:rbp
1761+64:rsp
1762+64:r8
1763+64:r9
1764+64:r10
1765+64:r11
1766+64:r12
1767+64:r13
1768+64:r14
1769+64:r15
1770+64:rip
1771+32:eflags
1772+32:cs
1773+32:ss
1774+32:ds
1775+32:es
1776+32:fs
1777+32:gs
1778+80:st0
1779+80:st1
1780+80:st2
1781+80:st3
1782+80:st4
1783+80:st5
1784+80:st6
1785+80:st7
1786+32:fctrl
1787+32:fstat
1788+32:ftag
1789+32:fiseg
1790+32:fioff
1791+32:foseg
1792+32:fooff
1793+32:fop
1794+128:xmm0
1795+128:xmm1
1796+128:xmm2
1797+128:xmm3
1798+128:xmm4
1799+128:xmm5
1800+128:xmm6
1801+128:xmm7
1802+128:xmm8
1803+128:xmm9
1804+128:xmm10
1805+128:xmm11
1806+128:xmm12
1807+128:xmm13
1808+128:xmm14
1809+128:xmm15
1810+32:mxcsr
1811+64:orig_rax
1812+128:ymm0h
1813+128:ymm1h
1814+128:ymm2h
1815+128:ymm3h
1816+128:ymm4h
1817+128:ymm5h
1818+128:ymm6h
1819+128:ymm7h
1820+128:ymm8h
1821+128:ymm9h
1822+128:ymm10h
1823+128:ymm11h
1824+128:ymm12h
1825+128:ymm13h
1826+128:ymm14h
1827+128:ymm15h
1828+128:bnd0raw
1829+128:bnd1raw
1830+128:bnd2raw
1831+128:bnd3raw
1832+64:bndcfgu
1833+64:bndstatus
1834Index: gdb-7.10.1/gdb/regformats/i386/amd64-avx-mpx.dat
1835===================================================================
1836--- /dev/null
1837+++ gdb-7.10.1/gdb/regformats/i386/amd64-avx-mpx.dat
1838@@ -0,0 +1,84 @@
1839+# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
1840+# Generated from: i386/amd64-avx-mpx.xml
1841+name:amd64_avx_mpx
1842+xmltarget:amd64-avx-mpx.xml
1843+expedite:rbp,rsp,rip
1844+64:rax
1845+64:rbx
1846+64:rcx
1847+64:rdx
1848+64:rsi
1849+64:rdi
1850+64:rbp
1851+64:rsp
1852+64:r8
1853+64:r9
1854+64:r10
1855+64:r11
1856+64:r12
1857+64:r13
1858+64:r14
1859+64:r15
1860+64:rip
1861+32:eflags
1862+32:cs
1863+32:ss
1864+32:ds
1865+32:es
1866+32:fs
1867+32:gs
1868+80:st0
1869+80:st1
1870+80:st2
1871+80:st3
1872+80:st4
1873+80:st5
1874+80:st6
1875+80:st7
1876+32:fctrl
1877+32:fstat
1878+32:ftag
1879+32:fiseg
1880+32:fioff
1881+32:foseg
1882+32:fooff
1883+32:fop
1884+128:xmm0
1885+128:xmm1
1886+128:xmm2
1887+128:xmm3
1888+128:xmm4
1889+128:xmm5
1890+128:xmm6
1891+128:xmm7
1892+128:xmm8
1893+128:xmm9
1894+128:xmm10
1895+128:xmm11
1896+128:xmm12
1897+128:xmm13
1898+128:xmm14
1899+128:xmm15
1900+32:mxcsr
1901+128:ymm0h
1902+128:ymm1h
1903+128:ymm2h
1904+128:ymm3h
1905+128:ymm4h
1906+128:ymm5h
1907+128:ymm6h
1908+128:ymm7h
1909+128:ymm8h
1910+128:ymm9h
1911+128:ymm10h
1912+128:ymm11h
1913+128:ymm12h
1914+128:ymm13h
1915+128:ymm14h
1916+128:ymm15h
1917+128:bnd0raw
1918+128:bnd1raw
1919+128:bnd2raw
1920+128:bnd3raw
1921+64:bndcfgu
1922+64:bndstatus
1923Index: gdb-7.10.1/gdb/regformats/i386/amd64-mpx-linux.dat
1924===================================================================
1925--- gdb-7.10.1.orig/gdb/regformats/i386/amd64-mpx-linux.dat
1926+++ gdb-7.10.1/gdb/regformats/i386/amd64-mpx-linux.dat
1927@@ -61,22 +61,6 @@ expedite:rbp,rsp,rip
1928 128:xmm15
1929 32:mxcsr
1930 64:orig_rax
1931-128:ymm0h
1932-128:ymm1h
1933-128:ymm2h
1934-128:ymm3h
1935-128:ymm4h
1936-128:ymm5h
1937-128:ymm6h
1938-128:ymm7h
1939-128:ymm8h
1940-128:ymm9h
1941-128:ymm10h
1942-128:ymm11h
1943-128:ymm12h
1944-128:ymm13h
1945-128:ymm14h
1946-128:ymm15h
1947 128:bnd0raw
1948 128:bnd1raw
1949 128:bnd2raw
1950Index: gdb-7.10.1/gdb/regformats/i386/amd64-mpx.dat
1951===================================================================
1952--- gdb-7.10.1.orig/gdb/regformats/i386/amd64-mpx.dat
1953+++ gdb-7.10.1/gdb/regformats/i386/amd64-mpx.dat
1954@@ -60,22 +60,6 @@ expedite:rbp,rsp,rip
1955 128:xmm14
1956 128:xmm15
1957 32:mxcsr
1958-128:ymm0h
1959-128:ymm1h
1960-128:ymm2h
1961-128:ymm3h
1962-128:ymm4h
1963-128:ymm5h
1964-128:ymm6h
1965-128:ymm7h
1966-128:ymm8h
1967-128:ymm9h
1968-128:ymm10h
1969-128:ymm11h
1970-128:ymm12h
1971-128:ymm13h
1972-128:ymm14h
1973-128:ymm15h
1974 128:bnd0raw
1975 128:bnd1raw
1976 128:bnd2raw
1977Index: gdb-7.10.1/gdb/regformats/i386/i386-avx-mpx-linux.dat
1978===================================================================
1979--- /dev/null
1980+++ gdb-7.10.1/gdb/regformats/i386/i386-avx-mpx-linux.dat
1981@@ -0,0 +1,61 @@
1982+# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
1983+# Generated from: i386/i386-avx-mpx-linux.xml
1984+name:i386_avx_mpx_linux
1985+xmltarget:i386-avx-mpx-linux.xml
1986+expedite:ebp,esp,eip
1987+32:eax
1988+32:ecx
1989+32:edx
1990+32:ebx
1991+32:esp
1992+32:ebp
1993+32:esi
1994+32:edi
1995+32:eip
1996+32:eflags
1997+32:cs
1998+32:ss
1999+32:ds
2000+32:es
2001+32:fs
2002+32:gs
2003+80:st0
2004+80:st1
2005+80:st2
2006+80:st3
2007+80:st4
2008+80:st5
2009+80:st6
2010+80:st7
2011+32:fctrl
2012+32:fstat
2013+32:ftag
2014+32:fiseg
2015+32:fioff
2016+32:foseg
2017+32:fooff
2018+32:fop
2019+128:xmm0
2020+128:xmm1
2021+128:xmm2
2022+128:xmm3
2023+128:xmm4
2024+128:xmm5
2025+128:xmm6
2026+128:xmm7
2027+32:mxcsr
2028+32:orig_eax
2029+128:ymm0h
2030+128:ymm1h
2031+128:ymm2h
2032+128:ymm3h
2033+128:ymm4h
2034+128:ymm5h
2035+128:ymm6h
2036+128:ymm7h
2037+128:bnd0raw
2038+128:bnd1raw
2039+128:bnd2raw
2040+128:bnd3raw
2041+64:bndcfgu
2042+64:bndstatus
2043Index: gdb-7.10.1/gdb/regformats/i386/i386-avx-mpx.dat
2044===================================================================
2045--- /dev/null
2046+++ gdb-7.10.1/gdb/regformats/i386/i386-avx-mpx.dat
2047@@ -0,0 +1,60 @@
2048+# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro:
2049+# Generated from: i386/i386-avx-mpx.xml
2050+name:i386_avx_mpx
2051+xmltarget:i386-avx-mpx.xml
2052+expedite:ebp,esp,eip
2053+32:eax
2054+32:ecx
2055+32:edx
2056+32:ebx
2057+32:esp
2058+32:ebp
2059+32:esi
2060+32:edi
2061+32:eip
2062+32:eflags
2063+32:cs
2064+32:ss
2065+32:ds
2066+32:es
2067+32:fs
2068+32:gs
2069+80:st0
2070+80:st1
2071+80:st2
2072+80:st3
2073+80:st4
2074+80:st5
2075+80:st6
2076+80:st7
2077+32:fctrl
2078+32:fstat
2079+32:ftag
2080+32:fiseg
2081+32:fioff
2082+32:foseg
2083+32:fooff
2084+32:fop
2085+128:xmm0
2086+128:xmm1
2087+128:xmm2
2088+128:xmm3
2089+128:xmm4
2090+128:xmm5
2091+128:xmm6
2092+128:xmm7
2093+32:mxcsr
2094+128:ymm0h
2095+128:ymm1h
2096+128:ymm2h
2097+128:ymm3h
2098+128:ymm4h
2099+128:ymm5h
2100+128:ymm6h
2101+128:ymm7h
2102+128:bnd0raw
2103+128:bnd1raw
2104+128:bnd2raw
2105+128:bnd3raw
2106+64:bndcfgu
2107+64:bndstatus
2108Index: gdb-7.10.1/gdb/regformats/i386/i386-mpx-linux.dat
2109===================================================================
2110--- gdb-7.10.1.orig/gdb/regformats/i386/i386-mpx-linux.dat
2111+++ gdb-7.10.1/gdb/regformats/i386/i386-mpx-linux.dat
2112@@ -45,14 +45,6 @@ expedite:ebp,esp,eip
2113 128:xmm7
2114 32:mxcsr
2115 32:orig_eax
2116-128:ymm0h
2117-128:ymm1h
2118-128:ymm2h
2119-128:ymm3h
2120-128:ymm4h
2121-128:ymm5h
2122-128:ymm6h
2123-128:ymm7h
2124 128:bnd0raw
2125 128:bnd1raw
2126 128:bnd2raw
2127Index: gdb-7.10.1/gdb/regformats/i386/i386-mpx.dat
2128===================================================================
2129--- gdb-7.10.1.orig/gdb/regformats/i386/i386-mpx.dat
2130+++ gdb-7.10.1/gdb/regformats/i386/i386-mpx.dat
2131@@ -44,14 +44,6 @@ expedite:ebp,esp,eip
2132 128:xmm6
2133 128:xmm7
2134 32:mxcsr
2135-128:ymm0h
2136-128:ymm1h
2137-128:ymm2h
2138-128:ymm3h
2139-128:ymm4h
2140-128:ymm5h
2141-128:ymm6h
2142-128:ymm7h
2143 128:bnd0raw
2144 128:bnd1raw
2145 128:bnd2raw
2146Index: gdb-7.10.1/gdb/x86-linux-nat.c
2147===================================================================
2148--- gdb-7.10.1.orig/gdb/x86-linux-nat.c
2149+++ gdb-7.10.1/gdb/x86-linux-nat.c
2150@@ -215,6 +215,11 @@ x86_linux_read_description (struct targe
2151 return tdesc_x32_avx_linux; /* No MPX on x32 using AVX. */
2152 else
2153 return tdesc_amd64_mpx_linux;
2154+ case X86_XSTATE_AVX_MPX_MASK:
2155+ if (is_x32)
2156+ return tdesc_x32_avx_linux; /* No MPX on x32 using AVX. */
2157+ else
2158+ return tdesc_amd64_avx_mpx_linux;
2159 case X86_XSTATE_AVX_MASK:
2160 if (is_x32)
2161 return tdesc_x32_avx_linux;
2162@@ -237,6 +242,8 @@ x86_linux_read_description (struct targe
2163 return tdesc_i386_avx512_linux;
2164 case X86_XSTATE_MPX_MASK:
2165 return tdesc_i386_mpx_linux;
2166+ case X86_XSTATE_AVX_MPX_MASK:
2167+ return tdesc_i386_avx_mpx_linux;
2168 case X86_XSTATE_AVX_MASK:
2169 return tdesc_i386_avx_linux;
2170 default: