aboutsummaryrefslogtreecommitdiff
path: root/gdb/features
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-04-10 15:44:24 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-04-10 15:44:24 +0000
commit9a82b8ff879eb1e69e4050c2d79f299443a2b613 (patch)
treeb0727578fb5843e5659d75bdb2f9934d73a1ff29 /gdb/features
parentee41036f97eacbeac8248b55b52812900a8e7fa9 (diff)
downloadgdb-9a82b8ff879eb1e69e4050c2d79f299443a2b613.zip
gdb-9a82b8ff879eb1e69e4050c2d79f299443a2b613.tar.gz
gdb-9a82b8ff879eb1e69e4050c2d79f299443a2b613.tar.bz2
Add x32 XML files
* features/Makefile (WHICH): Add i386/x32, i386/x32-linux, i386/x32-avx and i386/x32-avx-linux. (i386/x32-expedite): New. (i386/x32-linux-expedite): Likewise. (i386/x32-avx-expedite): Likewise. (i386/x32-avx-linux-expedite): Likewise. ($(outdir)/i386/x32.dat): Likewise. ($(outdir)/i386/x32-linux.dat): Likewise. ($(outdir)/i386/x32-avx.dat): Likewise. ($(outdir)/i386/x32-avx-linux.dat): Likewise. * features/i386/x32-avx-linux.xml: New file. * features/i386/x32-avx.xml: Likewise. * features/i386/x32-core.xml: Likewise. * features/i386/x32-linux.xml: Likewise. * features/i386/x32.xml: Likewise. * features/i386/x32-avx-linux.c: New. Generated. * features/i386/x32-avx.c: Likewise. * features/i386/x32-linux.c: Likewise. * features/i386/x32.c: Likewise. * regformats/i386/x32-avx-linux.dat: Likewise. * regformats/i386/x32-avx.dat: Likewise. * regformats/i386/x32-linux.dat: Likewise. * regformats/i386/x32.dat: Likewise.
Diffstat (limited to 'gdb/features')
-rw-r--r--gdb/features/Makefile12
-rw-r--r--gdb/features/i386/x32-avx-linux.c171
-rw-r--r--gdb/features/i386/x32-avx-linux.xml18
-rw-r--r--gdb/features/i386/x32-avx.c166
-rw-r--r--gdb/features/i386/x32-avx.xml16
-rw-r--r--gdb/features/i386/x32-core.xml73
-rw-r--r--gdb/features/i386/x32-linux.c153
-rw-r--r--gdb/features/i386/x32-linux.xml17
-rw-r--r--gdb/features/i386/x32.c148
-rw-r--r--gdb/features/i386/x32.xml15
10 files changed, 789 insertions, 0 deletions
diff --git a/gdb/features/Makefile b/gdb/features/Makefile
index eedc33e..873ed85 100644
--- a/gdb/features/Makefile
+++ b/gdb/features/Makefile
@@ -36,6 +36,8 @@ WHICH = arm-with-iwmmxt arm-with-vfpv2 arm-with-vfpv3 arm-with-neon \
i386/amd64 i386/amd64-linux \
i386/i386-avx i386/i386-avx-linux \
i386/amd64-avx i386/amd64-avx-linux \
+ i386/x32 i386/x32-linux \
+ i386/x32-avx i386/x32-avx-linux \
mips-linux mips-dsp-linux \
mips64-linux mips64-dsp-linux \
rs6000/powerpc-32 \
@@ -60,6 +62,10 @@ i386/i386-mmx-expedite = ebp,esp,eip
i386/i386-mmx-linux-expedite = ebp,esp,eip
i386/amd64-avx-expedite = rbp,rsp,rip
i386/amd64-avx-linux-expedite = rbp,rsp,rip
+i386/x32-expedite = rbp,rsp,rip
+i386/x32-linux-expedite = rbp,rsp,rip
+i386/x32-avx-expedite = rbp,rsp,rip
+i386/x32-avx-linux-expedite = rbp,rsp,rip
mips-expedite = r29,pc
mips-dsp-expedite = r29,pc
mips64-expedite = r29,pc
@@ -127,3 +133,9 @@ $(outdir)/i386/i386-mmx-linux.dat: i386/32bit-core.xml i386/32bit-linux.xml
$(outdir)/i386/amd64-avx.dat: i386/64bit-core.xml i386/64bit-avx.xml
$(outdir)/i386/amd64-avx-linux.dat: i386/64bit-core.xml i386/64bit-avx.xml \
i386/64bit-linux.xml
+$(outdir)/i386/x32.dat: i386/x32-core.xml i386/64bit-sse.xml
+$(outdir)/i386/x32-linux.dat: i386/x32-core.xml i386/64bit-sse.xml \
+ i386/64bit-linux.xml
+$(outdir)/i386/x32-avx.dat: i386/x32-core.xml i386/64bit-avx.xml
+$(outdir)/i386/x32-avx-linux.dat: i386/x32-core.xml i386/64bit-avx.xml \
+ i386/64bit-linux.xml
diff --git a/gdb/features/i386/x32-avx-linux.c b/gdb/features/i386/x32-avx-linux.c
new file mode 100644
index 0000000..d2e5ce9
--- /dev/null
+++ b/gdb/features/i386/x32-avx-linux.c
@@ -0,0 +1,171 @@
+/* THIS FILE IS GENERATED. Original: x32-avx-linux.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_x32_avx_linux;
+static void
+initialize_tdesc_x32_avx_linux (void)
+{
+ struct target_desc *result = allocate_target_description ();
+ struct tdesc_feature *feature;
+ struct tdesc_type *field_type, *type;
+
+ set_tdesc_architecture (result, bfd_scan_arch ("i386:x64-32"));
+
+ set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
+ tdesc_add_flag (field_type, 0, "CF");
+ tdesc_add_flag (field_type, 1, "");
+ tdesc_add_flag (field_type, 2, "PF");
+ tdesc_add_flag (field_type, 4, "AF");
+ tdesc_add_flag (field_type, 6, "ZF");
+ tdesc_add_flag (field_type, 7, "SF");
+ tdesc_add_flag (field_type, 8, "TF");
+ tdesc_add_flag (field_type, 9, "IF");
+ tdesc_add_flag (field_type, 10, "DF");
+ tdesc_add_flag (field_type, 11, "OF");
+ tdesc_add_flag (field_type, 14, "NT");
+ tdesc_add_flag (field_type, 16, "RF");
+ tdesc_add_flag (field_type, 17, "VM");
+ tdesc_add_flag (field_type, 18, "AC");
+ tdesc_add_flag (field_type, 19, "VIF");
+ tdesc_add_flag (field_type, 20, "VIP");
+ tdesc_add_flag (field_type, 21, "ID");
+
+ tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "uint64");
+ tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
+ tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+ field_type = tdesc_named_type (feature, "ieee_single");
+ tdesc_create_vector (feature, "v4f", field_type, 4);
+
+ field_type = tdesc_named_type (feature, "ieee_double");
+ tdesc_create_vector (feature, "v2d", field_type, 2);
+
+ field_type = tdesc_named_type (feature, "int8");
+ tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+ field_type = tdesc_named_type (feature, "int16");
+ tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+ field_type = tdesc_named_type (feature, "int32");
+ tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+ field_type = tdesc_named_type (feature, "int64");
+ tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+ type = tdesc_create_union (feature, "vec128");
+ field_type = tdesc_named_type (feature, "v4f");
+ tdesc_add_field (type, "v4_float", field_type);
+ field_type = tdesc_named_type (feature, "v2d");
+ tdesc_add_field (type, "v2_double", field_type);
+ field_type = tdesc_named_type (feature, "v16i8");
+ tdesc_add_field (type, "v16_int8", field_type);
+ field_type = tdesc_named_type (feature, "v8i16");
+ tdesc_add_field (type, "v8_int16", field_type);
+ field_type = tdesc_named_type (feature, "v4i32");
+ tdesc_add_field (type, "v4_int32", field_type);
+ field_type = tdesc_named_type (feature, "v2i64");
+ tdesc_add_field (type, "v2_int64", field_type);
+ field_type = tdesc_named_type (feature, "uint128");
+ tdesc_add_field (type, "uint128", field_type);
+
+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+ tdesc_add_flag (field_type, 0, "IE");
+ tdesc_add_flag (field_type, 1, "DE");
+ tdesc_add_flag (field_type, 2, "ZE");
+ tdesc_add_flag (field_type, 3, "OE");
+ tdesc_add_flag (field_type, 4, "UE");
+ tdesc_add_flag (field_type, 5, "PE");
+ tdesc_add_flag (field_type, 6, "DAZ");
+ tdesc_add_flag (field_type, 7, "IM");
+ tdesc_add_flag (field_type, 8, "DM");
+ tdesc_add_flag (field_type, 9, "ZM");
+ tdesc_add_flag (field_type, 10, "OM");
+ tdesc_add_flag (field_type, 11, "UM");
+ tdesc_add_flag (field_type, 12, "PM");
+ tdesc_add_flag (field_type, 15, "FZ");
+
+ tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
+ tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+ tdesc_create_reg (feature, "ymm0h", 58, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm1h", 59, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm2h", 60, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm3h", 61, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm4h", 62, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm5h", 63, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm6h", 64, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm7h", 65, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm8h", 66, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm9h", 67, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm10h", 68, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm11h", 69, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm12h", 70, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm13h", 71, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm14h", 72, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm15h", 73, 1, NULL, 128, "uint128");
+
+ tdesc_x32_avx_linux = result;
+}
diff --git a/gdb/features/i386/x32-avx-linux.xml b/gdb/features/i386/x32-avx-linux.xml
new file mode 100644
index 0000000..9ce4b2a
--- /dev/null
+++ b/gdb/features/i386/x32-avx-linux.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2012 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!-- X32 with AVX - Includes Linux-only special "register". -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+ <architecture>i386:x64-32</architecture>
+ <osabi>GNU/Linux</osabi>
+ <xi:include href="x32-core.xml"/>
+ <xi:include href="64bit-sse.xml"/>
+ <xi:include href="64bit-linux.xml"/>
+ <xi:include href="64bit-avx.xml"/>
+</target>
diff --git a/gdb/features/i386/x32-avx.c b/gdb/features/i386/x32-avx.c
new file mode 100644
index 0000000..47d7305
--- /dev/null
+++ b/gdb/features/i386/x32-avx.c
@@ -0,0 +1,166 @@
+/* THIS FILE IS GENERATED. Original: x32-avx.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_x32_avx;
+static void
+initialize_tdesc_x32_avx (void)
+{
+ struct target_desc *result = allocate_target_description ();
+ struct tdesc_feature *feature;
+ struct tdesc_type *field_type, *type;
+
+ set_tdesc_architecture (result, bfd_scan_arch ("i386:x64-32"));
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
+ tdesc_add_flag (field_type, 0, "CF");
+ tdesc_add_flag (field_type, 1, "");
+ tdesc_add_flag (field_type, 2, "PF");
+ tdesc_add_flag (field_type, 4, "AF");
+ tdesc_add_flag (field_type, 6, "ZF");
+ tdesc_add_flag (field_type, 7, "SF");
+ tdesc_add_flag (field_type, 8, "TF");
+ tdesc_add_flag (field_type, 9, "IF");
+ tdesc_add_flag (field_type, 10, "DF");
+ tdesc_add_flag (field_type, 11, "OF");
+ tdesc_add_flag (field_type, 14, "NT");
+ tdesc_add_flag (field_type, 16, "RF");
+ tdesc_add_flag (field_type, 17, "VM");
+ tdesc_add_flag (field_type, 18, "AC");
+ tdesc_add_flag (field_type, 19, "VIF");
+ tdesc_add_flag (field_type, 20, "VIP");
+ tdesc_add_flag (field_type, 21, "ID");
+
+ tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "uint64");
+ tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
+ tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+ field_type = tdesc_named_type (feature, "ieee_single");
+ tdesc_create_vector (feature, "v4f", field_type, 4);
+
+ field_type = tdesc_named_type (feature, "ieee_double");
+ tdesc_create_vector (feature, "v2d", field_type, 2);
+
+ field_type = tdesc_named_type (feature, "int8");
+ tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+ field_type = tdesc_named_type (feature, "int16");
+ tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+ field_type = tdesc_named_type (feature, "int32");
+ tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+ field_type = tdesc_named_type (feature, "int64");
+ tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+ type = tdesc_create_union (feature, "vec128");
+ field_type = tdesc_named_type (feature, "v4f");
+ tdesc_add_field (type, "v4_float", field_type);
+ field_type = tdesc_named_type (feature, "v2d");
+ tdesc_add_field (type, "v2_double", field_type);
+ field_type = tdesc_named_type (feature, "v16i8");
+ tdesc_add_field (type, "v16_int8", field_type);
+ field_type = tdesc_named_type (feature, "v8i16");
+ tdesc_add_field (type, "v8_int16", field_type);
+ field_type = tdesc_named_type (feature, "v4i32");
+ tdesc_add_field (type, "v4_int32", field_type);
+ field_type = tdesc_named_type (feature, "v2i64");
+ tdesc_add_field (type, "v2_int64", field_type);
+ field_type = tdesc_named_type (feature, "uint128");
+ tdesc_add_field (type, "uint128", field_type);
+
+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+ tdesc_add_flag (field_type, 0, "IE");
+ tdesc_add_flag (field_type, 1, "DE");
+ tdesc_add_flag (field_type, 2, "ZE");
+ tdesc_add_flag (field_type, 3, "OE");
+ tdesc_add_flag (field_type, 4, "UE");
+ tdesc_add_flag (field_type, 5, "PE");
+ tdesc_add_flag (field_type, 6, "DAZ");
+ tdesc_add_flag (field_type, 7, "IM");
+ tdesc_add_flag (field_type, 8, "DM");
+ tdesc_add_flag (field_type, 9, "ZM");
+ tdesc_add_flag (field_type, 10, "OM");
+ tdesc_add_flag (field_type, 11, "UM");
+ tdesc_add_flag (field_type, 12, "PM");
+ tdesc_add_flag (field_type, 15, "FZ");
+
+ tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.avx");
+ tdesc_create_reg (feature, "ymm0h", 57, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm1h", 58, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm2h", 59, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm3h", 60, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm4h", 61, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm5h", 62, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm6h", 63, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm7h", 64, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm8h", 65, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm9h", 66, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm10h", 67, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm11h", 68, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm12h", 69, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm13h", 70, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm14h", 71, 1, NULL, 128, "uint128");
+ tdesc_create_reg (feature, "ymm15h", 72, 1, NULL, 128, "uint128");
+
+ tdesc_x32_avx = result;
+}
diff --git a/gdb/features/i386/x32-avx.xml b/gdb/features/i386/x32-avx.xml
new file mode 100644
index 0000000..57a32c9
--- /dev/null
+++ b/gdb/features/i386/x32-avx.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2012 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!-- X32 with AVX -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+ <architecture>i386:x64-32</architecture>
+ <xi:include href="x32-core.xml"/>
+ <xi:include href="64bit-sse.xml"/>
+ <xi:include href="64bit-avx.xml"/>
+</target>
diff --git a/gdb/features/i386/x32-core.xml b/gdb/features/i386/x32-core.xml
new file mode 100644
index 0000000..1e41417
--- /dev/null
+++ b/gdb/features/i386/x32-core.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2012 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.i386.core">
+ <flags id="i386_eflags" size="4">
+ <field name="CF" start="0" end="0"/>
+ <field name="" start="1" end="1"/>
+ <field name="PF" start="2" end="2"/>
+ <field name="AF" start="4" end="4"/>
+ <field name="ZF" start="6" end="6"/>
+ <field name="SF" start="7" end="7"/>
+ <field name="TF" start="8" end="8"/>
+ <field name="IF" start="9" end="9"/>
+ <field name="DF" start="10" end="10"/>
+ <field name="OF" start="11" end="11"/>
+ <field name="NT" start="14" end="14"/>
+ <field name="RF" start="16" end="16"/>
+ <field name="VM" start="17" end="17"/>
+ <field name="AC" start="18" end="18"/>
+ <field name="VIF" start="19" end="19"/>
+ <field name="VIP" start="20" end="20"/>
+ <field name="ID" start="21" end="21"/>
+ </flags>
+
+ <reg name="rax" bitsize="64" type="int64"/>
+ <reg name="rbx" bitsize="64" type="int64"/>
+ <reg name="rcx" bitsize="64" type="int64"/>
+ <reg name="rdx" bitsize="64" type="int64"/>
+ <reg name="rsi" bitsize="64" type="int64"/>
+ <reg name="rdi" bitsize="64" type="int64"/>
+ <reg name="rbp" bitsize="64" type="int64"/>
+ <reg name="rsp" bitsize="64" type="int64"/>
+ <reg name="r8" bitsize="64" type="int64"/>
+ <reg name="r9" bitsize="64" type="int64"/>
+ <reg name="r10" bitsize="64" type="int64"/>
+ <reg name="r11" bitsize="64" type="int64"/>
+ <reg name="r12" bitsize="64" type="int64"/>
+ <reg name="r13" bitsize="64" type="int64"/>
+ <reg name="r14" bitsize="64" type="int64"/>
+ <reg name="r15" bitsize="64" type="int64"/>
+
+ <reg name="rip" bitsize="64" type="uint64"/>
+ <reg name="eflags" bitsize="32" type="i386_eflags"/>
+ <reg name="cs" bitsize="32" type="int32"/>
+ <reg name="ss" bitsize="32" type="int32"/>
+ <reg name="ds" bitsize="32" type="int32"/>
+ <reg name="es" bitsize="32" type="int32"/>
+ <reg name="fs" bitsize="32" type="int32"/>
+ <reg name="gs" bitsize="32" type="int32"/>
+
+ <reg name="st0" bitsize="80" type="i387_ext"/>
+ <reg name="st1" bitsize="80" type="i387_ext"/>
+ <reg name="st2" bitsize="80" type="i387_ext"/>
+ <reg name="st3" bitsize="80" type="i387_ext"/>
+ <reg name="st4" bitsize="80" type="i387_ext"/>
+ <reg name="st5" bitsize="80" type="i387_ext"/>
+ <reg name="st6" bitsize="80" type="i387_ext"/>
+ <reg name="st7" bitsize="80" type="i387_ext"/>
+
+ <reg name="fctrl" bitsize="32" type="int" group="float"/>
+ <reg name="fstat" bitsize="32" type="int" group="float"/>
+ <reg name="ftag" bitsize="32" type="int" group="float"/>
+ <reg name="fiseg" bitsize="32" type="int" group="float"/>
+ <reg name="fioff" bitsize="32" type="int" group="float"/>
+ <reg name="foseg" bitsize="32" type="int" group="float"/>
+ <reg name="fooff" bitsize="32" type="int" group="float"/>
+ <reg name="fop" bitsize="32" type="int" group="float"/>
+</feature>
diff --git a/gdb/features/i386/x32-linux.c b/gdb/features/i386/x32-linux.c
new file mode 100644
index 0000000..b42287d
--- /dev/null
+++ b/gdb/features/i386/x32-linux.c
@@ -0,0 +1,153 @@
+/* THIS FILE IS GENERATED. Original: x32-linux.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_x32_linux;
+static void
+initialize_tdesc_x32_linux (void)
+{
+ struct target_desc *result = allocate_target_description ();
+ struct tdesc_feature *feature;
+ struct tdesc_type *field_type, *type;
+
+ set_tdesc_architecture (result, bfd_scan_arch ("i386:x64-32"));
+
+ set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
+ tdesc_add_flag (field_type, 0, "CF");
+ tdesc_add_flag (field_type, 1, "");
+ tdesc_add_flag (field_type, 2, "PF");
+ tdesc_add_flag (field_type, 4, "AF");
+ tdesc_add_flag (field_type, 6, "ZF");
+ tdesc_add_flag (field_type, 7, "SF");
+ tdesc_add_flag (field_type, 8, "TF");
+ tdesc_add_flag (field_type, 9, "IF");
+ tdesc_add_flag (field_type, 10, "DF");
+ tdesc_add_flag (field_type, 11, "OF");
+ tdesc_add_flag (field_type, 14, "NT");
+ tdesc_add_flag (field_type, 16, "RF");
+ tdesc_add_flag (field_type, 17, "VM");
+ tdesc_add_flag (field_type, 18, "AC");
+ tdesc_add_flag (field_type, 19, "VIF");
+ tdesc_add_flag (field_type, 20, "VIP");
+ tdesc_add_flag (field_type, 21, "ID");
+
+ tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "uint64");
+ tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
+ tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+ field_type = tdesc_named_type (feature, "ieee_single");
+ tdesc_create_vector (feature, "v4f", field_type, 4);
+
+ field_type = tdesc_named_type (feature, "ieee_double");
+ tdesc_create_vector (feature, "v2d", field_type, 2);
+
+ field_type = tdesc_named_type (feature, "int8");
+ tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+ field_type = tdesc_named_type (feature, "int16");
+ tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+ field_type = tdesc_named_type (feature, "int32");
+ tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+ field_type = tdesc_named_type (feature, "int64");
+ tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+ type = tdesc_create_union (feature, "vec128");
+ field_type = tdesc_named_type (feature, "v4f");
+ tdesc_add_field (type, "v4_float", field_type);
+ field_type = tdesc_named_type (feature, "v2d");
+ tdesc_add_field (type, "v2_double", field_type);
+ field_type = tdesc_named_type (feature, "v16i8");
+ tdesc_add_field (type, "v16_int8", field_type);
+ field_type = tdesc_named_type (feature, "v8i16");
+ tdesc_add_field (type, "v8_int16", field_type);
+ field_type = tdesc_named_type (feature, "v4i32");
+ tdesc_add_field (type, "v4_int32", field_type);
+ field_type = tdesc_named_type (feature, "v2i64");
+ tdesc_add_field (type, "v2_int64", field_type);
+ field_type = tdesc_named_type (feature, "uint128");
+ tdesc_add_field (type, "uint128", field_type);
+
+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+ tdesc_add_flag (field_type, 0, "IE");
+ tdesc_add_flag (field_type, 1, "DE");
+ tdesc_add_flag (field_type, 2, "ZE");
+ tdesc_add_flag (field_type, 3, "OE");
+ tdesc_add_flag (field_type, 4, "UE");
+ tdesc_add_flag (field_type, 5, "PE");
+ tdesc_add_flag (field_type, 6, "DAZ");
+ tdesc_add_flag (field_type, 7, "IM");
+ tdesc_add_flag (field_type, 8, "DM");
+ tdesc_add_flag (field_type, 9, "ZM");
+ tdesc_add_flag (field_type, 10, "OM");
+ tdesc_add_flag (field_type, 11, "UM");
+ tdesc_add_flag (field_type, 12, "PM");
+ tdesc_add_flag (field_type, 15, "FZ");
+
+ tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
+ tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
+
+ tdesc_x32_linux = result;
+}
diff --git a/gdb/features/i386/x32-linux.xml b/gdb/features/i386/x32-linux.xml
new file mode 100644
index 0000000..6a1bc7f
--- /dev/null
+++ b/gdb/features/i386/x32-linux.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2012 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!-- X32 - Includes Linux-only special "register". -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+ <architecture>i386:x64-32</architecture>
+ <osabi>GNU/Linux</osabi>
+ <xi:include href="x32-core.xml"/>
+ <xi:include href="64bit-sse.xml"/>
+ <xi:include href="64bit-linux.xml"/>
+</target>
diff --git a/gdb/features/i386/x32.c b/gdb/features/i386/x32.c
new file mode 100644
index 0000000..6342ddd
--- /dev/null
+++ b/gdb/features/i386/x32.c
@@ -0,0 +1,148 @@
+/* THIS FILE IS GENERATED. Original: x32.xml */
+
+#include "defs.h"
+#include "osabi.h"
+#include "target-descriptions.h"
+
+struct target_desc *tdesc_x32;
+static void
+initialize_tdesc_x32 (void)
+{
+ struct target_desc *result = allocate_target_description ();
+ struct tdesc_feature *feature;
+ struct tdesc_type *field_type, *type;
+
+ set_tdesc_architecture (result, bfd_scan_arch ("i386:x64-32"));
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
+ field_type = tdesc_create_flags (feature, "i386_eflags", 4);
+ tdesc_add_flag (field_type, 0, "CF");
+ tdesc_add_flag (field_type, 1, "");
+ tdesc_add_flag (field_type, 2, "PF");
+ tdesc_add_flag (field_type, 4, "AF");
+ tdesc_add_flag (field_type, 6, "ZF");
+ tdesc_add_flag (field_type, 7, "SF");
+ tdesc_add_flag (field_type, 8, "TF");
+ tdesc_add_flag (field_type, 9, "IF");
+ tdesc_add_flag (field_type, 10, "DF");
+ tdesc_add_flag (field_type, 11, "OF");
+ tdesc_add_flag (field_type, 14, "NT");
+ tdesc_add_flag (field_type, 16, "RF");
+ tdesc_add_flag (field_type, 17, "VM");
+ tdesc_add_flag (field_type, 18, "AC");
+ tdesc_add_flag (field_type, 19, "VIF");
+ tdesc_add_flag (field_type, 20, "VIP");
+ tdesc_add_flag (field_type, 21, "ID");
+
+ tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
+ tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "uint64");
+ tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
+ tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
+ tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
+ tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
+ tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
+
+ feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
+ field_type = tdesc_named_type (feature, "ieee_single");
+ tdesc_create_vector (feature, "v4f", field_type, 4);
+
+ field_type = tdesc_named_type (feature, "ieee_double");
+ tdesc_create_vector (feature, "v2d", field_type, 2);
+
+ field_type = tdesc_named_type (feature, "int8");
+ tdesc_create_vector (feature, "v16i8", field_type, 16);
+
+ field_type = tdesc_named_type (feature, "int16");
+ tdesc_create_vector (feature, "v8i16", field_type, 8);
+
+ field_type = tdesc_named_type (feature, "int32");
+ tdesc_create_vector (feature, "v4i32", field_type, 4);
+
+ field_type = tdesc_named_type (feature, "int64");
+ tdesc_create_vector (feature, "v2i64", field_type, 2);
+
+ type = tdesc_create_union (feature, "vec128");
+ field_type = tdesc_named_type (feature, "v4f");
+ tdesc_add_field (type, "v4_float", field_type);
+ field_type = tdesc_named_type (feature, "v2d");
+ tdesc_add_field (type, "v2_double", field_type);
+ field_type = tdesc_named_type (feature, "v16i8");
+ tdesc_add_field (type, "v16_int8", field_type);
+ field_type = tdesc_named_type (feature, "v8i16");
+ tdesc_add_field (type, "v8_int16", field_type);
+ field_type = tdesc_named_type (feature, "v4i32");
+ tdesc_add_field (type, "v4_int32", field_type);
+ field_type = tdesc_named_type (feature, "v2i64");
+ tdesc_add_field (type, "v2_int64", field_type);
+ field_type = tdesc_named_type (feature, "uint128");
+ tdesc_add_field (type, "uint128", field_type);
+
+ field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
+ tdesc_add_flag (field_type, 0, "IE");
+ tdesc_add_flag (field_type, 1, "DE");
+ tdesc_add_flag (field_type, 2, "ZE");
+ tdesc_add_flag (field_type, 3, "OE");
+ tdesc_add_flag (field_type, 4, "UE");
+ tdesc_add_flag (field_type, 5, "PE");
+ tdesc_add_flag (field_type, 6, "DAZ");
+ tdesc_add_flag (field_type, 7, "IM");
+ tdesc_add_flag (field_type, 8, "DM");
+ tdesc_add_flag (field_type, 9, "ZM");
+ tdesc_add_flag (field_type, 10, "OM");
+ tdesc_add_flag (field_type, 11, "UM");
+ tdesc_add_flag (field_type, 12, "PM");
+ tdesc_add_flag (field_type, 15, "FZ");
+
+ tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
+ tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
+
+ tdesc_x32 = result;
+}
diff --git a/gdb/features/i386/x32.xml b/gdb/features/i386/x32.xml
new file mode 100644
index 0000000..f950f4e
--- /dev/null
+++ b/gdb/features/i386/x32.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2012 Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!-- X32 -->
+
+<!DOCTYPE target SYSTEM "gdb-target.dtd">
+<target>
+ <architecture>i386:x64-32</architecture>
+ <xi:include href="x32-core.xml"/>
+ <xi:include href="64bit-sse.xml"/>
+</target>