xref: /dflybsd-src/contrib/gdb-7/gdb/features/i386/x32-linux.c (revision de8e141f24382815c10a4012d209bbbf7abf1112)
1*ef5ccd6cSJohn Marino /* THIS FILE IS GENERATED.  -*- buffer-read-only: t -*- vi:set ro:
2*ef5ccd6cSJohn Marino   Original: x32-linux.xml */
3*ef5ccd6cSJohn Marino 
4*ef5ccd6cSJohn Marino #include "defs.h"
5*ef5ccd6cSJohn Marino #include "osabi.h"
6*ef5ccd6cSJohn Marino #include "target-descriptions.h"
7*ef5ccd6cSJohn Marino 
8*ef5ccd6cSJohn Marino struct target_desc *tdesc_x32_linux;
9*ef5ccd6cSJohn Marino static void
initialize_tdesc_x32_linux(void)10*ef5ccd6cSJohn Marino initialize_tdesc_x32_linux (void)
11*ef5ccd6cSJohn Marino {
12*ef5ccd6cSJohn Marino   struct target_desc *result = allocate_target_description ();
13*ef5ccd6cSJohn Marino   struct tdesc_feature *feature;
14*ef5ccd6cSJohn Marino   struct tdesc_type *field_type;
15*ef5ccd6cSJohn Marino   struct tdesc_type *type;
16*ef5ccd6cSJohn Marino 
17*ef5ccd6cSJohn Marino   set_tdesc_architecture (result, bfd_scan_arch ("i386:x64-32"));
18*ef5ccd6cSJohn Marino 
19*ef5ccd6cSJohn Marino   set_tdesc_osabi (result, osabi_from_tdesc_string ("GNU/Linux"));
20*ef5ccd6cSJohn Marino 
21*ef5ccd6cSJohn Marino   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.core");
22*ef5ccd6cSJohn Marino   field_type = tdesc_create_flags (feature, "i386_eflags", 4);
23*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 0, "CF");
24*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 1, "");
25*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 2, "PF");
26*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 4, "AF");
27*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 6, "ZF");
28*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 7, "SF");
29*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 8, "TF");
30*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 9, "IF");
31*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 10, "DF");
32*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 11, "OF");
33*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 14, "NT");
34*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 16, "RF");
35*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 17, "VM");
36*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 18, "AC");
37*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 19, "VIF");
38*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 20, "VIP");
39*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 21, "ID");
40*ef5ccd6cSJohn Marino 
41*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "rax", 0, 1, NULL, 64, "int64");
42*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "rbx", 1, 1, NULL, 64, "int64");
43*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "rcx", 2, 1, NULL, 64, "int64");
44*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "rdx", 3, 1, NULL, 64, "int64");
45*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "rsi", 4, 1, NULL, 64, "int64");
46*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "rdi", 5, 1, NULL, 64, "int64");
47*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "rbp", 6, 1, NULL, 64, "int64");
48*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "rsp", 7, 1, NULL, 64, "int64");
49*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "int64");
50*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "int64");
51*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "int64");
52*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "int64");
53*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "int64");
54*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "int64");
55*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "int64");
56*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "int64");
57*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "rip", 16, 1, NULL, 64, "uint64");
58*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "eflags", 17, 1, NULL, 32, "i386_eflags");
59*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "cs", 18, 1, NULL, 32, "int32");
60*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "ss", 19, 1, NULL, 32, "int32");
61*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "ds", 20, 1, NULL, 32, "int32");
62*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "es", 21, 1, NULL, 32, "int32");
63*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "fs", 22, 1, NULL, 32, "int32");
64*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "gs", 23, 1, NULL, 32, "int32");
65*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "st0", 24, 1, NULL, 80, "i387_ext");
66*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "st1", 25, 1, NULL, 80, "i387_ext");
67*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "st2", 26, 1, NULL, 80, "i387_ext");
68*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "st3", 27, 1, NULL, 80, "i387_ext");
69*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "st4", 28, 1, NULL, 80, "i387_ext");
70*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "st5", 29, 1, NULL, 80, "i387_ext");
71*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "st6", 30, 1, NULL, 80, "i387_ext");
72*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "st7", 31, 1, NULL, 80, "i387_ext");
73*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "fctrl", 32, 1, "float", 32, "int");
74*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "fstat", 33, 1, "float", 32, "int");
75*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "ftag", 34, 1, "float", 32, "int");
76*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "fiseg", 35, 1, "float", 32, "int");
77*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "fioff", 36, 1, "float", 32, "int");
78*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "foseg", 37, 1, "float", 32, "int");
79*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "fooff", 38, 1, "float", 32, "int");
80*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "fop", 39, 1, "float", 32, "int");
81*ef5ccd6cSJohn Marino 
82*ef5ccd6cSJohn Marino   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.sse");
83*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "ieee_single");
84*ef5ccd6cSJohn Marino   tdesc_create_vector (feature, "v4f", field_type, 4);
85*ef5ccd6cSJohn Marino 
86*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "ieee_double");
87*ef5ccd6cSJohn Marino   tdesc_create_vector (feature, "v2d", field_type, 2);
88*ef5ccd6cSJohn Marino 
89*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "int8");
90*ef5ccd6cSJohn Marino   tdesc_create_vector (feature, "v16i8", field_type, 16);
91*ef5ccd6cSJohn Marino 
92*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "int16");
93*ef5ccd6cSJohn Marino   tdesc_create_vector (feature, "v8i16", field_type, 8);
94*ef5ccd6cSJohn Marino 
95*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "int32");
96*ef5ccd6cSJohn Marino   tdesc_create_vector (feature, "v4i32", field_type, 4);
97*ef5ccd6cSJohn Marino 
98*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "int64");
99*ef5ccd6cSJohn Marino   tdesc_create_vector (feature, "v2i64", field_type, 2);
100*ef5ccd6cSJohn Marino 
101*ef5ccd6cSJohn Marino   type = tdesc_create_union (feature, "vec128");
102*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "v4f");
103*ef5ccd6cSJohn Marino   tdesc_add_field (type, "v4_float", field_type);
104*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "v2d");
105*ef5ccd6cSJohn Marino   tdesc_add_field (type, "v2_double", field_type);
106*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "v16i8");
107*ef5ccd6cSJohn Marino   tdesc_add_field (type, "v16_int8", field_type);
108*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "v8i16");
109*ef5ccd6cSJohn Marino   tdesc_add_field (type, "v8_int16", field_type);
110*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "v4i32");
111*ef5ccd6cSJohn Marino   tdesc_add_field (type, "v4_int32", field_type);
112*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "v2i64");
113*ef5ccd6cSJohn Marino   tdesc_add_field (type, "v2_int64", field_type);
114*ef5ccd6cSJohn Marino   field_type = tdesc_named_type (feature, "uint128");
115*ef5ccd6cSJohn Marino   tdesc_add_field (type, "uint128", field_type);
116*ef5ccd6cSJohn Marino 
117*ef5ccd6cSJohn Marino   field_type = tdesc_create_flags (feature, "i386_mxcsr", 4);
118*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 0, "IE");
119*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 1, "DE");
120*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 2, "ZE");
121*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 3, "OE");
122*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 4, "UE");
123*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 5, "PE");
124*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 6, "DAZ");
125*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 7, "IM");
126*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 8, "DM");
127*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 9, "ZM");
128*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 10, "OM");
129*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 11, "UM");
130*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 12, "PM");
131*ef5ccd6cSJohn Marino   tdesc_add_flag (field_type, 15, "FZ");
132*ef5ccd6cSJohn Marino 
133*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm0", 40, 1, NULL, 128, "vec128");
134*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm1", 41, 1, NULL, 128, "vec128");
135*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm2", 42, 1, NULL, 128, "vec128");
136*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm3", 43, 1, NULL, 128, "vec128");
137*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm4", 44, 1, NULL, 128, "vec128");
138*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm5", 45, 1, NULL, 128, "vec128");
139*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm6", 46, 1, NULL, 128, "vec128");
140*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm7", 47, 1, NULL, 128, "vec128");
141*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm8", 48, 1, NULL, 128, "vec128");
142*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm9", 49, 1, NULL, 128, "vec128");
143*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm10", 50, 1, NULL, 128, "vec128");
144*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm11", 51, 1, NULL, 128, "vec128");
145*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm12", 52, 1, NULL, 128, "vec128");
146*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm13", 53, 1, NULL, 128, "vec128");
147*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm14", 54, 1, NULL, 128, "vec128");
148*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "xmm15", 55, 1, NULL, 128, "vec128");
149*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "mxcsr", 56, 1, "vector", 32, "i386_mxcsr");
150*ef5ccd6cSJohn Marino 
151*ef5ccd6cSJohn Marino   feature = tdesc_create_feature (result, "org.gnu.gdb.i386.linux");
152*ef5ccd6cSJohn Marino   tdesc_create_reg (feature, "orig_rax", 57, 1, NULL, 64, "int");
153*ef5ccd6cSJohn Marino 
154*ef5ccd6cSJohn Marino   tdesc_x32_linux = result;
155*ef5ccd6cSJohn Marino }
156