7 static void predefine_i386(const struct target
*self
)
9 predefine("__i386__", 1, "1");
10 predefine("__i386", 1, "1");
11 predefine_nostd("i386");
14 static void predefine_x86_64(const struct target
*self
)
16 predefine("__x86_64__", 1, "1");
17 predefine("__x86_64", 1, "1");
18 predefine("__amd64__", 1, "1");
19 predefine("__amd64", 1, "1");
23 static void init_x86_common(const struct target
*target
)
27 wchar_ctype
= &ushort_ctype
;
30 wint_ctype
= &int_ctype
;
33 size_t_ctype
= &ulong_ctype
;
34 ssize_t_ctype
= &long_ctype
;
35 wchar_ctype
= &int_ctype
;
36 wint_ctype
= &int_ctype
;
37 fast16_ctype
= &short_ctype
;
38 ufast16_ctype
= &ushort_ctype
;
43 static const struct builtin_fn builtins_x86_common
[] = {
44 { "__builtin_ia32_pause", &void_ctype
, 0, },
49 static void init_i386(const struct target
*target
)
51 fast16_ctype
= &int_ctype
;
52 ufast16_ctype
= &uint_ctype
;
53 fast32_ctype
= &int_ctype
;
54 ufast32_ctype
= &uint_ctype
;
56 init_x86_common(target
);
59 const struct target target_i386
= {
66 .bits_in_longdouble
= 96,
67 .max_fp_alignment
= 4,
69 .target_64bit
= &target_x86_64
,
72 .predefine
= predefine_i386
,
73 .builtins
= builtins_x86_common
,
77 static void init_x86_x32(const struct target
*target
)
79 init_x86_common(target
);
81 max_int_alignment
= 8;
83 fast16_ctype
= &int_ctype
;
84 ufast16_ctype
= &uint_ctype
;
85 fast32_ctype
= &int_ctype
;
86 ufast32_ctype
= &uint_ctype
;
87 wchar_ctype
= &long_ctype
;
90 static const struct target target_x86_x32
= {
97 .bits_in_longdouble
= 128,
98 .max_fp_alignment
= 16,
100 .target_32bit
= &target_i386
,
101 .target_64bit
= &target_x86_64
,
103 .init
= init_x86_x32
,
104 .predefine
= predefine_x86_64
,
108 static void init_x86_64(const struct target
*target
)
110 init_x86_common(target
);
116 int64_ctype
= &llong_ctype
;
117 uint64_ctype
= &ullong_ctype
;
118 wint_ctype
= &int_ctype
;
119 fast16_ctype
= &short_ctype
;
120 ufast16_ctype
= &ushort_ctype
;
121 fast32_ctype
= &int_ctype
;
122 ufast32_ctype
= &uint_ctype
;
123 fast64_ctype
= &llong_ctype
;
124 ufast64_ctype
= &ullong_ctype
;
127 fast16_ctype
= &short_ctype
;
128 ufast16_ctype
= &ushort_ctype
;
129 fast32_ctype
= &int_ctype
;
130 ufast32_ctype
= &uint_ctype
;
133 fast8_ctype
= &int_ctype
;
134 ufast8_ctype
= &uint_ctype
;
135 fast16_ctype
= &int_ctype
;
136 ufast16_ctype
= &uint_ctype
;
137 fast32_ctype
= &int_ctype
;
138 ufast32_ctype
= &uint_ctype
;
139 wint_ctype
= &int_ctype
;
142 fast32_ctype
= &int_ctype
;
143 ufast32_ctype
= &uint_ctype
;
144 int64_ctype
= &llong_ctype
;
145 uint64_ctype
= &ullong_ctype
;
146 intmax_ctype
= &llong_ctype
;
147 uintmax_ctype
= &ullong_ctype
;
148 least64_ctype
= &long_ctype
;
149 uleast64_ctype
= &ulong_ctype
;
154 const struct target target_x86_64
= {
156 .bitness
= ARCH_LP64
,
161 .bits_in_longdouble
= 128,
162 .max_fp_alignment
= 16,
164 .target_32bit
= &target_i386
,
165 .target_x32bit
= &target_x86_x32
,
168 .predefine
= predefine_x86_64
,
169 .builtins
= builtins_x86_common
,