6 static void predefine_i386(const struct target
*self
)
8 predefine("__i386__", 1, "1");
9 predefine("__i386", 1, "1");
10 predefine_nostd("i386");
13 static void predefine_x86_64(const struct target
*self
)
15 predefine("__x86_64__", 1, "1");
16 predefine("__x86_64", 1, "1");
17 predefine("__amd64__", 1, "1");
18 predefine("__amd64", 1, "1");
22 static void init_x86_common(const struct target
*target
)
26 wchar_ctype
= &ushort_ctype
;
29 wint_ctype
= &int_ctype
;
32 size_t_ctype
= &ulong_ctype
;
33 ssize_t_ctype
= &long_ctype
;
34 wchar_ctype
= &int_ctype
;
35 wint_ctype
= &int_ctype
;
36 fast16_ctype
= &short_ctype
;
37 ufast16_ctype
= &ushort_ctype
;
43 static void init_i386(const struct target
*target
)
45 fast16_ctype
= &int_ctype
;
46 ufast16_ctype
= &uint_ctype
;
47 fast32_ctype
= &int_ctype
;
48 ufast32_ctype
= &uint_ctype
;
50 init_x86_common(target
);
53 const struct target target_i386
= {
60 .bits_in_longdouble
= 96,
61 .max_fp_alignment
= 4,
63 .target_64bit
= &target_x86_64
,
66 .predefine
= predefine_i386
,
70 static void init_x86_x32(const struct target
*target
)
72 init_x86_common(target
);
74 max_int_alignment
= 8;
76 fast16_ctype
= &int_ctype
;
77 ufast16_ctype
= &uint_ctype
;
78 fast32_ctype
= &int_ctype
;
79 ufast32_ctype
= &uint_ctype
;
80 wchar_ctype
= &long_ctype
;
83 static const struct target target_x86_x32
= {
90 .bits_in_longdouble
= 128,
91 .max_fp_alignment
= 16,
93 .target_32bit
= &target_i386
,
94 .target_64bit
= &target_x86_64
,
97 .predefine
= predefine_x86_64
,
101 static void init_x86_64(const struct target
*target
)
103 init_x86_common(target
);
109 int64_ctype
= &llong_ctype
;
110 uint64_ctype
= &ullong_ctype
;
111 wint_ctype
= &int_ctype
;
112 fast16_ctype
= &short_ctype
;
113 ufast16_ctype
= &ushort_ctype
;
114 fast32_ctype
= &int_ctype
;
115 ufast32_ctype
= &uint_ctype
;
116 fast64_ctype
= &llong_ctype
;
117 ufast64_ctype
= &ullong_ctype
;
120 fast16_ctype
= &short_ctype
;
121 ufast16_ctype
= &ushort_ctype
;
122 fast32_ctype
= &int_ctype
;
123 ufast32_ctype
= &uint_ctype
;
126 fast8_ctype
= &int_ctype
;
127 ufast8_ctype
= &uint_ctype
;
128 fast16_ctype
= &int_ctype
;
129 ufast16_ctype
= &uint_ctype
;
130 fast32_ctype
= &int_ctype
;
131 ufast32_ctype
= &uint_ctype
;
132 wint_ctype
= &int_ctype
;
135 fast32_ctype
= &int_ctype
;
136 ufast32_ctype
= &uint_ctype
;
137 int64_ctype
= &llong_ctype
;
138 uint64_ctype
= &ullong_ctype
;
139 intmax_ctype
= &llong_ctype
;
140 uintmax_ctype
= &ullong_ctype
;
141 least64_ctype
= &long_ctype
;
142 uleast64_ctype
= &ulong_ctype
;
147 const struct target target_x86_64
= {
149 .bitness
= ARCH_LP64
,
154 .bits_in_longdouble
= 128,
155 .max_fp_alignment
= 16,
157 .target_32bit
= &target_i386
,
158 .target_x32bit
= &target_x86_x32
,
161 .predefine
= predefine_x86_64
,