aboutsummaryrefslogtreecommitdiff
path: root/gdb/features/aarch64.c
blob: 1e9a99d3e948bdc64e99f3280e5061892b055b4e (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
/* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
  Original: aarch64.xml */

#include "defs.h"
#include "osabi.h"
#include "target-descriptions.h"

struct target_desc *tdesc_aarch64;
static void
initialize_tdesc_aarch64 (void)
{
  struct target_desc *result = allocate_target_description ();
  struct tdesc_feature *feature;
  struct tdesc_type *field_type;
  struct tdesc_type *type;

  set_tdesc_architecture (result, bfd_scan_arch ("aarch64"));

  feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.core");
  tdesc_create_reg (feature, "x0", 0, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x1", 1, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x2", 2, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x3", 3, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x4", 4, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x5", 5, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x6", 6, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x7", 7, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x8", 8, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x9", 9, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x10", 10, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x11", 11, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x12", 12, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x13", 13, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x14", 14, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x15", 15, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x16", 16, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x17", 17, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x18", 18, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x19", 19, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x20", 20, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x21", 21, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x22", 22, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x23", 23, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x24", 24, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x25", 25, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x26", 26, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x27", 27, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x28", 28, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x29", 29, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "x30", 30, 1, NULL, 64, "int");
  tdesc_create_reg (feature, "sp", 31, 1, NULL, 64, "data_ptr");
  tdesc_create_reg (feature, "pc", 32, 1, NULL, 64, "code_ptr");
  tdesc_create_reg (feature, "cpsr", 33, 1, NULL, 32, "int");

  feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.fpu");
  field_type = tdesc_named_type (feature, "ieee_double");
  tdesc_create_vector (feature, "v2d", field_type, 2);

  field_type = tdesc_named_type (feature, "uint64");
  tdesc_create_vector (feature, "v2u", field_type, 2);

  field_type = tdesc_named_type (feature, "int64");
  tdesc_create_vector (feature, "v2i", field_type, 2);

  field_type = tdesc_named_type (feature, "ieee_single");
  tdesc_create_vector (feature, "v4f", field_type, 4);

  field_type = tdesc_named_type (feature, "uint32");
  tdesc_create_vector (feature, "v4u", field_type, 4);

  field_type = tdesc_named_type (feature, "int32");
  tdesc_create_vector (feature, "v4i", field_type, 4);

  field_type = tdesc_named_type (feature, "uint16");
  tdesc_create_vector (feature, "v8u", field_type, 8);

  field_type = tdesc_named_type (feature, "int16");
  tdesc_create_vector (feature, "v8i", field_type, 8);

  field_type = tdesc_named_type (feature, "uint8");
  tdesc_create_vector (feature, "v16u", field_type, 16);

  field_type = tdesc_named_type (feature, "int8");
  tdesc_create_vector (feature, "v16i", field_type, 16);

  field_type = tdesc_named_type (feature, "uint128");
  tdesc_create_vector (feature, "v1u", field_type, 1);

  field_type = tdesc_named_type (feature, "int128");
  tdesc_create_vector (feature, "v1i", field_type, 1);

  type = tdesc_create_union (feature, "vnd");
  field_type = tdesc_named_type (feature, "v2d");
  tdesc_add_field (type, "f", field_type);
  field_type = tdesc_named_type (feature, "v2u");
  tdesc_add_field (type, "u", field_type);
  field_type = tdesc_named_type (feature, "v2i");
  tdesc_add_field (type, "s", field_type);

  type = tdesc_create_union (feature, "vns");
  field_type = tdesc_named_type (feature, "v4f");
  tdesc_add_field (type, "f", field_type);
  field_type = tdesc_named_type (feature, "v4u");
  tdesc_add_field (type, "u", field_type);
  field_type = tdesc_named_type (feature, "v4i");
  tdesc_add_field (type, "s", field_type);

  type = tdesc_create_union (feature, "vnh");
  field_type = tdesc_named_type (feature, "v8u");
  tdesc_add_field (type, "u", field_type);
  field_type = tdesc_named_type (feature, "v8i");
  tdesc_add_field (type, "s", field_type);

  type = tdesc_create_union (feature, "vnb");
  field_type = tdesc_named_type (feature, "v16u");
  tdesc_add_field (type, "u", field_type);
  field_type = tdesc_named_type (feature, "v16i");
  tdesc_add_field (type, "s", field_type);

  type = tdesc_create_union (feature, "vnq");
  field_type = tdesc_named_type (feature, "v1u");
  tdesc_add_field (type, "u", field_type);
  field_type = tdesc_named_type (feature, "v1i");
  tdesc_add_field (type, "s", field_type);

  type = tdesc_create_union (feature, "aarch64v");
  field_type = tdesc_named_type (feature, "vnd");
  tdesc_add_field (type, "d", field_type);
  field_type = tdesc_named_type (feature, "vns");
  tdesc_add_field (type, "s", field_type);
  field_type = tdesc_named_type (feature, "vnh");
  tdesc_add_field (type, "h", field_type);
  field_type = tdesc_named_type (feature, "vnb");
  tdesc_add_field (type, "b", field_type);
  field_type = tdesc_named_type (feature, "vnq");
  tdesc_add_field (type, "q", field_type);

  tdesc_create_reg (feature, "v0", 34, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v1", 35, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v2", 36, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v3", 37, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v4", 38, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v5", 39, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v6", 40, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v7", 41, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v8", 42, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v9", 43, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v10", 44, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v11", 45, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v12", 46, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v13", 47, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v14", 48, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v15", 49, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v16", 50, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v17", 51, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v18", 52, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v19", 53, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v20", 54, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v21", 55, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v22", 56, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v23", 57, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v24", 58, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v25", 59, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v26", 60, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v27", 61, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v28", 62, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v29", 63, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v30", 64, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "v31", 65, 1, NULL, 128, "aarch64v");
  tdesc_create_reg (feature, "fpsr", 66, 1, NULL, 32, "int");
  tdesc_create_reg (feature, "fpcr", 67, 1, NULL, 32, "int");

  tdesc_aarch64 = result;
}