File: 32bit-mpx.c

package info (click to toggle)
gdb-doc 10.1-1
  • links: PTS, VCS
  • area: non-free
  • in suites: bullseye
  • size: 237,684 kB
  • sloc: ansic: 1,939,544; asm: 342,614; exp: 164,373; cpp: 69,350; makefile: 58,777; sh: 25,051; yacc: 13,167; ada: 5,758; xml: 5,461; perl: 5,334; python: 4,759; pascal: 3,220; lisp: 1,575; tcl: 1,541; f90: 1,395; cs: 879; lex: 620; sed: 234; awk: 141; objc: 137; fortran: 62
file content (51 lines) | stat: -rw-r--r-- 2,289 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
  Original: 32bit-mpx.xml */

#include "gdbsupport/tdesc.h"

static int
create_feature_i386_32bit_mpx (struct target_desc *result, long regnum)
{
  struct tdesc_feature *feature;

  feature = tdesc_create_feature (result, "org.gnu.gdb.i386.mpx");
  tdesc_type_with_fields *type_with_fields;
  type_with_fields = tdesc_create_struct (feature, "br128");
  tdesc_type *field_type;
  field_type = tdesc_named_type (feature, "uint64");
  tdesc_add_field (type_with_fields, "lbound", field_type);
  field_type = tdesc_named_type (feature, "uint64");
  tdesc_add_field (type_with_fields, "ubound_raw", field_type);

  type_with_fields = tdesc_create_struct (feature, "_bndstatus");
  tdesc_set_struct_size (type_with_fields, 8);
  tdesc_add_bitfield (type_with_fields, "bde", 2, 31);
  tdesc_add_bitfield (type_with_fields, "error", 0, 1);

  type_with_fields = tdesc_create_union (feature, "status");
  field_type = tdesc_named_type (feature, "data_ptr");
  tdesc_add_field (type_with_fields, "raw", field_type);
  field_type = tdesc_named_type (feature, "_bndstatus");
  tdesc_add_field (type_with_fields, "status", field_type);

  type_with_fields = tdesc_create_struct (feature, "_bndcfgu");
  tdesc_set_struct_size (type_with_fields, 8);
  tdesc_add_bitfield (type_with_fields, "base", 12, 31);
  tdesc_add_bitfield (type_with_fields, "reserved", 2, 11);
  tdesc_add_bitfield (type_with_fields, "preserved", 1, 1);
  tdesc_add_bitfield (type_with_fields, "enabled", 0, 0);

  type_with_fields = tdesc_create_union (feature, "cfgu");
  field_type = tdesc_named_type (feature, "data_ptr");
  tdesc_add_field (type_with_fields, "raw", field_type);
  field_type = tdesc_named_type (feature, "_bndcfgu");
  tdesc_add_field (type_with_fields, "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;
}