mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-06 12:09:26 +08:00
6c73f67f9c
This patch starts to use the generate c feature files to dynamically create amd64-linux target descriptions. gdb: 2017-09-05 Yao Qi <yao.qi@linaro.org> * amd64-linux-tdep.c: Don't include amd64-XXX-linux and x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c. (amd64_linux_read_description): Create target descriptions. (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX functions. Add unit tests. * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and x32-core.xml. * features/i386/64bit-avx.c: Generated. * features/i386/64bit-avx512.c: Generated. * features/i386/64bit-core.c: Generated. * features/i386/64bit-linux.c: Generated. * features/i386/64bit-mpx.c: Generated. * features/i386/64bit-pkeys.c: Generated. * features/i386/64bit-segments.c: Generated. * features/i386/64bit-sse.c: Generated. * features/i386/x32-core.c: Generated. * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature c files for amd64-linux and x32-linux.
52 lines
2.0 KiB
C
52 lines
2.0 KiB
C
/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
|
|
Original: 64bit-mpx.xml */
|
|
|
|
#include "arch/tdesc.h"
|
|
|
|
static int
|
|
create_feature_i386_64bit_mpx (struct target_desc *result, long regnum)
|
|
{
|
|
struct tdesc_feature *feature;
|
|
|
|
feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx", "64bit-mpx.xml");
|
|
struct tdesc_type *field_type;
|
|
struct tdesc_type *type;
|
|
type = tdesc_create_struct (feature, "br128");
|
|
field_type = tdesc_named_type (feature, "uint64");
|
|
tdesc_add_field (type, "lbound", field_type);
|
|
field_type = tdesc_named_type (feature, "uint64");
|
|
tdesc_add_field (type, "ubound_raw", field_type);
|
|
|
|
type = tdesc_create_struct (feature, "_bndstatus");
|
|
tdesc_set_struct_size (type, 8);
|
|
tdesc_add_bitfield (type, "bde", 2, 63);
|
|
tdesc_add_bitfield (type, "error", 0, 1);
|
|
|
|
type = tdesc_create_union (feature, "status");
|
|
field_type = tdesc_named_type (feature, "data_ptr");
|
|
tdesc_add_field (type, "raw", field_type);
|
|
field_type = tdesc_named_type (feature, "_bndstatus");
|
|
tdesc_add_field (type, "status", field_type);
|
|
|
|
type = tdesc_create_struct (feature, "_bndcfgu");
|
|
tdesc_set_struct_size (type, 8);
|
|
tdesc_add_bitfield (type, "base", 12, 63);
|
|
tdesc_add_bitfield (type, "reserved", 2, 11);
|
|
tdesc_add_bitfield (type, "preserved", 1, 1);
|
|
tdesc_add_bitfield (type, "enabled", 0, 0);
|
|
|
|
type = tdesc_create_union (feature, "cfgu");
|
|
field_type = tdesc_named_type (feature, "data_ptr");
|
|
tdesc_add_field (type, "raw", field_type);
|
|
field_type = tdesc_named_type (feature, "_bndcfgu");
|
|
tdesc_add_field (type, "config", field_type);
|
|
|
|
tdesc_create_reg (feature, "bnd0raw", regnum++, 1, NULL, 128, "br128");
|
|
tdesc_create_reg (feature, "bnd1raw", regnum++, 1, NULL, 128, "br128");
|
|
tdesc_create_reg (feature, "bnd2raw", regnum++, 1, NULL, 128, "br128");
|
|
tdesc_create_reg (feature, "bnd3raw", regnum++, 1, NULL, 128, "br128");
|
|
tdesc_create_reg (feature, "bndcfgu", regnum++, 1, NULL, 64, "cfgu");
|
|
tdesc_create_reg (feature, "bndstatus", regnum++, 1, NULL, 64, "status");
|
|
return regnum;
|
|
}
|