GDB (xrefs)

64bit-mpx.c
Go to the documentation of this file.
1 /* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro:
2 Original: 64bit-mpx.xml */
3
4 #include "arch/tdesc.h"
5
6 static int
7 create_feature_i386_64bit_mpx (struct target_desc *result, long regnum)
8 {
9 struct tdesc_feature *feature;
10
11 feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx", "64bit-mpx.xml");
12 tdesc_type_with_fields *type_with_fields;
13 type_with_fields = tdesc_create_struct (feature, "br128");
14 tdesc_type *field_type;
15 field_type = tdesc_named_type (feature, "uint64");
16 tdesc_add_field (type_with_fields, "lbound", field_type);
17 field_type = tdesc_named_type (feature, "uint64");
18 tdesc_add_field (type_with_fields, "ubound_raw", field_type);
19
20 type_with_fields = tdesc_create_struct (feature, "_bndstatus");
21 tdesc_set_struct_size (type_with_fields, 8);
22 tdesc_add_bitfield (type_with_fields, "bde", 2, 63);
23 tdesc_add_bitfield (type_with_fields, "error", 0, 1);
24
25 type_with_fields = tdesc_create_union (feature, "status");
26 field_type = tdesc_named_type (feature, "data_ptr");
27 tdesc_add_field (type_with_fields, "raw", field_type);
28 field_type = tdesc_named_type (feature, "_bndstatus");
29 tdesc_add_field (type_with_fields, "status", field_type);
30
31 type_with_fields = tdesc_create_struct (feature, "_bndcfgu");
32 tdesc_set_struct_size (type_with_fields, 8);
33 tdesc_add_bitfield (type_with_fields, "base", 12, 63);
34 tdesc_add_bitfield (type_with_fields, "reserved", 2, 11);
35 tdesc_add_bitfield (type_with_fields, "preserved", 1, 1);
36 tdesc_add_bitfield (type_with_fields, "enabled", 0, 0);
37
38 type_with_fields = tdesc_create_union (feature, "cfgu");
39 field_type = tdesc_named_type (feature, "data_ptr");
40 tdesc_add_field (type_with_fields, "raw", field_type);
41 field_type = tdesc_named_type (feature, "_bndcfgu");
42 tdesc_add_field (type_with_fields, "config", field_type);
43
44 tdesc_create_reg (feature, "bnd0raw", regnum++, 1, NULL, 128, "br128");
45 tdesc_create_reg (feature, "bnd1raw", regnum++, 1, NULL, 128, "br128");
46 tdesc_create_reg (feature, "bnd2raw", regnum++, 1, NULL, 128, "br128");
47 tdesc_create_reg (feature, "bnd3raw", regnum++, 1, NULL, 128, "br128");
48 tdesc_create_reg (feature, "bndcfgu", regnum++, 1, NULL, 64, "cfgu");
49 tdesc_create_reg (feature, "bndstatus", regnum++, 1, NULL, 64, "status");
50 return regnum;
51 }
tdesc_type_with_fields
Definition: target-descriptions.c:355
tdesc_create_reg
void tdesc_create_reg(struct tdesc_feature *feature, const char *name, int regnum, int save_restore, const char *group, int bitsize, const char *type)
Definition: target-descriptions.c:1448
tdesc_type
Definition: target-descriptions.c:201
tdesc_add_bitfield
void tdesc_add_bitfield(tdesc_type_with_fields *type, const char *field_name, int start, int end)
Definition: target-descriptions.c:1560
tdesc_feature
Definition: target-descriptions.c:516
regnum
int regnum
Definition: aarch64-tdep.c:77
tdesc_create_union
tdesc_type_with_fields * tdesc_create_union(struct tdesc_feature *feature, const char *name)
Definition: target-descriptions.c:1495
target_desc
Definition: target-descriptions.c:591
tdesc_create_feature
struct tdesc_feature * tdesc_create_feature(struct target_desc *tdesc, const char *name, const char *xml=nullptr)
Definition: target-descriptions.c:1602
tdesc_create_struct
tdesc_type_with_fields * tdesc_create_struct(struct tdesc_feature *feature, const char *name)
Definition: target-descriptions.c:1473
tdesc_named_type
struct tdesc_type * tdesc_named_type(const struct tdesc_feature *feature, const char *id)
Definition: target-descriptions.c:997
tdesc_add_field
void tdesc_add_field(tdesc_type_with_fields *type, const char *field_name, struct tdesc_type *field_type)
Definition: target-descriptions.c:1535
create_feature_i386_64bit_mpx
static int create_feature_i386_64bit_mpx(struct target_desc *result, long regnum)
Definition: 64bit-mpx.c:7
tdesc.h
tdesc_set_struct_size
void tdesc_set_struct_size(tdesc_type_with_fields *type, int size)
Definition: target-descriptions.c:1485