]>
Commit | Line | Data |
---|---|---|
bd3239d2 MF |
1 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" |
2 | # 1 "<built-in>" | |
3 | # 1 "<command-line>" | |
4 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
5 | # 20 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
6 | # 1 "/usr/include/math.h" 1 3 4 | |
7 | # 28 "/usr/include/math.h" 3 4 | |
8 | # 1 "/usr/include/features.h" 1 3 4 | |
9 | # 358 "/usr/include/features.h" 3 4 | |
10 | # 1 "/usr/include/sys/cdefs.h" 1 3 4 | |
11 | # 378 "/usr/include/sys/cdefs.h" 3 4 | |
12 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
13 | # 379 "/usr/include/sys/cdefs.h" 2 3 4 | |
14 | # 359 "/usr/include/features.h" 2 3 4 | |
15 | # 382 "/usr/include/features.h" 3 4 | |
16 | # 1 "/usr/include/gnu/stubs.h" 1 3 4 | |
17 | ||
18 | ||
19 | ||
20 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
21 | # 5 "/usr/include/gnu/stubs.h" 2 3 4 | |
22 | ||
23 | ||
24 | # 1 "/usr/include/gnu/stubs-32.h" 1 3 4 | |
25 | # 8 "/usr/include/gnu/stubs.h" 2 3 4 | |
26 | # 383 "/usr/include/features.h" 2 3 4 | |
27 | # 29 "/usr/include/math.h" 2 3 4 | |
28 | ||
29 | ||
30 | ||
31 | ||
32 | ||
33 | # 1 "/usr/include/bits/huge_val.h" 1 3 4 | |
34 | # 35 "/usr/include/math.h" 2 3 4 | |
35 | ||
36 | # 1 "/usr/include/bits/huge_valf.h" 1 3 4 | |
37 | # 37 "/usr/include/math.h" 2 3 4 | |
38 | # 1 "/usr/include/bits/huge_vall.h" 1 3 4 | |
39 | # 38 "/usr/include/math.h" 2 3 4 | |
40 | ||
41 | ||
42 | # 1 "/usr/include/bits/inf.h" 1 3 4 | |
43 | # 41 "/usr/include/math.h" 2 3 4 | |
44 | ||
45 | ||
46 | # 1 "/usr/include/bits/nan.h" 1 3 4 | |
47 | # 44 "/usr/include/math.h" 2 3 4 | |
48 | ||
49 | ||
50 | ||
51 | # 1 "/usr/include/bits/mathdef.h" 1 3 4 | |
52 | # 36 "/usr/include/bits/mathdef.h" 3 4 | |
53 | typedef long double float_t; | |
54 | ||
55 | typedef long double double_t; | |
56 | # 48 "/usr/include/math.h" 2 3 4 | |
57 | # 71 "/usr/include/math.h" 3 4 | |
58 | # 1 "/usr/include/bits/mathcalls.h" 1 3 4 | |
59 | # 53 "/usr/include/bits/mathcalls.h" 3 4 | |
60 | ||
61 | ||
62 | extern double acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
63 | ||
64 | extern double asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
65 | ||
66 | extern double atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
67 | ||
68 | extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
69 | ||
70 | ||
71 | extern double cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
72 | ||
73 | extern double sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
74 | ||
75 | extern double tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
76 | ||
77 | ||
78 | ||
79 | ||
80 | extern double cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
81 | ||
82 | extern double sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
83 | ||
84 | extern double tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
85 | ||
86 | ||
87 | ||
88 | ||
89 | extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__)) | |
90 | ; | |
91 | ||
92 | ||
93 | ||
94 | ||
95 | ||
96 | extern double acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
97 | ||
98 | extern double asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
99 | ||
100 | extern double atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
101 | ||
102 | ||
103 | ||
104 | ||
105 | ||
106 | ||
107 | ||
108 | extern double exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
109 | ||
110 | ||
111 | extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); | |
112 | ||
113 | ||
114 | extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); | |
115 | ||
116 | ||
117 | extern double log (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
118 | ||
119 | ||
120 | extern double log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
121 | ||
122 | ||
123 | extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) | |
124 | __attribute__ ((__nonnull__ (2))); | |
125 | ||
126 | ||
127 | ||
128 | ||
129 | extern double exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
130 | ||
131 | extern double pow10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
132 | ||
133 | ||
134 | ||
135 | ||
136 | ||
137 | extern double expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
138 | ||
139 | ||
140 | extern double log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
141 | ||
142 | ||
143 | extern double logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
144 | ||
145 | ||
146 | ||
147 | ||
148 | ||
149 | ||
150 | extern double exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
151 | ||
152 | ||
153 | extern double log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
154 | ||
155 | ||
156 | ||
157 | ||
158 | ||
159 | ||
160 | ||
161 | ||
162 | extern double pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
163 | ||
164 | ||
165 | extern double sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
166 | ||
167 | ||
168 | ||
169 | ||
170 | ||
171 | extern double hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
172 | ||
173 | ||
174 | ||
175 | ||
176 | ||
177 | ||
178 | extern double cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
179 | ||
180 | ||
181 | ||
182 | ||
183 | ||
184 | ||
185 | ||
186 | ||
187 | extern double ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
188 | ||
189 | ||
190 | extern double fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
191 | ||
192 | ||
193 | extern double floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
194 | ||
195 | ||
196 | extern double fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
197 | ||
198 | ||
199 | ||
200 | ||
201 | extern int __isinf (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
202 | ||
203 | ||
204 | extern int __finite (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
205 | ||
206 | ||
207 | ||
208 | ||
209 | ||
210 | extern int isinf (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
211 | ||
212 | ||
213 | extern int finite (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
214 | ||
215 | ||
216 | extern double drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
217 | ||
218 | ||
219 | ||
220 | extern double significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
221 | ||
222 | ||
223 | ||
224 | ||
225 | ||
226 | extern double copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
227 | ||
228 | ||
229 | ||
230 | ||
231 | ||
232 | ||
233 | extern double nan (__const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __nan (__const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
234 | ||
235 | ||
236 | ||
237 | ||
238 | ||
239 | extern int __isnan (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
240 | ||
241 | ||
242 | ||
243 | extern int isnan (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
244 | ||
245 | ||
246 | extern double j0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j0 (double) __attribute__ ((__nothrow__ , __leaf__)); | |
247 | extern double j1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j1 (double) __attribute__ ((__nothrow__ , __leaf__)); | |
248 | extern double jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); | |
249 | extern double y0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y0 (double) __attribute__ ((__nothrow__ , __leaf__)); | |
250 | extern double y1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y1 (double) __attribute__ ((__nothrow__ , __leaf__)); | |
251 | extern double yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); | |
252 | ||
253 | ||
254 | ||
255 | ||
256 | ||
257 | ||
258 | extern double erf (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erf (double) __attribute__ ((__nothrow__ , __leaf__)); | |
259 | extern double erfc (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erfc (double) __attribute__ ((__nothrow__ , __leaf__)); | |
260 | extern double lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); | |
261 | ||
262 | ||
263 | ||
264 | ||
265 | ||
266 | ||
267 | extern double tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); | |
268 | ||
269 | ||
270 | ||
271 | ||
272 | ||
273 | extern double gamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __gamma (double) __attribute__ ((__nothrow__ , __leaf__)); | |
274 | ||
275 | ||
276 | ||
277 | ||
278 | ||
279 | ||
280 | extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); | |
281 | ||
282 | ||
283 | ||
284 | ||
285 | ||
286 | ||
287 | ||
288 | extern double rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
289 | ||
290 | ||
291 | extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
292 | ||
293 | extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
294 | ||
295 | ||
296 | ||
297 | extern double remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
298 | ||
299 | ||
300 | ||
301 | extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); | |
302 | ||
303 | ||
304 | ||
305 | extern int ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
306 | ||
307 | ||
308 | ||
309 | ||
310 | extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); | |
311 | ||
312 | ||
313 | ||
314 | extern double nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
315 | ||
316 | ||
317 | ||
318 | extern double round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
319 | ||
320 | ||
321 | ||
322 | extern double trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
323 | ||
324 | ||
325 | ||
326 | ||
327 | extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); | |
328 | ||
329 | ||
330 | ||
331 | ||
332 | ||
333 | ||
334 | extern long int lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
335 | extern long long int llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
336 | ||
337 | ||
338 | ||
339 | extern long int lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
340 | extern long long int llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
341 | ||
342 | ||
343 | ||
344 | extern double fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
345 | ||
346 | ||
347 | extern double fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
348 | ||
349 | ||
350 | extern double fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
351 | ||
352 | ||
353 | ||
354 | extern int __fpclassify (double __value) __attribute__ ((__nothrow__ , __leaf__)) | |
355 | __attribute__ ((__const__)); | |
356 | ||
357 | ||
358 | extern int __signbit (double __value) __attribute__ ((__nothrow__ , __leaf__)) | |
359 | __attribute__ ((__const__)); | |
360 | ||
361 | ||
362 | ||
363 | extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); | |
364 | ||
365 | ||
366 | ||
367 | ||
368 | ||
369 | ||
370 | ||
371 | ||
372 | extern double scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); | |
373 | # 72 "/usr/include/math.h" 2 3 4 | |
374 | # 94 "/usr/include/math.h" 3 4 | |
375 | # 1 "/usr/include/bits/mathcalls.h" 1 3 4 | |
376 | # 53 "/usr/include/bits/mathcalls.h" 3 4 | |
377 | ||
378 | ||
379 | extern float acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
380 | ||
381 | extern float asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
382 | ||
383 | extern float atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
384 | ||
385 | extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
386 | ||
387 | ||
388 | extern float cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
389 | ||
390 | extern float sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
391 | ||
392 | extern float tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
393 | ||
394 | ||
395 | ||
396 | ||
397 | extern float coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
398 | ||
399 | extern float sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
400 | ||
401 | extern float tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
402 | ||
403 | ||
404 | ||
405 | ||
406 | extern void | |
407 | sincosf | |
408 | # 82 "/usr/include/bits/mathcalls.h" 3 4 | |
409 | (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void | |
410 | __sincosf | |
411 | # 82 "/usr/include/bits/mathcalls.h" 3 4 | |
412 | (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__)) | |
413 | ; | |
414 | ||
415 | ||
416 | ||
417 | ||
418 | ||
419 | extern float acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
420 | ||
421 | extern float asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
422 | ||
423 | extern float atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
424 | ||
425 | ||
426 | ||
427 | ||
428 | ||
429 | ||
430 | ||
431 | extern float expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
432 | ||
433 | ||
434 | extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); | |
435 | ||
436 | ||
437 | extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); | |
438 | ||
439 | ||
440 | extern float logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
441 | ||
442 | ||
443 | extern float log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
444 | ||
445 | ||
446 | extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)) | |
447 | __attribute__ ((__nonnull__ (2))); | |
448 | ||
449 | ||
450 | ||
451 | ||
452 | extern float exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
453 | ||
454 | extern float pow10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __pow10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
455 | ||
456 | ||
457 | ||
458 | ||
459 | ||
460 | extern float expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
461 | ||
462 | ||
463 | extern float log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
464 | ||
465 | ||
466 | extern float logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
467 | ||
468 | ||
469 | ||
470 | ||
471 | ||
472 | ||
473 | extern float exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
474 | ||
475 | ||
476 | extern float log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
477 | ||
478 | ||
479 | ||
480 | ||
481 | ||
482 | ||
483 | ||
484 | ||
485 | extern float powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); | |
486 | ||
487 | ||
488 | extern float sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
489 | ||
490 | ||
491 | ||
492 | ||
493 | ||
494 | extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); | |
495 | ||
496 | ||
497 | ||
498 | ||
499 | ||
500 | ||
501 | extern float cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
502 | ||
503 | ||
504 | ||
505 | ||
506 | ||
507 | ||
508 | ||
509 | ||
510 | extern float ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
511 | ||
512 | ||
513 | extern float fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
514 | ||
515 | ||
516 | extern float floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
517 | ||
518 | ||
519 | extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); | |
520 | ||
521 | ||
522 | ||
523 | ||
524 | extern int __isinff (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
525 | ||
526 | ||
527 | extern int __finitef (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
528 | ||
529 | ||
530 | ||
531 | ||
532 | ||
533 | extern int isinff (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
534 | ||
535 | ||
536 | extern int finitef (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
537 | ||
538 | ||
539 | extern float dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); | |
540 | ||
541 | ||
542 | ||
543 | extern float significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
544 | ||
545 | ||
546 | ||
547 | ||
548 | ||
549 | extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
550 | ||
551 | ||
552 | ||
553 | ||
554 | ||
555 | ||
556 | extern float nanf (__const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
557 | ||
558 | ||
559 | ||
560 | ||
561 | ||
562 | extern int __isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
563 | ||
564 | ||
565 | ||
566 | extern int isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
567 | ||
568 | ||
569 | extern float j0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j0f (float) __attribute__ ((__nothrow__ , __leaf__)); | |
570 | extern float j1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j1f (float) __attribute__ ((__nothrow__ , __leaf__)); | |
571 | extern float jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); | |
572 | extern float y0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y0f (float) __attribute__ ((__nothrow__ , __leaf__)); | |
573 | extern float y1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y1f (float) __attribute__ ((__nothrow__ , __leaf__)); | |
574 | extern float ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); | |
575 | ||
576 | ||
577 | ||
578 | ||
579 | ||
580 | ||
581 | extern float erff (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erff (float) __attribute__ ((__nothrow__ , __leaf__)); | |
582 | extern float erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); | |
583 | extern float lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); | |
584 | ||
585 | ||
586 | ||
587 | ||
588 | ||
589 | ||
590 | extern float tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); | |
591 | ||
592 | ||
593 | ||
594 | ||
595 | ||
596 | extern float gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); | |
597 | ||
598 | ||
599 | ||
600 | ||
601 | ||
602 | ||
603 | extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); | |
604 | ||
605 | ||
606 | ||
607 | ||
608 | ||
609 | ||
610 | ||
611 | extern float rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
612 | ||
613 | ||
614 | extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
615 | ||
616 | extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
617 | ||
618 | ||
619 | ||
620 | extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); | |
621 | ||
622 | ||
623 | ||
624 | extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); | |
625 | ||
626 | ||
627 | ||
628 | extern int ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
629 | ||
630 | ||
631 | ||
632 | ||
633 | extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); | |
634 | ||
635 | ||
636 | ||
637 | extern float nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
638 | ||
639 | ||
640 | ||
641 | extern float roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
642 | ||
643 | ||
644 | ||
645 | extern float truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
646 | ||
647 | ||
648 | ||
649 | ||
650 | extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); | |
651 | ||
652 | ||
653 | ||
654 | ||
655 | ||
656 | ||
657 | extern long int lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
658 | extern long long int llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
659 | ||
660 | ||
661 | ||
662 | extern long int lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
663 | extern long long int llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); | |
664 | ||
665 | ||
666 | ||
667 | extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); | |
668 | ||
669 | ||
670 | extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); | |
671 | ||
672 | ||
673 | extern float fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); | |
674 | ||
675 | ||
676 | ||
677 | extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__ , __leaf__)) | |
678 | __attribute__ ((__const__)); | |
679 | ||
680 | ||
681 | extern int __signbitf (float __value) __attribute__ ((__nothrow__ , __leaf__)) | |
682 | __attribute__ ((__const__)); | |
683 | ||
684 | ||
685 | ||
686 | extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); | |
687 | ||
688 | ||
689 | ||
690 | ||
691 | ||
692 | ||
693 | ||
694 | ||
695 | extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); | |
696 | # 95 "/usr/include/math.h" 2 3 4 | |
697 | # 143 "/usr/include/math.h" 3 4 | |
698 | # 1 "/usr/include/bits/mathcalls.h" 1 3 4 | |
699 | # 53 "/usr/include/bits/mathcalls.h" 3 4 | |
700 | ||
701 | ||
702 | extern long double acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
703 | ||
704 | extern long double asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
705 | ||
706 | extern long double atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
707 | ||
708 | extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
709 | ||
710 | ||
711 | extern long double cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
712 | ||
713 | extern long double sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
714 | ||
715 | extern long double tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
716 | ||
717 | ||
718 | ||
719 | ||
720 | extern long double coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
721 | ||
722 | extern long double sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
723 | ||
724 | extern long double tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
725 | ||
726 | ||
727 | ||
728 | ||
729 | extern void | |
730 | sincosl | |
731 | # 82 "/usr/include/bits/mathcalls.h" 3 4 | |
732 | (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void | |
733 | __sincosl | |
734 | # 82 "/usr/include/bits/mathcalls.h" 3 4 | |
735 | (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__)) | |
736 | ; | |
737 | ||
738 | ||
739 | ||
740 | ||
741 | ||
742 | extern long double acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
743 | ||
744 | extern long double asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
745 | ||
746 | extern long double atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
747 | ||
748 | ||
749 | ||
750 | ||
751 | ||
752 | ||
753 | ||
754 | extern long double expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
755 | ||
756 | ||
757 | extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); | |
758 | ||
759 | ||
760 | extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); | |
761 | ||
762 | ||
763 | extern long double logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
764 | ||
765 | ||
766 | extern long double log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
767 | ||
768 | ||
769 | extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) | |
770 | __attribute__ ((__nonnull__ (2))); | |
771 | ||
772 | ||
773 | ||
774 | ||
775 | extern long double exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
776 | ||
777 | extern long double pow10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __pow10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
778 | ||
779 | ||
780 | ||
781 | ||
782 | ||
783 | extern long double expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
784 | ||
785 | ||
786 | extern long double log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
787 | ||
788 | ||
789 | extern long double logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
790 | ||
791 | ||
792 | ||
793 | ||
794 | ||
795 | ||
796 | extern long double exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
797 | ||
798 | ||
799 | extern long double log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
800 | ||
801 | ||
802 | ||
803 | ||
804 | ||
805 | ||
806 | ||
807 | ||
808 | extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
809 | ||
810 | ||
811 | extern long double sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
812 | ||
813 | ||
814 | ||
815 | ||
816 | ||
817 | extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
818 | ||
819 | ||
820 | ||
821 | ||
822 | ||
823 | ||
824 | extern long double cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
825 | ||
826 | ||
827 | ||
828 | ||
829 | ||
830 | ||
831 | ||
832 | ||
833 | extern long double ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
834 | ||
835 | ||
836 | extern long double fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
837 | ||
838 | ||
839 | extern long double floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
840 | ||
841 | ||
842 | extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
843 | ||
844 | ||
845 | ||
846 | ||
847 | extern int __isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
848 | ||
849 | ||
850 | extern int __finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
851 | ||
852 | ||
853 | ||
854 | ||
855 | ||
856 | extern int isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
857 | ||
858 | ||
859 | extern int finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
860 | ||
861 | ||
862 | extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
863 | ||
864 | ||
865 | ||
866 | extern long double significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
867 | ||
868 | ||
869 | ||
870 | ||
871 | ||
872 | extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
873 | ||
874 | ||
875 | ||
876 | ||
877 | ||
878 | ||
879 | extern long double nanl (__const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
880 | ||
881 | ||
882 | ||
883 | ||
884 | ||
885 | extern int __isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
886 | ||
887 | ||
888 | ||
889 | extern int isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
890 | ||
891 | ||
892 | extern long double j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); | |
893 | extern long double j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); | |
894 | extern long double jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); | |
895 | extern long double y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); | |
896 | extern long double y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); | |
897 | extern long double ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); | |
898 | ||
899 | ||
900 | ||
901 | ||
902 | ||
903 | ||
904 | extern long double erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); | |
905 | extern long double erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); | |
906 | extern long double lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); | |
907 | ||
908 | ||
909 | ||
910 | ||
911 | ||
912 | ||
913 | extern long double tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); | |
914 | ||
915 | ||
916 | ||
917 | ||
918 | ||
919 | extern long double gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); | |
920 | ||
921 | ||
922 | ||
923 | ||
924 | ||
925 | ||
926 | extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); | |
927 | ||
928 | ||
929 | ||
930 | ||
931 | ||
932 | ||
933 | ||
934 | extern long double rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
935 | ||
936 | ||
937 | extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
938 | ||
939 | extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
940 | ||
941 | ||
942 | ||
943 | extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
944 | ||
945 | ||
946 | ||
947 | extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); | |
948 | ||
949 | ||
950 | ||
951 | extern int ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
952 | ||
953 | ||
954 | ||
955 | ||
956 | extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); | |
957 | ||
958 | ||
959 | ||
960 | extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
961 | ||
962 | ||
963 | ||
964 | extern long double roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
965 | ||
966 | ||
967 | ||
968 | extern long double truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
969 | ||
970 | ||
971 | ||
972 | ||
973 | extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); | |
974 | ||
975 | ||
976 | ||
977 | ||
978 | ||
979 | ||
980 | extern long int lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
981 | extern long long int llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
982 | ||
983 | ||
984 | ||
985 | extern long int lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
986 | extern long long int llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); | |
987 | ||
988 | ||
989 | ||
990 | extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
991 | ||
992 | ||
993 | extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
994 | ||
995 | ||
996 | extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); | |
997 | ||
998 | ||
999 | ||
1000 | extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) | |
1001 | __attribute__ ((__const__)); | |
1002 | ||
1003 | ||
1004 | extern int __signbitl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) | |
1005 | __attribute__ ((__const__)); | |
1006 | ||
1007 | ||
1008 | ||
1009 | extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); | |
1010 | ||
1011 | ||
1012 | ||
1013 | ||
1014 | ||
1015 | ||
1016 | ||
1017 | ||
1018 | extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); | |
1019 | # 144 "/usr/include/math.h" 2 3 4 | |
1020 | # 159 "/usr/include/math.h" 3 4 | |
1021 | extern int signgam; | |
1022 | # 200 "/usr/include/math.h" 3 4 | |
1023 | enum | |
1024 | { | |
1025 | FP_NAN, | |
1026 | ||
1027 | FP_INFINITE, | |
1028 | ||
1029 | FP_ZERO, | |
1030 | ||
1031 | FP_SUBNORMAL, | |
1032 | ||
1033 | FP_NORMAL | |
1034 | ||
1035 | }; | |
1036 | # 293 "/usr/include/math.h" 3 4 | |
1037 | typedef enum | |
1038 | { | |
1039 | _IEEE_ = -1, | |
1040 | _SVID_, | |
1041 | _XOPEN_, | |
1042 | _POSIX_, | |
1043 | _ISOC_ | |
1044 | } _LIB_VERSION_TYPE; | |
1045 | ||
1046 | ||
1047 | ||
1048 | ||
1049 | extern _LIB_VERSION_TYPE _LIB_VERSION; | |
1050 | # 318 "/usr/include/math.h" 3 4 | |
1051 | struct exception | |
1052 | ||
1053 | { | |
1054 | int type; | |
1055 | char *name; | |
1056 | double arg1; | |
1057 | double arg2; | |
1058 | double retval; | |
1059 | }; | |
1060 | ||
1061 | ||
1062 | ||
1063 | ||
1064 | extern int matherr (struct exception *__exc); | |
1065 | # 418 "/usr/include/math.h" 3 4 | |
1066 | # 1 "/usr/include/bits/mathinline.h" 1 3 4 | |
1067 | # 127 "/usr/include/bits/mathinline.h" 3 4 | |
1068 | extern __inline int | |
1069 | __attribute__ ((__nothrow__ , __leaf__)) __signbitf (float __x) | |
1070 | { | |
1071 | __extension__ union { float __f; int __i; } __u = { __f: __x }; | |
1072 | return __u.__i < 0; | |
1073 | } | |
1074 | extern __inline int | |
1075 | __attribute__ ((__nothrow__ , __leaf__)) __signbit (double __x) | |
1076 | { | |
1077 | __extension__ union { double __d; int __i[2]; } __u = { __d: __x }; | |
1078 | return __u.__i[1] < 0; | |
1079 | } | |
1080 | extern __inline int | |
1081 | __attribute__ ((__nothrow__ , __leaf__)) __signbitl (long double __x) | |
1082 | { | |
1083 | __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; | |
1084 | return (__u.__i[2] & 0x8000) != 0; | |
1085 | } | |
1086 | # 295 "/usr/include/bits/mathinline.h" 3 4 | |
1087 | extern __inline double __sgn (double) __attribute__ ((__nothrow__ , __leaf__)); extern __inline double __attribute__ ((__nothrow__ , __leaf__)) __sgn (double __x) { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } extern __inline float __sgnf (float) __attribute__ ((__nothrow__ , __leaf__)); extern __inline float __attribute__ ((__nothrow__ , __leaf__)) __sgnf (float __x) { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } extern __inline long double __sgnl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) __sgnl (long double __x) { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } | |
1088 | # 437 "/usr/include/bits/mathinline.h" 3 4 | |
1089 | extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) __atan2l (long double __y, long double __x) { return __builtin_atan2l (__y, __x); } | |
1090 | # 477 "/usr/include/bits/mathinline.h" 3 4 | |
1091 | extern __inline double __attribute__ ((__nothrow__ , __leaf__)) fabs (double __x) { return __builtin_fabs (__x); } | |
1092 | ||
1093 | extern __inline float __attribute__ ((__nothrow__ , __leaf__)) fabsf (float __x) { return __builtin_fabsf (__x); } | |
1094 | extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) fabsl (long double __x) { return __builtin_fabsl (__x); } | |
1095 | ||
1096 | extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) __fabsl (long double __x) { return __builtin_fabsl (__x); } | |
1097 | # 510 "/usr/include/bits/mathinline.h" 3 4 | |
1098 | extern __inline long double __sgn1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) __sgn1l (long double __x) { __extension__ union { long double __xld; unsigned int __xi[3]; } __n = { __xld: __x }; __n.__xi[2] = (__n.__xi[2] & 0x8000) | 0x3fff; __n.__xi[1] = 0x80000000; __n.__xi[0] = 0; return __n.__xld; } | |
1099 | # 534 "/usr/include/bits/mathinline.h" 3 4 | |
1100 | extern __inline double __attribute__ ((__nothrow__ , __leaf__)) floor (double __x) { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0400, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } extern __inline float __attribute__ ((__nothrow__ , __leaf__)) floorf (float __x) { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0400, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) floorl (long double __x) { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0400, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } | |
1101 | # 552 "/usr/include/bits/mathinline.h" 3 4 | |
1102 | extern __inline double __attribute__ ((__nothrow__ , __leaf__)) ceil (double __x) { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0800, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } extern __inline float __attribute__ ((__nothrow__ , __leaf__)) ceilf (float __x) { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0800, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) ceill (long double __x) { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0800, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } | |
1103 | # 669 "/usr/include/bits/mathinline.h" 3 4 | |
1104 | extern __inline long int | |
1105 | __attribute__ ((__nothrow__ , __leaf__)) lrintf (float __x) | |
1106 | { | |
1107 | long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres; | |
1108 | } | |
1109 | extern __inline long int | |
1110 | __attribute__ ((__nothrow__ , __leaf__)) lrint (double __x) | |
1111 | { | |
1112 | long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres; | |
1113 | } | |
1114 | extern __inline long int | |
1115 | __attribute__ ((__nothrow__ , __leaf__)) lrintl (long double __x) | |
1116 | { | |
1117 | long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres; | |
1118 | } | |
1119 | # 692 "/usr/include/bits/mathinline.h" 3 4 | |
1120 | extern __inline long long int | |
1121 | __attribute__ ((__nothrow__ , __leaf__)) llrintf (float __x) | |
1122 | { | |
1123 | long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres; | |
1124 | } | |
1125 | extern __inline long long int | |
1126 | __attribute__ ((__nothrow__ , __leaf__)) llrint (double __x) | |
1127 | { | |
1128 | long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres; | |
1129 | } | |
1130 | extern __inline long long int | |
1131 | __attribute__ ((__nothrow__ , __leaf__)) llrintl (long double __x) | |
1132 | { | |
1133 | long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres; | |
1134 | } | |
1135 | # 729 "/usr/include/bits/mathinline.h" 3 4 | |
1136 | extern __inline int | |
1137 | __attribute__ ((__nothrow__ , __leaf__)) __finite (double __x) | |
1138 | { | |
1139 | return (__extension__ | |
1140 | (((((union { double __d; int __i[2]; }) {__d: __x}).__i[1] | |
1141 | | 0x800fffffu) + 1) >> 31)); | |
1142 | } | |
1143 | # 419 "/usr/include/math.h" 2 3 4 | |
1144 | # 480 "/usr/include/math.h" 3 4 | |
1145 | ||
1146 | # 21 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
1147 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 1 | |
1148 | # 22 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" | |
1149 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config.h" 1 | |
1150 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config-host.h" 1 | |
1151 | # 2 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config.h" 2 | |
1152 | # 1 "./config-target.h" 1 | |
1153 | # 2 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config.h" 2 | |
1154 | # 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 | |
1155 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 1 | |
1156 | ||
1157 | ||
1158 | ||
1159 | ||
1160 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/compiler.h" 1 | |
1161 | ||
1162 | ||
1163 | ||
1164 | ||
1165 | ||
1166 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config-host.h" 1 | |
1167 | # 7 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/compiler.h" 2 | |
1168 | # 6 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
1169 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config-host.h" 1 | |
1170 | # 7 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
1171 | ||
1172 | ||
1173 | ||
1174 | ||
1175 | ||
1176 | ||
1177 | ||
1178 | typedef struct QEMUTimer QEMUTimer; | |
1179 | typedef struct QEMUFile QEMUFile; | |
1180 | typedef struct DeviceState DeviceState; | |
1181 | ||
1182 | struct Monitor; | |
1183 | typedef struct Monitor Monitor; | |
1184 | ||
1185 | ||
1186 | # 1 "/usr/include/stdlib.h" 1 3 4 | |
1187 | # 33 "/usr/include/stdlib.h" 3 4 | |
1188 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
1189 | # 212 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 3 4 | |
1190 | typedef unsigned int size_t; | |
1191 | # 324 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 3 4 | |
1192 | typedef int wchar_t; | |
1193 | # 34 "/usr/include/stdlib.h" 2 3 4 | |
1194 | ||
1195 | ||
1196 | ||
1197 | ||
1198 | ||
1199 | ||
1200 | ||
1201 | ||
1202 | # 1 "/usr/include/bits/waitflags.h" 1 3 4 | |
1203 | # 43 "/usr/include/stdlib.h" 2 3 4 | |
1204 | # 1 "/usr/include/bits/waitstatus.h" 1 3 4 | |
1205 | # 65 "/usr/include/bits/waitstatus.h" 3 4 | |
1206 | # 1 "/usr/include/endian.h" 1 3 4 | |
1207 | # 37 "/usr/include/endian.h" 3 4 | |
1208 | # 1 "/usr/include/bits/endian.h" 1 3 4 | |
1209 | # 38 "/usr/include/endian.h" 2 3 4 | |
1210 | # 61 "/usr/include/endian.h" 3 4 | |
1211 | # 1 "/usr/include/bits/byteswap.h" 1 3 4 | |
1212 | # 62 "/usr/include/endian.h" 2 3 4 | |
1213 | # 66 "/usr/include/bits/waitstatus.h" 2 3 4 | |
1214 | ||
1215 | union wait | |
1216 | { | |
1217 | int w_status; | |
1218 | struct | |
1219 | { | |
1220 | ||
1221 | unsigned int __w_termsig:7; | |
1222 | unsigned int __w_coredump:1; | |
1223 | unsigned int __w_retcode:8; | |
1224 | unsigned int:16; | |
1225 | ||
1226 | ||
1227 | ||
1228 | ||
1229 | ||
1230 | ||
1231 | ||
1232 | } __wait_terminated; | |
1233 | struct | |
1234 | { | |
1235 | ||
1236 | unsigned int __w_stopval:8; | |
1237 | unsigned int __w_stopsig:8; | |
1238 | unsigned int:16; | |
1239 | ||
1240 | ||
1241 | ||
1242 | ||
1243 | ||
1244 | ||
1245 | } __wait_stopped; | |
1246 | }; | |
1247 | # 44 "/usr/include/stdlib.h" 2 3 4 | |
1248 | # 68 "/usr/include/stdlib.h" 3 4 | |
1249 | typedef union | |
1250 | { | |
1251 | union wait *__uptr; | |
1252 | int *__iptr; | |
1253 | } __WAIT_STATUS __attribute__ ((__transparent_union__)); | |
1254 | # 96 "/usr/include/stdlib.h" 3 4 | |
1255 | ||
1256 | ||
1257 | typedef struct | |
1258 | { | |
1259 | int quot; | |
1260 | int rem; | |
1261 | } div_t; | |
1262 | ||
1263 | ||
1264 | ||
1265 | typedef struct | |
1266 | { | |
1267 | long int quot; | |
1268 | long int rem; | |
1269 | } ldiv_t; | |
1270 | ||
1271 | ||
1272 | ||
1273 | ||
1274 | ||
1275 | ||
1276 | ||
1277 | __extension__ typedef struct | |
1278 | { | |
1279 | long long int quot; | |
1280 | long long int rem; | |
1281 | } lldiv_t; | |
1282 | ||
1283 | ||
1284 | # 140 "/usr/include/stdlib.h" 3 4 | |
1285 | extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
1286 | ||
1287 | ||
1288 | ||
1289 | ||
1290 | extern double atof (__const char *__nptr) | |
1291 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1292 | ||
1293 | extern int atoi (__const char *__nptr) | |
1294 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1295 | ||
1296 | extern long int atol (__const char *__nptr) | |
1297 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1298 | ||
1299 | ||
1300 | ||
1301 | ||
1302 | ||
1303 | __extension__ extern long long int atoll (__const char *__nptr) | |
1304 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1305 | ||
1306 | ||
1307 | ||
1308 | ||
1309 | ||
1310 | extern double strtod (__const char *__restrict __nptr, | |
1311 | char **__restrict __endptr) | |
1312 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1313 | ||
1314 | ||
1315 | ||
1316 | ||
1317 | ||
1318 | extern float strtof (__const char *__restrict __nptr, | |
1319 | char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1320 | ||
1321 | extern long double strtold (__const char *__restrict __nptr, | |
1322 | char **__restrict __endptr) | |
1323 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1324 | ||
1325 | ||
1326 | ||
1327 | ||
1328 | ||
1329 | extern long int strtol (__const char *__restrict __nptr, | |
1330 | char **__restrict __endptr, int __base) | |
1331 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1332 | ||
1333 | extern unsigned long int strtoul (__const char *__restrict __nptr, | |
1334 | char **__restrict __endptr, int __base) | |
1335 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1336 | ||
1337 | ||
1338 | ||
1339 | ||
1340 | __extension__ | |
1341 | extern long long int strtoq (__const char *__restrict __nptr, | |
1342 | char **__restrict __endptr, int __base) | |
1343 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1344 | ||
1345 | __extension__ | |
1346 | extern unsigned long long int strtouq (__const char *__restrict __nptr, | |
1347 | char **__restrict __endptr, int __base) | |
1348 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1349 | ||
1350 | ||
1351 | ||
1352 | ||
1353 | ||
1354 | __extension__ | |
1355 | extern long long int strtoll (__const char *__restrict __nptr, | |
1356 | char **__restrict __endptr, int __base) | |
1357 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1358 | ||
1359 | __extension__ | |
1360 | extern unsigned long long int strtoull (__const char *__restrict __nptr, | |
1361 | char **__restrict __endptr, int __base) | |
1362 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1363 | ||
1364 | # 236 "/usr/include/stdlib.h" 3 4 | |
1365 | # 1 "/usr/include/xlocale.h" 1 3 4 | |
1366 | # 28 "/usr/include/xlocale.h" 3 4 | |
1367 | typedef struct __locale_struct | |
1368 | { | |
1369 | ||
1370 | struct __locale_data *__locales[13]; | |
1371 | ||
1372 | ||
1373 | const unsigned short int *__ctype_b; | |
1374 | const int *__ctype_tolower; | |
1375 | const int *__ctype_toupper; | |
1376 | ||
1377 | ||
1378 | const char *__names[13]; | |
1379 | } *__locale_t; | |
1380 | ||
1381 | ||
1382 | typedef __locale_t locale_t; | |
1383 | # 237 "/usr/include/stdlib.h" 2 3 4 | |
1384 | ||
1385 | ||
1386 | ||
1387 | extern long int strtol_l (__const char *__restrict __nptr, | |
1388 | char **__restrict __endptr, int __base, | |
1389 | __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); | |
1390 | ||
1391 | extern unsigned long int strtoul_l (__const char *__restrict __nptr, | |
1392 | char **__restrict __endptr, | |
1393 | int __base, __locale_t __loc) | |
1394 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); | |
1395 | ||
1396 | __extension__ | |
1397 | extern long long int strtoll_l (__const char *__restrict __nptr, | |
1398 | char **__restrict __endptr, int __base, | |
1399 | __locale_t __loc) | |
1400 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); | |
1401 | ||
1402 | __extension__ | |
1403 | extern unsigned long long int strtoull_l (__const char *__restrict __nptr, | |
1404 | char **__restrict __endptr, | |
1405 | int __base, __locale_t __loc) | |
1406 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); | |
1407 | ||
1408 | extern double strtod_l (__const char *__restrict __nptr, | |
1409 | char **__restrict __endptr, __locale_t __loc) | |
1410 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); | |
1411 | ||
1412 | extern float strtof_l (__const char *__restrict __nptr, | |
1413 | char **__restrict __endptr, __locale_t __loc) | |
1414 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); | |
1415 | ||
1416 | extern long double strtold_l (__const char *__restrict __nptr, | |
1417 | char **__restrict __endptr, | |
1418 | __locale_t __loc) | |
1419 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); | |
1420 | ||
1421 | ||
1422 | ||
1423 | ||
1424 | ||
1425 | extern __inline double | |
1426 | __attribute__ ((__nothrow__ , __leaf__)) atof (__const char *__nptr) | |
1427 | { | |
1428 | return strtod (__nptr, (char **) ((void *)0)); | |
1429 | } | |
1430 | extern __inline int | |
1431 | __attribute__ ((__nothrow__ , __leaf__)) atoi (__const char *__nptr) | |
1432 | { | |
1433 | return (int) strtol (__nptr, (char **) ((void *)0), 10); | |
1434 | } | |
1435 | extern __inline long int | |
1436 | __attribute__ ((__nothrow__ , __leaf__)) atol (__const char *__nptr) | |
1437 | { | |
1438 | return strtol (__nptr, (char **) ((void *)0), 10); | |
1439 | } | |
1440 | ||
1441 | ||
1442 | ||
1443 | ||
1444 | __extension__ extern __inline long long int | |
1445 | __attribute__ ((__nothrow__ , __leaf__)) atoll (__const char *__nptr) | |
1446 | { | |
1447 | return strtoll (__nptr, (char **) ((void *)0), 10); | |
1448 | } | |
1449 | ||
1450 | # 311 "/usr/include/stdlib.h" 3 4 | |
1451 | extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
1452 | ||
1453 | ||
1454 | extern long int a64l (__const char *__s) | |
1455 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
1456 | ||
1457 | ||
1458 | ||
1459 | ||
1460 | # 1 "/usr/include/sys/types.h" 1 3 4 | |
1461 | # 28 "/usr/include/sys/types.h" 3 4 | |
1462 | ||
1463 | ||
1464 | # 1 "/usr/include/bits/types.h" 1 3 4 | |
1465 | # 28 "/usr/include/bits/types.h" 3 4 | |
1466 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
1467 | # 29 "/usr/include/bits/types.h" 2 3 4 | |
1468 | ||
1469 | ||
1470 | typedef unsigned char __u_char; | |
1471 | typedef unsigned short int __u_short; | |
1472 | typedef unsigned int __u_int; | |
1473 | typedef unsigned long int __u_long; | |
1474 | ||
1475 | ||
1476 | typedef signed char __int8_t; | |
1477 | typedef unsigned char __uint8_t; | |
1478 | typedef signed short int __int16_t; | |
1479 | typedef unsigned short int __uint16_t; | |
1480 | typedef signed int __int32_t; | |
1481 | typedef unsigned int __uint32_t; | |
1482 | ||
1483 | ||
1484 | ||
1485 | ||
1486 | __extension__ typedef signed long long int __int64_t; | |
1487 | __extension__ typedef unsigned long long int __uint64_t; | |
1488 | ||
1489 | ||
1490 | ||
1491 | ||
1492 | ||
1493 | ||
1494 | ||
1495 | __extension__ typedef long long int __quad_t; | |
1496 | __extension__ typedef unsigned long long int __u_quad_t; | |
1497 | # 131 "/usr/include/bits/types.h" 3 4 | |
1498 | # 1 "/usr/include/bits/typesizes.h" 1 3 4 | |
1499 | # 132 "/usr/include/bits/types.h" 2 3 4 | |
1500 | ||
1501 | ||
1502 | __extension__ typedef __u_quad_t __dev_t; | |
1503 | __extension__ typedef unsigned int __uid_t; | |
1504 | __extension__ typedef unsigned int __gid_t; | |
1505 | __extension__ typedef unsigned long int __ino_t; | |
1506 | __extension__ typedef __u_quad_t __ino64_t; | |
1507 | __extension__ typedef unsigned int __mode_t; | |
1508 | __extension__ typedef unsigned int __nlink_t; | |
1509 | __extension__ typedef long int __off_t; | |
1510 | __extension__ typedef __quad_t __off64_t; | |
1511 | __extension__ typedef int __pid_t; | |
1512 | __extension__ typedef struct { int __val[2]; } __fsid_t; | |
1513 | __extension__ typedef long int __clock_t; | |
1514 | __extension__ typedef unsigned long int __rlim_t; | |
1515 | __extension__ typedef __u_quad_t __rlim64_t; | |
1516 | __extension__ typedef unsigned int __id_t; | |
1517 | __extension__ typedef long int __time_t; | |
1518 | __extension__ typedef unsigned int __useconds_t; | |
1519 | __extension__ typedef long int __suseconds_t; | |
1520 | ||
1521 | __extension__ typedef int __daddr_t; | |
1522 | __extension__ typedef long int __swblk_t; | |
1523 | __extension__ typedef int __key_t; | |
1524 | ||
1525 | ||
1526 | __extension__ typedef int __clockid_t; | |
1527 | ||
1528 | ||
1529 | __extension__ typedef void * __timer_t; | |
1530 | ||
1531 | ||
1532 | __extension__ typedef long int __blksize_t; | |
1533 | ||
1534 | ||
1535 | ||
1536 | ||
1537 | __extension__ typedef long int __blkcnt_t; | |
1538 | __extension__ typedef __quad_t __blkcnt64_t; | |
1539 | ||
1540 | ||
1541 | __extension__ typedef unsigned long int __fsblkcnt_t; | |
1542 | __extension__ typedef __u_quad_t __fsblkcnt64_t; | |
1543 | ||
1544 | ||
1545 | __extension__ typedef unsigned long int __fsfilcnt_t; | |
1546 | __extension__ typedef __u_quad_t __fsfilcnt64_t; | |
1547 | ||
1548 | __extension__ typedef int __ssize_t; | |
1549 | ||
1550 | ||
1551 | ||
1552 | typedef __off64_t __loff_t; | |
1553 | typedef __quad_t *__qaddr_t; | |
1554 | typedef char *__caddr_t; | |
1555 | ||
1556 | ||
1557 | __extension__ typedef int __intptr_t; | |
1558 | ||
1559 | ||
1560 | __extension__ typedef unsigned int __socklen_t; | |
1561 | # 31 "/usr/include/sys/types.h" 2 3 4 | |
1562 | ||
1563 | ||
1564 | ||
1565 | typedef __u_char u_char; | |
1566 | typedef __u_short u_short; | |
1567 | typedef __u_int u_int; | |
1568 | typedef __u_long u_long; | |
1569 | typedef __quad_t quad_t; | |
1570 | typedef __u_quad_t u_quad_t; | |
1571 | typedef __fsid_t fsid_t; | |
1572 | ||
1573 | ||
1574 | ||
1575 | ||
1576 | typedef __loff_t loff_t; | |
1577 | ||
1578 | ||
1579 | ||
1580 | ||
1581 | ||
1582 | typedef __ino64_t ino_t; | |
1583 | ||
1584 | ||
1585 | ||
1586 | ||
1587 | typedef __ino64_t ino64_t; | |
1588 | ||
1589 | ||
1590 | ||
1591 | ||
1592 | typedef __dev_t dev_t; | |
1593 | ||
1594 | ||
1595 | ||
1596 | ||
1597 | typedef __gid_t gid_t; | |
1598 | ||
1599 | ||
1600 | ||
1601 | ||
1602 | typedef __mode_t mode_t; | |
1603 | ||
1604 | ||
1605 | ||
1606 | ||
1607 | typedef __nlink_t nlink_t; | |
1608 | ||
1609 | ||
1610 | ||
1611 | ||
1612 | typedef __uid_t uid_t; | |
1613 | ||
1614 | ||
1615 | ||
1616 | ||
1617 | ||
1618 | ||
1619 | ||
1620 | typedef __off64_t off_t; | |
1621 | ||
1622 | ||
1623 | ||
1624 | ||
1625 | typedef __off64_t off64_t; | |
1626 | ||
1627 | ||
1628 | ||
1629 | ||
1630 | typedef __pid_t pid_t; | |
1631 | ||
1632 | ||
1633 | ||
1634 | ||
1635 | ||
1636 | typedef __id_t id_t; | |
1637 | ||
1638 | ||
1639 | ||
1640 | ||
1641 | typedef __ssize_t ssize_t; | |
1642 | ||
1643 | ||
1644 | ||
1645 | ||
1646 | ||
1647 | typedef __daddr_t daddr_t; | |
1648 | typedef __caddr_t caddr_t; | |
1649 | ||
1650 | ||
1651 | ||
1652 | ||
1653 | ||
1654 | typedef __key_t key_t; | |
1655 | # 133 "/usr/include/sys/types.h" 3 4 | |
1656 | # 1 "/usr/include/time.h" 1 3 4 | |
1657 | # 58 "/usr/include/time.h" 3 4 | |
1658 | ||
1659 | ||
1660 | typedef __clock_t clock_t; | |
1661 | ||
1662 | ||
1663 | ||
1664 | # 74 "/usr/include/time.h" 3 4 | |
1665 | ||
1666 | ||
1667 | typedef __time_t time_t; | |
1668 | ||
1669 | ||
1670 | ||
1671 | # 92 "/usr/include/time.h" 3 4 | |
1672 | typedef __clockid_t clockid_t; | |
1673 | # 104 "/usr/include/time.h" 3 4 | |
1674 | typedef __timer_t timer_t; | |
1675 | # 134 "/usr/include/sys/types.h" 2 3 4 | |
1676 | ||
1677 | ||
1678 | ||
1679 | typedef __useconds_t useconds_t; | |
1680 | ||
1681 | ||
1682 | ||
1683 | typedef __suseconds_t suseconds_t; | |
1684 | ||
1685 | ||
1686 | ||
1687 | ||
1688 | ||
1689 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
1690 | # 148 "/usr/include/sys/types.h" 2 3 4 | |
1691 | ||
1692 | ||
1693 | ||
1694 | typedef unsigned long int ulong; | |
1695 | typedef unsigned short int ushort; | |
1696 | typedef unsigned int uint; | |
1697 | # 195 "/usr/include/sys/types.h" 3 4 | |
1698 | typedef int int8_t __attribute__ ((__mode__ (__QI__))); | |
1699 | typedef int int16_t __attribute__ ((__mode__ (__HI__))); | |
1700 | typedef int int32_t __attribute__ ((__mode__ (__SI__))); | |
1701 | typedef int int64_t __attribute__ ((__mode__ (__DI__))); | |
1702 | ||
1703 | ||
1704 | typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); | |
1705 | typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); | |
1706 | typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); | |
1707 | typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); | |
1708 | ||
1709 | typedef int register_t __attribute__ ((__mode__ (__word__))); | |
1710 | # 220 "/usr/include/sys/types.h" 3 4 | |
1711 | # 1 "/usr/include/sys/select.h" 1 3 4 | |
1712 | # 31 "/usr/include/sys/select.h" 3 4 | |
1713 | # 1 "/usr/include/bits/select.h" 1 3 4 | |
1714 | # 32 "/usr/include/sys/select.h" 2 3 4 | |
1715 | ||
1716 | ||
1717 | # 1 "/usr/include/bits/sigset.h" 1 3 4 | |
1718 | # 24 "/usr/include/bits/sigset.h" 3 4 | |
1719 | typedef int __sig_atomic_t; | |
1720 | ||
1721 | ||
1722 | ||
1723 | ||
1724 | typedef struct | |
1725 | { | |
1726 | unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; | |
1727 | } __sigset_t; | |
1728 | # 35 "/usr/include/sys/select.h" 2 3 4 | |
1729 | ||
1730 | ||
1731 | ||
1732 | typedef __sigset_t sigset_t; | |
1733 | ||
1734 | ||
1735 | ||
1736 | ||
1737 | ||
1738 | # 1 "/usr/include/time.h" 1 3 4 | |
1739 | # 120 "/usr/include/time.h" 3 4 | |
1740 | struct timespec | |
1741 | { | |
1742 | __time_t tv_sec; | |
1743 | long int tv_nsec; | |
1744 | }; | |
1745 | # 45 "/usr/include/sys/select.h" 2 3 4 | |
1746 | ||
1747 | # 1 "/usr/include/bits/time.h" 1 3 4 | |
1748 | # 31 "/usr/include/bits/time.h" 3 4 | |
1749 | struct timeval | |
1750 | { | |
1751 | __time_t tv_sec; | |
1752 | __suseconds_t tv_usec; | |
1753 | }; | |
1754 | # 47 "/usr/include/sys/select.h" 2 3 4 | |
1755 | # 55 "/usr/include/sys/select.h" 3 4 | |
1756 | typedef long int __fd_mask; | |
1757 | # 65 "/usr/include/sys/select.h" 3 4 | |
1758 | typedef struct | |
1759 | { | |
1760 | ||
1761 | ||
1762 | ||
1763 | __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; | |
1764 | ||
1765 | ||
1766 | ||
1767 | ||
1768 | ||
1769 | } fd_set; | |
1770 | ||
1771 | ||
1772 | ||
1773 | ||
1774 | ||
1775 | ||
1776 | typedef __fd_mask fd_mask; | |
1777 | # 97 "/usr/include/sys/select.h" 3 4 | |
1778 | ||
1779 | # 107 "/usr/include/sys/select.h" 3 4 | |
1780 | extern int select (int __nfds, fd_set *__restrict __readfds, | |
1781 | fd_set *__restrict __writefds, | |
1782 | fd_set *__restrict __exceptfds, | |
1783 | struct timeval *__restrict __timeout); | |
1784 | # 119 "/usr/include/sys/select.h" 3 4 | |
1785 | extern int pselect (int __nfds, fd_set *__restrict __readfds, | |
1786 | fd_set *__restrict __writefds, | |
1787 | fd_set *__restrict __exceptfds, | |
1788 | const struct timespec *__restrict __timeout, | |
1789 | const __sigset_t *__restrict __sigmask); | |
1790 | ||
1791 | ||
1792 | ||
1793 | ||
1794 | ||
1795 | # 1 "/usr/include/bits/select2.h" 1 3 4 | |
1796 | # 25 "/usr/include/bits/select2.h" 3 4 | |
1797 | extern long int __fdelt_chk (long int __d); | |
1798 | extern long int __fdelt_warn (long int __d) | |
1799 | __attribute__((__warning__ ("bit outside of fd_set selected"))); | |
1800 | # 130 "/usr/include/sys/select.h" 2 3 4 | |
1801 | ||
1802 | ||
1803 | ||
1804 | # 221 "/usr/include/sys/types.h" 2 3 4 | |
1805 | ||
1806 | ||
1807 | # 1 "/usr/include/sys/sysmacros.h" 1 3 4 | |
1808 | # 30 "/usr/include/sys/sysmacros.h" 3 4 | |
1809 | ||
1810 | ||
1811 | __extension__ | |
1812 | extern unsigned int gnu_dev_major (unsigned long long int __dev) | |
1813 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
1814 | __extension__ | |
1815 | extern unsigned int gnu_dev_minor (unsigned long long int __dev) | |
1816 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
1817 | __extension__ | |
1818 | extern unsigned long long int gnu_dev_makedev (unsigned int __major, | |
1819 | unsigned int __minor) | |
1820 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
1821 | ||
1822 | ||
1823 | __extension__ extern __inline __attribute__ ((__const__)) unsigned int | |
1824 | __attribute__ ((__nothrow__ , __leaf__)) gnu_dev_major (unsigned long long int __dev) | |
1825 | { | |
1826 | return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); | |
1827 | } | |
1828 | ||
1829 | __extension__ extern __inline __attribute__ ((__const__)) unsigned int | |
1830 | __attribute__ ((__nothrow__ , __leaf__)) gnu_dev_minor (unsigned long long int __dev) | |
1831 | { | |
1832 | return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); | |
1833 | } | |
1834 | ||
1835 | __extension__ extern __inline __attribute__ ((__const__)) unsigned long long int | |
1836 | __attribute__ ((__nothrow__ , __leaf__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) | |
1837 | { | |
1838 | return ((__minor & 0xff) | ((__major & 0xfff) << 8) | |
1839 | | (((unsigned long long int) (__minor & ~0xff)) << 12) | |
1840 | | (((unsigned long long int) (__major & ~0xfff)) << 32)); | |
1841 | } | |
1842 | ||
1843 | ||
1844 | # 224 "/usr/include/sys/types.h" 2 3 4 | |
1845 | ||
1846 | ||
1847 | ||
1848 | ||
1849 | ||
1850 | typedef __blksize_t blksize_t; | |
1851 | # 249 "/usr/include/sys/types.h" 3 4 | |
1852 | typedef __blkcnt64_t blkcnt_t; | |
1853 | ||
1854 | ||
1855 | ||
1856 | typedef __fsblkcnt64_t fsblkcnt_t; | |
1857 | ||
1858 | ||
1859 | ||
1860 | typedef __fsfilcnt64_t fsfilcnt_t; | |
1861 | ||
1862 | ||
1863 | ||
1864 | ||
1865 | ||
1866 | typedef __blkcnt64_t blkcnt64_t; | |
1867 | typedef __fsblkcnt64_t fsblkcnt64_t; | |
1868 | typedef __fsfilcnt64_t fsfilcnt64_t; | |
1869 | ||
1870 | ||
1871 | ||
1872 | ||
1873 | ||
1874 | # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 | |
1875 | # 36 "/usr/include/bits/pthreadtypes.h" 3 4 | |
1876 | typedef unsigned long int pthread_t; | |
1877 | ||
1878 | ||
1879 | typedef union | |
1880 | { | |
1881 | char __size[36]; | |
1882 | long int __align; | |
1883 | } pthread_attr_t; | |
1884 | ||
1885 | ||
1886 | typedef struct __pthread_internal_slist | |
1887 | { | |
1888 | struct __pthread_internal_slist *__next; | |
1889 | } __pthread_slist_t; | |
1890 | ||
1891 | ||
1892 | ||
1893 | ||
1894 | typedef union | |
1895 | { | |
1896 | struct __pthread_mutex_s | |
1897 | { | |
1898 | int __lock; | |
1899 | unsigned int __count; | |
1900 | int __owner; | |
1901 | ||
1902 | ||
1903 | int __kind; | |
1904 | unsigned int __nusers; | |
1905 | __extension__ union | |
1906 | { | |
1907 | int __spins; | |
1908 | __pthread_slist_t __list; | |
1909 | }; | |
1910 | } __data; | |
1911 | char __size[24]; | |
1912 | long int __align; | |
1913 | } pthread_mutex_t; | |
1914 | ||
1915 | typedef union | |
1916 | { | |
1917 | char __size[4]; | |
1918 | long int __align; | |
1919 | } pthread_mutexattr_t; | |
1920 | ||
1921 | ||
1922 | ||
1923 | ||
1924 | typedef union | |
1925 | { | |
1926 | struct | |
1927 | { | |
1928 | int __lock; | |
1929 | unsigned int __futex; | |
1930 | __extension__ unsigned long long int __total_seq; | |
1931 | __extension__ unsigned long long int __wakeup_seq; | |
1932 | __extension__ unsigned long long int __woken_seq; | |
1933 | void *__mutex; | |
1934 | unsigned int __nwaiters; | |
1935 | unsigned int __broadcast_seq; | |
1936 | } __data; | |
1937 | char __size[48]; | |
1938 | __extension__ long long int __align; | |
1939 | } pthread_cond_t; | |
1940 | ||
1941 | typedef union | |
1942 | { | |
1943 | char __size[4]; | |
1944 | long int __align; | |
1945 | } pthread_condattr_t; | |
1946 | ||
1947 | ||
1948 | ||
1949 | typedef unsigned int pthread_key_t; | |
1950 | ||
1951 | ||
1952 | ||
1953 | typedef int pthread_once_t; | |
1954 | ||
1955 | ||
1956 | ||
1957 | ||
1958 | ||
1959 | typedef union | |
1960 | { | |
1961 | struct | |
1962 | { | |
1963 | int __lock; | |
1964 | unsigned int __nr_readers; | |
1965 | unsigned int __readers_wakeup; | |
1966 | unsigned int __writer_wakeup; | |
1967 | unsigned int __nr_readers_queued; | |
1968 | unsigned int __nr_writers_queued; | |
1969 | ||
1970 | ||
1971 | unsigned char __flags; | |
1972 | unsigned char __shared; | |
1973 | unsigned char __pad1; | |
1974 | unsigned char __pad2; | |
1975 | int __writer; | |
1976 | } __data; | |
1977 | char __size[32]; | |
1978 | long int __align; | |
1979 | } pthread_rwlock_t; | |
1980 | ||
1981 | typedef union | |
1982 | { | |
1983 | char __size[8]; | |
1984 | long int __align; | |
1985 | } pthread_rwlockattr_t; | |
1986 | ||
1987 | ||
1988 | ||
1989 | ||
1990 | ||
1991 | typedef volatile int pthread_spinlock_t; | |
1992 | ||
1993 | ||
1994 | ||
1995 | ||
1996 | typedef union | |
1997 | { | |
1998 | char __size[20]; | |
1999 | long int __align; | |
2000 | } pthread_barrier_t; | |
2001 | ||
2002 | typedef union | |
2003 | { | |
2004 | char __size[4]; | |
2005 | int __align; | |
2006 | } pthread_barrierattr_t; | |
2007 | # 272 "/usr/include/sys/types.h" 2 3 4 | |
2008 | ||
2009 | ||
2010 | ||
2011 | # 321 "/usr/include/stdlib.h" 2 3 4 | |
2012 | ||
2013 | ||
2014 | ||
2015 | ||
2016 | ||
2017 | ||
2018 | extern long int random (void) __attribute__ ((__nothrow__ , __leaf__)); | |
2019 | ||
2020 | ||
2021 | extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); | |
2022 | ||
2023 | ||
2024 | ||
2025 | ||
2026 | ||
2027 | extern char *initstate (unsigned int __seed, char *__statebuf, | |
2028 | size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
2029 | ||
2030 | ||
2031 | ||
2032 | extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2033 | ||
2034 | ||
2035 | ||
2036 | ||
2037 | ||
2038 | ||
2039 | ||
2040 | struct random_data | |
2041 | { | |
2042 | int32_t *fptr; | |
2043 | int32_t *rptr; | |
2044 | int32_t *state; | |
2045 | int rand_type; | |
2046 | int rand_deg; | |
2047 | int rand_sep; | |
2048 | int32_t *end_ptr; | |
2049 | }; | |
2050 | ||
2051 | extern int random_r (struct random_data *__restrict __buf, | |
2052 | int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
2053 | ||
2054 | extern int srandom_r (unsigned int __seed, struct random_data *__buf) | |
2055 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
2056 | ||
2057 | extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, | |
2058 | size_t __statelen, | |
2059 | struct random_data *__restrict __buf) | |
2060 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); | |
2061 | ||
2062 | extern int setstate_r (char *__restrict __statebuf, | |
2063 | struct random_data *__restrict __buf) | |
2064 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
2065 | ||
2066 | ||
2067 | ||
2068 | ||
2069 | ||
2070 | ||
2071 | extern int rand (void) __attribute__ ((__nothrow__ , __leaf__)); | |
2072 | ||
2073 | extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); | |
2074 | ||
2075 | ||
2076 | ||
2077 | ||
2078 | extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__)); | |
2079 | ||
2080 | ||
2081 | ||
2082 | ||
2083 | ||
2084 | ||
2085 | ||
2086 | extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__)); | |
2087 | extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2088 | ||
2089 | ||
2090 | extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); | |
2091 | extern long int nrand48 (unsigned short int __xsubi[3]) | |
2092 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2093 | ||
2094 | ||
2095 | extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); | |
2096 | extern long int jrand48 (unsigned short int __xsubi[3]) | |
2097 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2098 | ||
2099 | ||
2100 | extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__)); | |
2101 | extern unsigned short int *seed48 (unsigned short int __seed16v[3]) | |
2102 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2103 | extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2104 | ||
2105 | ||
2106 | ||
2107 | ||
2108 | ||
2109 | struct drand48_data | |
2110 | { | |
2111 | unsigned short int __x[3]; | |
2112 | unsigned short int __old_x[3]; | |
2113 | unsigned short int __c; | |
2114 | unsigned short int __init; | |
2115 | unsigned long long int __a; | |
2116 | }; | |
2117 | ||
2118 | ||
2119 | extern int drand48_r (struct drand48_data *__restrict __buffer, | |
2120 | double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
2121 | extern int erand48_r (unsigned short int __xsubi[3], | |
2122 | struct drand48_data *__restrict __buffer, | |
2123 | double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
2124 | ||
2125 | ||
2126 | extern int lrand48_r (struct drand48_data *__restrict __buffer, | |
2127 | long int *__restrict __result) | |
2128 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
2129 | extern int nrand48_r (unsigned short int __xsubi[3], | |
2130 | struct drand48_data *__restrict __buffer, | |
2131 | long int *__restrict __result) | |
2132 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
2133 | ||
2134 | ||
2135 | extern int mrand48_r (struct drand48_data *__restrict __buffer, | |
2136 | long int *__restrict __result) | |
2137 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
2138 | extern int jrand48_r (unsigned short int __xsubi[3], | |
2139 | struct drand48_data *__restrict __buffer, | |
2140 | long int *__restrict __result) | |
2141 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
2142 | ||
2143 | ||
2144 | extern int srand48_r (long int __seedval, struct drand48_data *__buffer) | |
2145 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
2146 | ||
2147 | extern int seed48_r (unsigned short int __seed16v[3], | |
2148 | struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
2149 | ||
2150 | extern int lcong48_r (unsigned short int __param[7], | |
2151 | struct drand48_data *__buffer) | |
2152 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
2153 | ||
2154 | ||
2155 | ||
2156 | ||
2157 | ||
2158 | ||
2159 | ||
2160 | ||
2161 | ||
2162 | extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); | |
2163 | ||
2164 | extern void *calloc (size_t __nmemb, size_t __size) | |
2165 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); | |
2166 | ||
2167 | ||
2168 | ||
2169 | ||
2170 | ||
2171 | ||
2172 | ||
2173 | ||
2174 | ||
2175 | ||
2176 | extern void *realloc (void *__ptr, size_t __size) | |
2177 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
2178 | ||
2179 | extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); | |
2180 | ||
2181 | ||
2182 | ||
2183 | ||
2184 | extern void cfree (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); | |
2185 | ||
2186 | ||
2187 | ||
2188 | # 1 "/usr/include/alloca.h" 1 3 4 | |
2189 | # 25 "/usr/include/alloca.h" 3 4 | |
2190 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
2191 | # 26 "/usr/include/alloca.h" 2 3 4 | |
2192 | ||
2193 | ||
2194 | ||
2195 | ||
2196 | ||
2197 | ||
2198 | ||
2199 | extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__)); | |
2200 | ||
2201 | ||
2202 | ||
2203 | ||
2204 | ||
2205 | ||
2206 | # 498 "/usr/include/stdlib.h" 2 3 4 | |
2207 | ||
2208 | ||
2209 | ||
2210 | ||
2211 | ||
2212 | extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); | |
2213 | ||
2214 | ||
2215 | ||
2216 | ||
2217 | extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) | |
2218 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2219 | ||
2220 | ||
2221 | ||
2222 | ||
2223 | extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); | |
2224 | ||
2225 | ||
2226 | ||
2227 | extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2228 | # 528 "/usr/include/stdlib.h" 3 4 | |
2229 | extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2230 | ||
2231 | ||
2232 | ||
2233 | ||
2234 | ||
2235 | ||
2236 | ||
2237 | extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) | |
2238 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2239 | ||
2240 | ||
2241 | ||
2242 | ||
2243 | ||
2244 | ||
2245 | extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); | |
2246 | ||
2247 | ||
2248 | ||
2249 | ||
2250 | ||
2251 | ||
2252 | ||
2253 | extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); | |
2254 | ||
2255 | ||
2256 | ||
2257 | ||
2258 | ||
2259 | ||
2260 | ||
2261 | extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); | |
2262 | ||
2263 | ||
2264 | ||
2265 | ||
2266 | ||
2267 | ||
2268 | extern char *getenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2269 | ||
2270 | ||
2271 | ||
2272 | ||
2273 | extern char *__secure_getenv (__const char *__name) | |
2274 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2275 | ||
2276 | ||
2277 | ||
2278 | ||
2279 | ||
2280 | extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2281 | ||
2282 | ||
2283 | ||
2284 | ||
2285 | ||
2286 | extern int setenv (__const char *__name, __const char *__value, int __replace) | |
2287 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
2288 | ||
2289 | ||
2290 | extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2291 | ||
2292 | ||
2293 | ||
2294 | ||
2295 | ||
2296 | ||
2297 | extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__)); | |
2298 | # 606 "/usr/include/stdlib.h" 3 4 | |
2299 | extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2300 | # 623 "/usr/include/stdlib.h" 3 4 | |
2301 | extern int mkstemp (char *__template) __asm__ ("" "mkstemp64") | |
2302 | __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2303 | ||
2304 | ||
2305 | ||
2306 | ||
2307 | ||
2308 | extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2309 | # 645 "/usr/include/stdlib.h" 3 4 | |
2310 | extern int mkstemps (char *__template, int __suffixlen) __asm__ ("" "mkstemps64") | |
2311 | __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2312 | ||
2313 | ||
2314 | ||
2315 | ||
2316 | ||
2317 | extern int mkstemps64 (char *__template, int __suffixlen) | |
2318 | __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2319 | # 663 "/usr/include/stdlib.h" 3 4 | |
2320 | extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2321 | # 677 "/usr/include/stdlib.h" 3 4 | |
2322 | extern int mkostemp (char *__template, int __flags) __asm__ ("" "mkostemp64") | |
2323 | __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2324 | ||
2325 | ||
2326 | ||
2327 | ||
2328 | ||
2329 | extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2330 | # 698 "/usr/include/stdlib.h" 3 4 | |
2331 | extern int mkostemps (char *__template, int __suffixlen, int __flags) __asm__ ("" "mkostemps64") | |
2332 | ||
2333 | __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2334 | ||
2335 | ||
2336 | ||
2337 | ||
2338 | ||
2339 | extern int mkostemps64 (char *__template, int __suffixlen, int __flags) | |
2340 | __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2341 | ||
2342 | ||
2343 | ||
2344 | ||
2345 | ||
2346 | ||
2347 | ||
2348 | ||
2349 | ||
2350 | extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); | |
2351 | ||
2352 | ||
2353 | ||
2354 | ||
2355 | ||
2356 | ||
2357 | extern char *canonicalize_file_name (__const char *__name) | |
2358 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2359 | # 734 "/usr/include/stdlib.h" 3 4 | |
2360 | extern char *realpath (__const char *__restrict __name, | |
2361 | char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
2362 | ||
2363 | ||
2364 | ||
2365 | ||
2366 | ||
2367 | ||
2368 | typedef int (*__compar_fn_t) (__const void *, __const void *); | |
2369 | ||
2370 | ||
2371 | typedef __compar_fn_t comparison_fn_t; | |
2372 | ||
2373 | ||
2374 | ||
2375 | typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); | |
2376 | ||
2377 | ||
2378 | ||
2379 | ||
2380 | ||
2381 | extern void *bsearch (__const void *__key, __const void *__base, | |
2382 | size_t __nmemb, size_t __size, __compar_fn_t __compar) | |
2383 | __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); | |
2384 | ||
2385 | ||
2386 | ||
2387 | extern void qsort (void *__base, size_t __nmemb, size_t __size, | |
2388 | __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); | |
2389 | ||
2390 | extern void qsort_r (void *__base, size_t __nmemb, size_t __size, | |
2391 | __compar_d_fn_t __compar, void *__arg) | |
2392 | __attribute__ ((__nonnull__ (1, 4))); | |
2393 | ||
2394 | ||
2395 | ||
2396 | ||
2397 | extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); | |
2398 | extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); | |
2399 | ||
2400 | ||
2401 | ||
2402 | __extension__ extern long long int llabs (long long int __x) | |
2403 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); | |
2404 | ||
2405 | ||
2406 | ||
2407 | ||
2408 | ||
2409 | ||
2410 | ||
2411 | extern div_t div (int __numer, int __denom) | |
2412 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); | |
2413 | extern ldiv_t ldiv (long int __numer, long int __denom) | |
2414 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); | |
2415 | ||
2416 | ||
2417 | ||
2418 | ||
2419 | __extension__ extern lldiv_t lldiv (long long int __numer, | |
2420 | long long int __denom) | |
2421 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); | |
2422 | ||
2423 | # 808 "/usr/include/stdlib.h" 3 4 | |
2424 | extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, | |
2425 | int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); | |
2426 | ||
2427 | ||
2428 | ||
2429 | ||
2430 | extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, | |
2431 | int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); | |
2432 | ||
2433 | ||
2434 | ||
2435 | ||
2436 | extern char *gcvt (double __value, int __ndigit, char *__buf) | |
2437 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); | |
2438 | ||
2439 | ||
2440 | ||
2441 | ||
2442 | extern char *qecvt (long double __value, int __ndigit, | |
2443 | int *__restrict __decpt, int *__restrict __sign) | |
2444 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); | |
2445 | extern char *qfcvt (long double __value, int __ndigit, | |
2446 | int *__restrict __decpt, int *__restrict __sign) | |
2447 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); | |
2448 | extern char *qgcvt (long double __value, int __ndigit, char *__buf) | |
2449 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); | |
2450 | ||
2451 | ||
2452 | ||
2453 | ||
2454 | extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, | |
2455 | int *__restrict __sign, char *__restrict __buf, | |
2456 | size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); | |
2457 | extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, | |
2458 | int *__restrict __sign, char *__restrict __buf, | |
2459 | size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); | |
2460 | ||
2461 | extern int qecvt_r (long double __value, int __ndigit, | |
2462 | int *__restrict __decpt, int *__restrict __sign, | |
2463 | char *__restrict __buf, size_t __len) | |
2464 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); | |
2465 | extern int qfcvt_r (long double __value, int __ndigit, | |
2466 | int *__restrict __decpt, int *__restrict __sign, | |
2467 | char *__restrict __buf, size_t __len) | |
2468 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); | |
2469 | ||
2470 | ||
2471 | ||
2472 | ||
2473 | ||
2474 | ||
2475 | ||
2476 | extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
2477 | ||
2478 | ||
2479 | extern int mbtowc (wchar_t *__restrict __pwc, | |
2480 | __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
2481 | ||
2482 | ||
2483 | extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
2484 | ||
2485 | ||
2486 | ||
2487 | extern size_t mbstowcs (wchar_t *__restrict __pwcs, | |
2488 | __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); | |
2489 | ||
2490 | extern size_t wcstombs (char *__restrict __s, | |
2491 | __const wchar_t *__restrict __pwcs, size_t __n) | |
2492 | __attribute__ ((__nothrow__ , __leaf__)); | |
2493 | ||
2494 | ||
2495 | ||
2496 | ||
2497 | ||
2498 | ||
2499 | ||
2500 | ||
2501 | extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
2502 | # 896 "/usr/include/stdlib.h" 3 4 | |
2503 | extern int getsubopt (char **__restrict __optionp, | |
2504 | char *__const *__restrict __tokens, | |
2505 | char **__restrict __valuep) | |
2506 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); | |
2507 | ||
2508 | ||
2509 | ||
2510 | ||
2511 | ||
2512 | extern void setkey (__const char *__key) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2513 | ||
2514 | ||
2515 | ||
2516 | ||
2517 | ||
2518 | ||
2519 | ||
2520 | extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); | |
2521 | ||
2522 | ||
2523 | ||
2524 | ||
2525 | ||
2526 | ||
2527 | ||
2528 | extern int grantpt (int __fd) __attribute__ ((__nothrow__ , __leaf__)); | |
2529 | ||
2530 | ||
2531 | ||
2532 | extern int unlockpt (int __fd) __attribute__ ((__nothrow__ , __leaf__)); | |
2533 | ||
2534 | ||
2535 | ||
2536 | ||
2537 | extern char *ptsname (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
2538 | ||
2539 | ||
2540 | ||
2541 | ||
2542 | ||
2543 | ||
2544 | extern int ptsname_r (int __fd, char *__buf, size_t __buflen) | |
2545 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
2546 | ||
2547 | ||
2548 | extern int getpt (void); | |
2549 | ||
2550 | ||
2551 | ||
2552 | ||
2553 | ||
2554 | ||
2555 | extern int getloadavg (double __loadavg[], int __nelem) | |
2556 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
2557 | ||
2558 | ||
2559 | ||
2560 | ||
2561 | ||
2562 | # 1 "/usr/include/bits/stdlib.h" 1 3 4 | |
2563 | # 24 "/usr/include/bits/stdlib.h" 3 4 | |
2564 | extern char *__realpath_chk (__const char *__restrict __name, | |
2565 | char *__restrict __resolved, | |
2566 | size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
2567 | extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__)) | |
2568 | ||
2569 | __attribute__ ((__warn_unused_result__)); | |
2570 | extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__)) | |
2571 | ||
2572 | ||
2573 | __attribute__ ((__warn_unused_result__)) | |
2574 | __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) | |
2575 | ; | |
2576 | ||
2577 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * | |
2578 | __attribute__ ((__nothrow__ , __leaf__)) realpath (__const char *__restrict __name, char *__restrict __resolved) | |
2579 | { | |
2580 | if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) | |
2581 | { | |
2582 | ||
2583 | ||
2584 | ||
2585 | ||
2586 | return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); | |
2587 | } | |
2588 | ||
2589 | return __realpath_alias (__name, __resolved); | |
2590 | } | |
2591 | ||
2592 | ||
2593 | extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, | |
2594 | size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
2595 | extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__)) | |
2596 | ||
2597 | __attribute__ ((__nonnull__ (2))); | |
2598 | extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__)) | |
2599 | ||
2600 | ||
2601 | __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) | |
2602 | ; | |
2603 | ||
2604 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
2605 | __attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen) | |
2606 | { | |
2607 | if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) | |
2608 | { | |
2609 | if (!__builtin_constant_p (__buflen)) | |
2610 | return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); | |
2611 | if (__buflen > __builtin_object_size (__buf, 2 > 1)) | |
2612 | return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); | |
2613 | } | |
2614 | return __ptsname_r_alias (__fd, __buf, __buflen); | |
2615 | } | |
2616 | ||
2617 | ||
2618 | extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) | |
2619 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
2620 | extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__)) | |
2621 | __attribute__ ((__warn_unused_result__)); | |
2622 | ||
2623 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int | |
2624 | __attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar) | |
2625 | { | |
2626 | ||
2627 | ||
2628 | ||
2629 | ||
2630 | ||
2631 | ||
2632 | ||
2633 | if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) | |
2634 | return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); | |
2635 | return __wctomb_alias (__s, __wchar); | |
2636 | } | |
2637 | ||
2638 | ||
2639 | extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, | |
2640 | __const char *__restrict __src, | |
2641 | size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__)); | |
2642 | extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__)) | |
2643 | ||
2644 | ||
2645 | ; | |
2646 | extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__)) | |
2647 | ||
2648 | ||
2649 | ||
2650 | __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) | |
2651 | ; | |
2652 | ||
2653 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t | |
2654 | __attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) | |
2655 | ||
2656 | { | |
2657 | if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) | |
2658 | { | |
2659 | if (!__builtin_constant_p (__len)) | |
2660 | return __mbstowcs_chk (__dst, __src, __len, | |
2661 | __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); | |
2662 | ||
2663 | if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) | |
2664 | return __mbstowcs_chk_warn (__dst, __src, __len, | |
2665 | __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); | |
2666 | } | |
2667 | return __mbstowcs_alias (__dst, __src, __len); | |
2668 | } | |
2669 | ||
2670 | ||
2671 | extern size_t __wcstombs_chk (char *__restrict __dst, | |
2672 | __const wchar_t *__restrict __src, | |
2673 | size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__)); | |
2674 | extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__)) | |
2675 | ||
2676 | ||
2677 | ; | |
2678 | extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__)) | |
2679 | ||
2680 | ||
2681 | ||
2682 | __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); | |
2683 | ||
2684 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t | |
2685 | __attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) | |
2686 | ||
2687 | { | |
2688 | if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) | |
2689 | { | |
2690 | if (!__builtin_constant_p (__len)) | |
2691 | return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); | |
2692 | if (__len > __builtin_object_size (__dst, 2 > 1)) | |
2693 | return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); | |
2694 | } | |
2695 | return __wcstombs_alias (__dst, __src, __len); | |
2696 | } | |
2697 | # 956 "/usr/include/stdlib.h" 2 3 4 | |
2698 | # 964 "/usr/include/stdlib.h" 3 4 | |
2699 | ||
2700 | # 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
2701 | # 1 "/usr/include/stdio.h" 1 3 4 | |
2702 | # 30 "/usr/include/stdio.h" 3 4 | |
2703 | ||
2704 | ||
2705 | ||
2706 | ||
2707 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
2708 | # 35 "/usr/include/stdio.h" 2 3 4 | |
2709 | # 45 "/usr/include/stdio.h" 3 4 | |
2710 | struct _IO_FILE; | |
2711 | ||
2712 | ||
2713 | ||
2714 | typedef struct _IO_FILE FILE; | |
2715 | ||
2716 | ||
2717 | ||
2718 | ||
2719 | ||
2720 | # 65 "/usr/include/stdio.h" 3 4 | |
2721 | typedef struct _IO_FILE __FILE; | |
2722 | # 75 "/usr/include/stdio.h" 3 4 | |
2723 | # 1 "/usr/include/libio.h" 1 3 4 | |
2724 | # 32 "/usr/include/libio.h" 3 4 | |
2725 | # 1 "/usr/include/_G_config.h" 1 3 4 | |
2726 | # 15 "/usr/include/_G_config.h" 3 4 | |
2727 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
2728 | # 16 "/usr/include/_G_config.h" 2 3 4 | |
2729 | ||
2730 | ||
2731 | ||
2732 | ||
2733 | # 1 "/usr/include/wchar.h" 1 3 4 | |
2734 | # 83 "/usr/include/wchar.h" 3 4 | |
2735 | typedef struct | |
2736 | { | |
2737 | int __count; | |
2738 | union | |
2739 | { | |
2740 | ||
2741 | unsigned int __wch; | |
2742 | ||
2743 | ||
2744 | ||
2745 | char __wchb[4]; | |
2746 | } __value; | |
2747 | } __mbstate_t; | |
2748 | # 21 "/usr/include/_G_config.h" 2 3 4 | |
2749 | ||
2750 | typedef struct | |
2751 | { | |
2752 | __off_t __pos; | |
2753 | __mbstate_t __state; | |
2754 | } _G_fpos_t; | |
2755 | typedef struct | |
2756 | { | |
2757 | __off64_t __pos; | |
2758 | __mbstate_t __state; | |
2759 | } _G_fpos64_t; | |
2760 | # 53 "/usr/include/_G_config.h" 3 4 | |
2761 | typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); | |
2762 | typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); | |
2763 | typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); | |
2764 | typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); | |
2765 | # 33 "/usr/include/libio.h" 2 3 4 | |
2766 | # 53 "/usr/include/libio.h" 3 4 | |
2767 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stdarg.h" 1 3 4 | |
2768 | # 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stdarg.h" 3 4 | |
2769 | typedef __builtin_va_list __gnuc_va_list; | |
2770 | # 54 "/usr/include/libio.h" 2 3 4 | |
2771 | # 172 "/usr/include/libio.h" 3 4 | |
2772 | struct _IO_jump_t; struct _IO_FILE; | |
2773 | # 182 "/usr/include/libio.h" 3 4 | |
2774 | typedef void _IO_lock_t; | |
2775 | ||
2776 | ||
2777 | ||
2778 | ||
2779 | ||
2780 | struct _IO_marker { | |
2781 | struct _IO_marker *_next; | |
2782 | struct _IO_FILE *_sbuf; | |
2783 | ||
2784 | ||
2785 | ||
2786 | int _pos; | |
2787 | # 205 "/usr/include/libio.h" 3 4 | |
2788 | }; | |
2789 | ||
2790 | ||
2791 | enum __codecvt_result | |
2792 | { | |
2793 | __codecvt_ok, | |
2794 | __codecvt_partial, | |
2795 | __codecvt_error, | |
2796 | __codecvt_noconv | |
2797 | }; | |
2798 | # 273 "/usr/include/libio.h" 3 4 | |
2799 | struct _IO_FILE { | |
2800 | int _flags; | |
2801 | ||
2802 | ||
2803 | ||
2804 | ||
2805 | char* _IO_read_ptr; | |
2806 | char* _IO_read_end; | |
2807 | char* _IO_read_base; | |
2808 | char* _IO_write_base; | |
2809 | char* _IO_write_ptr; | |
2810 | char* _IO_write_end; | |
2811 | char* _IO_buf_base; | |
2812 | char* _IO_buf_end; | |
2813 | ||
2814 | char *_IO_save_base; | |
2815 | char *_IO_backup_base; | |
2816 | char *_IO_save_end; | |
2817 | ||
2818 | struct _IO_marker *_markers; | |
2819 | ||
2820 | struct _IO_FILE *_chain; | |
2821 | ||
2822 | int _fileno; | |
2823 | ||
2824 | ||
2825 | ||
2826 | int _flags2; | |
2827 | ||
2828 | __off_t _old_offset; | |
2829 | ||
2830 | ||
2831 | ||
2832 | unsigned short _cur_column; | |
2833 | signed char _vtable_offset; | |
2834 | char _shortbuf[1]; | |
2835 | ||
2836 | ||
2837 | ||
2838 | _IO_lock_t *_lock; | |
2839 | # 321 "/usr/include/libio.h" 3 4 | |
2840 | __off64_t _offset; | |
2841 | # 330 "/usr/include/libio.h" 3 4 | |
2842 | void *__pad1; | |
2843 | void *__pad2; | |
2844 | void *__pad3; | |
2845 | void *__pad4; | |
2846 | size_t __pad5; | |
2847 | ||
2848 | int _mode; | |
2849 | ||
2850 | char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; | |
2851 | ||
2852 | }; | |
2853 | ||
2854 | ||
2855 | typedef struct _IO_FILE _IO_FILE; | |
2856 | ||
2857 | ||
2858 | struct _IO_FILE_plus; | |
2859 | ||
2860 | extern struct _IO_FILE_plus _IO_2_1_stdin_; | |
2861 | extern struct _IO_FILE_plus _IO_2_1_stdout_; | |
2862 | extern struct _IO_FILE_plus _IO_2_1_stderr_; | |
2863 | # 366 "/usr/include/libio.h" 3 4 | |
2864 | typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); | |
2865 | ||
2866 | ||
2867 | ||
2868 | ||
2869 | ||
2870 | ||
2871 | ||
2872 | typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, | |
2873 | size_t __n); | |
2874 | ||
2875 | ||
2876 | ||
2877 | ||
2878 | ||
2879 | ||
2880 | ||
2881 | typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); | |
2882 | ||
2883 | ||
2884 | typedef int __io_close_fn (void *__cookie); | |
2885 | ||
2886 | ||
2887 | ||
2888 | ||
2889 | typedef __io_read_fn cookie_read_function_t; | |
2890 | typedef __io_write_fn cookie_write_function_t; | |
2891 | typedef __io_seek_fn cookie_seek_function_t; | |
2892 | typedef __io_close_fn cookie_close_function_t; | |
2893 | ||
2894 | ||
2895 | typedef struct | |
2896 | { | |
2897 | __io_read_fn *read; | |
2898 | __io_write_fn *write; | |
2899 | __io_seek_fn *seek; | |
2900 | __io_close_fn *close; | |
2901 | } _IO_cookie_io_functions_t; | |
2902 | typedef _IO_cookie_io_functions_t cookie_io_functions_t; | |
2903 | ||
2904 | struct _IO_cookie_file; | |
2905 | ||
2906 | ||
2907 | extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, | |
2908 | void *__cookie, _IO_cookie_io_functions_t __fns); | |
2909 | ||
2910 | ||
2911 | ||
2912 | ||
2913 | ||
2914 | ||
2915 | ||
2916 | extern int __underflow (_IO_FILE *); | |
2917 | extern int __uflow (_IO_FILE *); | |
2918 | extern int __overflow (_IO_FILE *, int); | |
2919 | # 462 "/usr/include/libio.h" 3 4 | |
2920 | extern int _IO_getc (_IO_FILE *__fp); | |
2921 | extern int _IO_putc (int __c, _IO_FILE *__fp); | |
2922 | extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__)); | |
2923 | extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__)); | |
2924 | ||
2925 | extern int _IO_peekc_locked (_IO_FILE *__fp); | |
2926 | ||
2927 | ||
2928 | ||
2929 | ||
2930 | ||
2931 | extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); | |
2932 | extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); | |
2933 | extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); | |
2934 | # 492 "/usr/include/libio.h" 3 4 | |
2935 | extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, | |
2936 | __gnuc_va_list, int *__restrict); | |
2937 | extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, | |
2938 | __gnuc_va_list); | |
2939 | extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); | |
2940 | extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); | |
2941 | ||
2942 | extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); | |
2943 | extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); | |
2944 | ||
2945 | extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); | |
2946 | # 76 "/usr/include/stdio.h" 2 3 4 | |
2947 | ||
2948 | ||
2949 | ||
2950 | ||
2951 | typedef __gnuc_va_list va_list; | |
2952 | # 109 "/usr/include/stdio.h" 3 4 | |
2953 | ||
2954 | ||
2955 | ||
2956 | ||
2957 | typedef _G_fpos64_t fpos_t; | |
2958 | ||
2959 | ||
2960 | ||
2961 | typedef _G_fpos64_t fpos64_t; | |
2962 | # 165 "/usr/include/stdio.h" 3 4 | |
2963 | # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 | |
2964 | # 166 "/usr/include/stdio.h" 2 3 4 | |
2965 | ||
2966 | ||
2967 | ||
2968 | extern struct _IO_FILE *stdin; | |
2969 | extern struct _IO_FILE *stdout; | |
2970 | extern struct _IO_FILE *stderr; | |
2971 | ||
2972 | ||
2973 | ||
2974 | ||
2975 | ||
2976 | ||
2977 | ||
2978 | extern int remove (__const char *__filename) __attribute__ ((__nothrow__ , __leaf__)); | |
2979 | ||
2980 | extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__ , __leaf__)); | |
2981 | ||
2982 | ||
2983 | ||
2984 | ||
2985 | extern int renameat (int __oldfd, __const char *__old, int __newfd, | |
2986 | __const char *__new) __attribute__ ((__nothrow__ , __leaf__)); | |
2987 | ||
2988 | ||
2989 | ||
2990 | # 199 "/usr/include/stdio.h" 3 4 | |
2991 | extern FILE *tmpfile (void) __asm__ ("" "tmpfile64") __attribute__ ((__warn_unused_result__)); | |
2992 | ||
2993 | ||
2994 | ||
2995 | ||
2996 | ||
2997 | ||
2998 | extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); | |
2999 | ||
3000 | ||
3001 | ||
3002 | extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3003 | ||
3004 | ||
3005 | ||
3006 | ||
3007 | ||
3008 | extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3009 | # 228 "/usr/include/stdio.h" 3 4 | |
3010 | extern char *tempnam (__const char *__dir, __const char *__pfx) | |
3011 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); | |
3012 | ||
3013 | ||
3014 | ||
3015 | ||
3016 | ||
3017 | ||
3018 | ||
3019 | ||
3020 | extern int fclose (FILE *__stream); | |
3021 | ||
3022 | ||
3023 | ||
3024 | ||
3025 | extern int fflush (FILE *__stream); | |
3026 | ||
3027 | # 253 "/usr/include/stdio.h" 3 4 | |
3028 | extern int fflush_unlocked (FILE *__stream); | |
3029 | # 263 "/usr/include/stdio.h" 3 4 | |
3030 | extern int fcloseall (void); | |
3031 | ||
3032 | ||
3033 | ||
3034 | ||
3035 | # 284 "/usr/include/stdio.h" 3 4 | |
3036 | extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __asm__ ("" "fopen64") | |
3037 | ||
3038 | __attribute__ ((__warn_unused_result__)); | |
3039 | extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("" "freopen64") | |
3040 | ||
3041 | ||
3042 | __attribute__ ((__warn_unused_result__)); | |
3043 | ||
3044 | ||
3045 | ||
3046 | ||
3047 | ||
3048 | ||
3049 | ||
3050 | extern FILE *fopen64 (__const char *__restrict __filename, | |
3051 | __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); | |
3052 | extern FILE *freopen64 (__const char *__restrict __filename, | |
3053 | __const char *__restrict __modes, | |
3054 | FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); | |
3055 | ||
3056 | ||
3057 | ||
3058 | ||
3059 | extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3060 | ||
3061 | ||
3062 | ||
3063 | ||
3064 | ||
3065 | extern FILE *fopencookie (void *__restrict __magic_cookie, | |
3066 | __const char *__restrict __modes, | |
3067 | _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3068 | ||
3069 | ||
3070 | ||
3071 | ||
3072 | extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) | |
3073 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3074 | ||
3075 | ||
3076 | ||
3077 | ||
3078 | extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3079 | ||
3080 | ||
3081 | ||
3082 | ||
3083 | ||
3084 | ||
3085 | extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); | |
3086 | ||
3087 | ||
3088 | ||
3089 | extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, | |
3090 | int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); | |
3091 | ||
3092 | ||
3093 | ||
3094 | ||
3095 | ||
3096 | extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, | |
3097 | size_t __size) __attribute__ ((__nothrow__ , __leaf__)); | |
3098 | ||
3099 | ||
3100 | extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); | |
3101 | ||
3102 | ||
3103 | ||
3104 | ||
3105 | ||
3106 | ||
3107 | ||
3108 | ||
3109 | extern int fprintf (FILE *__restrict __stream, | |
3110 | __const char *__restrict __format, ...); | |
3111 | ||
3112 | ||
3113 | ||
3114 | ||
3115 | extern int printf (__const char *__restrict __format, ...); | |
3116 | ||
3117 | extern int sprintf (char *__restrict __s, | |
3118 | __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); | |
3119 | ||
3120 | ||
3121 | ||
3122 | ||
3123 | ||
3124 | extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, | |
3125 | __gnuc_va_list __arg); | |
3126 | ||
3127 | ||
3128 | ||
3129 | ||
3130 | extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); | |
3131 | ||
3132 | extern int vsprintf (char *__restrict __s, __const char *__restrict __format, | |
3133 | __gnuc_va_list __arg) __attribute__ ((__nothrow__)); | |
3134 | ||
3135 | ||
3136 | ||
3137 | ||
3138 | ||
3139 | extern int snprintf (char *__restrict __s, size_t __maxlen, | |
3140 | __const char *__restrict __format, ...) | |
3141 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); | |
3142 | ||
3143 | extern int vsnprintf (char *__restrict __s, size_t __maxlen, | |
3144 | __const char *__restrict __format, __gnuc_va_list __arg) | |
3145 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); | |
3146 | ||
3147 | ||
3148 | ||
3149 | ||
3150 | ||
3151 | ||
3152 | extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, | |
3153 | __gnuc_va_list __arg) | |
3154 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); | |
3155 | extern int __asprintf (char **__restrict __ptr, | |
3156 | __const char *__restrict __fmt, ...) | |
3157 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); | |
3158 | extern int asprintf (char **__restrict __ptr, | |
3159 | __const char *__restrict __fmt, ...) | |
3160 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); | |
3161 | # 418 "/usr/include/stdio.h" 3 4 | |
3162 | extern int vdprintf (int __fd, __const char *__restrict __fmt, | |
3163 | __gnuc_va_list __arg) | |
3164 | __attribute__ ((__format__ (__printf__, 2, 0))); | |
3165 | extern int dprintf (int __fd, __const char *__restrict __fmt, ...) | |
3166 | __attribute__ ((__format__ (__printf__, 2, 3))); | |
3167 | ||
3168 | ||
3169 | ||
3170 | ||
3171 | ||
3172 | ||
3173 | ||
3174 | ||
3175 | extern int fscanf (FILE *__restrict __stream, | |
3176 | __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); | |
3177 | ||
3178 | ||
3179 | ||
3180 | ||
3181 | extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); | |
3182 | ||
3183 | extern int sscanf (__const char *__restrict __s, | |
3184 | __const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); | |
3185 | # 469 "/usr/include/stdio.h" 3 4 | |
3186 | ||
3187 | ||
3188 | ||
3189 | ||
3190 | ||
3191 | ||
3192 | ||
3193 | ||
3194 | extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, | |
3195 | __gnuc_va_list __arg) | |
3196 | __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); | |
3197 | ||
3198 | ||
3199 | ||
3200 | ||
3201 | ||
3202 | extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) | |
3203 | __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); | |
3204 | ||
3205 | ||
3206 | extern int vsscanf (__const char *__restrict __s, | |
3207 | __const char *__restrict __format, __gnuc_va_list __arg) | |
3208 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0))); | |
3209 | # 528 "/usr/include/stdio.h" 3 4 | |
3210 | ||
3211 | ||
3212 | ||
3213 | ||
3214 | ||
3215 | ||
3216 | ||
3217 | ||
3218 | ||
3219 | extern int fgetc (FILE *__stream); | |
3220 | extern int getc (FILE *__stream); | |
3221 | ||
3222 | ||
3223 | ||
3224 | ||
3225 | ||
3226 | extern int getchar (void); | |
3227 | ||
3228 | # 556 "/usr/include/stdio.h" 3 4 | |
3229 | extern int getc_unlocked (FILE *__stream); | |
3230 | extern int getchar_unlocked (void); | |
3231 | # 567 "/usr/include/stdio.h" 3 4 | |
3232 | extern int fgetc_unlocked (FILE *__stream); | |
3233 | ||
3234 | ||
3235 | ||
3236 | ||
3237 | ||
3238 | ||
3239 | ||
3240 | ||
3241 | ||
3242 | ||
3243 | ||
3244 | extern int fputc (int __c, FILE *__stream); | |
3245 | extern int putc (int __c, FILE *__stream); | |
3246 | ||
3247 | ||
3248 | ||
3249 | ||
3250 | ||
3251 | extern int putchar (int __c); | |
3252 | ||
3253 | # 600 "/usr/include/stdio.h" 3 4 | |
3254 | extern int fputc_unlocked (int __c, FILE *__stream); | |
3255 | ||
3256 | ||
3257 | ||
3258 | ||
3259 | ||
3260 | ||
3261 | ||
3262 | extern int putc_unlocked (int __c, FILE *__stream); | |
3263 | extern int putchar_unlocked (int __c); | |
3264 | ||
3265 | ||
3266 | ||
3267 | ||
3268 | ||
3269 | ||
3270 | extern int getw (FILE *__stream); | |
3271 | ||
3272 | ||
3273 | extern int putw (int __w, FILE *__stream); | |
3274 | ||
3275 | ||
3276 | ||
3277 | ||
3278 | ||
3279 | ||
3280 | ||
3281 | ||
3282 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | |
3283 | __attribute__ ((__warn_unused_result__)); | |
3284 | ||
3285 | ||
3286 | ||
3287 | ||
3288 | ||
3289 | ||
3290 | extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); | |
3291 | ||
3292 | # 646 "/usr/include/stdio.h" 3 4 | |
3293 | extern char *fgets_unlocked (char *__restrict __s, int __n, | |
3294 | FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); | |
3295 | # 662 "/usr/include/stdio.h" 3 4 | |
3296 | extern __ssize_t __getdelim (char **__restrict __lineptr, | |
3297 | size_t *__restrict __n, int __delimiter, | |
3298 | FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); | |
3299 | extern __ssize_t getdelim (char **__restrict __lineptr, | |
3300 | size_t *__restrict __n, int __delimiter, | |
3301 | FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); | |
3302 | ||
3303 | ||
3304 | ||
3305 | ||
3306 | ||
3307 | ||
3308 | ||
3309 | extern __ssize_t getline (char **__restrict __lineptr, | |
3310 | size_t *__restrict __n, | |
3311 | FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); | |
3312 | ||
3313 | ||
3314 | ||
3315 | ||
3316 | ||
3317 | ||
3318 | ||
3319 | ||
3320 | extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); | |
3321 | ||
3322 | ||
3323 | ||
3324 | ||
3325 | ||
3326 | extern int puts (__const char *__s); | |
3327 | ||
3328 | ||
3329 | ||
3330 | ||
3331 | ||
3332 | ||
3333 | extern int ungetc (int __c, FILE *__stream); | |
3334 | ||
3335 | ||
3336 | ||
3337 | ||
3338 | ||
3339 | ||
3340 | extern size_t fread (void *__restrict __ptr, size_t __size, | |
3341 | size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); | |
3342 | ||
3343 | ||
3344 | ||
3345 | ||
3346 | extern size_t fwrite (__const void *__restrict __ptr, size_t __size, | |
3347 | size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); | |
3348 | ||
3349 | # 723 "/usr/include/stdio.h" 3 4 | |
3350 | extern int fputs_unlocked (__const char *__restrict __s, | |
3351 | FILE *__restrict __stream); | |
3352 | # 734 "/usr/include/stdio.h" 3 4 | |
3353 | extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, | |
3354 | size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); | |
3355 | extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, | |
3356 | size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); | |
3357 | ||
3358 | ||
3359 | ||
3360 | ||
3361 | ||
3362 | ||
3363 | ||
3364 | ||
3365 | extern int fseek (FILE *__stream, long int __off, int __whence); | |
3366 | ||
3367 | ||
3368 | ||
3369 | ||
3370 | extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); | |
3371 | ||
3372 | ||
3373 | ||
3374 | ||
3375 | extern void rewind (FILE *__stream); | |
3376 | ||
3377 | # 778 "/usr/include/stdio.h" 3 4 | |
3378 | extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("" "fseeko64") | |
3379 | ||
3380 | ; | |
3381 | extern __off64_t ftello (FILE *__stream) __asm__ ("" "ftello64"); | |
3382 | ||
3383 | ||
3384 | ||
3385 | ||
3386 | ||
3387 | ||
3388 | ||
3389 | ||
3390 | # 803 "/usr/include/stdio.h" 3 4 | |
3391 | extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("" "fgetpos64") | |
3392 | ; | |
3393 | extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __asm__ ("" "fsetpos64") | |
3394 | ; | |
3395 | ||
3396 | ||
3397 | ||
3398 | ||
3399 | ||
3400 | ||
3401 | ||
3402 | ||
3403 | extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); | |
3404 | extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); | |
3405 | extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); | |
3406 | extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); | |
3407 | ||
3408 | ||
3409 | ||
3410 | ||
3411 | extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); | |
3412 | ||
3413 | extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3414 | ||
3415 | extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3416 | ||
3417 | ||
3418 | ||
3419 | ||
3420 | extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); | |
3421 | extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3422 | extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3423 | ||
3424 | ||
3425 | ||
3426 | ||
3427 | ||
3428 | ||
3429 | ||
3430 | ||
3431 | extern void perror (__const char *__s); | |
3432 | ||
3433 | ||
3434 | ||
3435 | ||
3436 | ||
3437 | ||
3438 | # 1 "/usr/include/bits/sys_errlist.h" 1 3 4 | |
3439 | # 27 "/usr/include/bits/sys_errlist.h" 3 4 | |
3440 | extern int sys_nerr; | |
3441 | extern __const char *__const sys_errlist[]; | |
3442 | ||
3443 | ||
3444 | extern int _sys_nerr; | |
3445 | extern __const char *__const _sys_errlist[]; | |
3446 | # 851 "/usr/include/stdio.h" 2 3 4 | |
3447 | ||
3448 | ||
3449 | ||
3450 | ||
3451 | extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3452 | ||
3453 | ||
3454 | ||
3455 | ||
3456 | extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3457 | # 870 "/usr/include/stdio.h" 3 4 | |
3458 | extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); | |
3459 | ||
3460 | ||
3461 | ||
3462 | ||
3463 | ||
3464 | extern int pclose (FILE *__stream); | |
3465 | ||
3466 | ||
3467 | ||
3468 | ||
3469 | ||
3470 | extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__)); | |
3471 | ||
3472 | ||
3473 | ||
3474 | ||
3475 | ||
3476 | extern char *cuserid (char *__s); | |
3477 | ||
3478 | ||
3479 | ||
3480 | ||
3481 | struct obstack; | |
3482 | ||
3483 | ||
3484 | extern int obstack_printf (struct obstack *__restrict __obstack, | |
3485 | __const char *__restrict __format, ...) | |
3486 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); | |
3487 | extern int obstack_vprintf (struct obstack *__restrict __obstack, | |
3488 | __const char *__restrict __format, | |
3489 | __gnuc_va_list __args) | |
3490 | __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); | |
3491 | ||
3492 | ||
3493 | ||
3494 | ||
3495 | ||
3496 | ||
3497 | ||
3498 | extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); | |
3499 | ||
3500 | ||
3501 | ||
3502 | extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
3503 | ||
3504 | ||
3505 | extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); | |
3506 | # 931 "/usr/include/stdio.h" 3 4 | |
3507 | # 1 "/usr/include/bits/stdio.h" 1 3 4 | |
3508 | # 44 "/usr/include/bits/stdio.h" 3 4 | |
3509 | extern __inline int | |
3510 | getchar (void) | |
3511 | { | |
3512 | return _IO_getc (stdin); | |
3513 | } | |
3514 | ||
3515 | ||
3516 | ||
3517 | ||
3518 | extern __inline int | |
3519 | fgetc_unlocked (FILE *__fp) | |
3520 | { | |
3521 | return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); | |
3522 | } | |
3523 | ||
3524 | ||
3525 | ||
3526 | ||
3527 | ||
3528 | extern __inline int | |
3529 | getc_unlocked (FILE *__fp) | |
3530 | { | |
3531 | return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); | |
3532 | } | |
3533 | ||
3534 | ||
3535 | extern __inline int | |
3536 | getchar_unlocked (void) | |
3537 | { | |
3538 | return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); | |
3539 | } | |
3540 | ||
3541 | ||
3542 | ||
3543 | ||
3544 | extern __inline int | |
3545 | putchar (int __c) | |
3546 | { | |
3547 | return _IO_putc (__c, stdout); | |
3548 | } | |
3549 | ||
3550 | ||
3551 | ||
3552 | ||
3553 | extern __inline int | |
3554 | fputc_unlocked (int __c, FILE *__stream) | |
3555 | { | |
3556 | return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); | |
3557 | } | |
3558 | ||
3559 | ||
3560 | ||
3561 | ||
3562 | ||
3563 | extern __inline int | |
3564 | putc_unlocked (int __c, FILE *__stream) | |
3565 | { | |
3566 | return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); | |
3567 | } | |
3568 | ||
3569 | ||
3570 | extern __inline int | |
3571 | putchar_unlocked (int __c) | |
3572 | { | |
3573 | return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); | |
3574 | } | |
3575 | ||
3576 | ||
3577 | ||
3578 | ||
3579 | ||
3580 | extern __inline __ssize_t | |
3581 | getline (char **__lineptr, size_t *__n, FILE *__stream) | |
3582 | { | |
3583 | return __getdelim (__lineptr, __n, '\n', __stream); | |
3584 | } | |
3585 | ||
3586 | ||
3587 | ||
3588 | ||
3589 | ||
3590 | extern __inline int | |
3591 | __attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream) | |
3592 | { | |
3593 | return (((__stream)->_flags & 0x10) != 0); | |
3594 | } | |
3595 | ||
3596 | ||
3597 | extern __inline int | |
3598 | __attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream) | |
3599 | { | |
3600 | return (((__stream)->_flags & 0x20) != 0); | |
3601 | } | |
3602 | # 932 "/usr/include/stdio.h" 2 3 4 | |
3603 | ||
3604 | ||
3605 | # 1 "/usr/include/bits/stdio2.h" 1 3 4 | |
3606 | # 24 "/usr/include/bits/stdio2.h" 3 4 | |
3607 | extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, | |
3608 | __const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); | |
3609 | extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, | |
3610 | __const char *__restrict __format, | |
3611 | __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)); | |
3612 | ||
3613 | ||
3614 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3615 | __attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) | |
3616 | { | |
3617 | return __builtin___sprintf_chk (__s, 2 - 1, | |
3618 | __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); | |
3619 | } | |
3620 | ||
3621 | ||
3622 | ||
3623 | ||
3624 | ||
3625 | ||
3626 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3627 | __attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) | |
3628 | ||
3629 | { | |
3630 | return __builtin___vsprintf_chk (__s, 2 - 1, | |
3631 | __builtin_object_size (__s, 2 > 1), __fmt, __ap); | |
3632 | } | |
3633 | ||
3634 | ||
3635 | ||
3636 | extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, | |
3637 | size_t __slen, __const char *__restrict __format, | |
3638 | ...) __attribute__ ((__nothrow__ , __leaf__)); | |
3639 | extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, | |
3640 | size_t __slen, __const char *__restrict __format, | |
3641 | __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)); | |
3642 | ||
3643 | ||
3644 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3645 | __attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) | |
3646 | ||
3647 | { | |
3648 | return __builtin___snprintf_chk (__s, __n, 2 - 1, | |
3649 | __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); | |
3650 | } | |
3651 | ||
3652 | ||
3653 | ||
3654 | ||
3655 | ||
3656 | ||
3657 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3658 | __attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) | |
3659 | ||
3660 | { | |
3661 | return __builtin___vsnprintf_chk (__s, __n, 2 - 1, | |
3662 | __builtin_object_size (__s, 2 > 1), __fmt, __ap); | |
3663 | } | |
3664 | ||
3665 | ||
3666 | ||
3667 | ||
3668 | ||
3669 | extern int __fprintf_chk (FILE *__restrict __stream, int __flag, | |
3670 | __const char *__restrict __format, ...); | |
3671 | extern int __printf_chk (int __flag, __const char *__restrict __format, ...); | |
3672 | extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, | |
3673 | __const char *__restrict __format, __gnuc_va_list __ap); | |
3674 | extern int __vprintf_chk (int __flag, __const char *__restrict __format, | |
3675 | __gnuc_va_list __ap); | |
3676 | ||
3677 | ||
3678 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3679 | fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) | |
3680 | { | |
3681 | return __fprintf_chk (__stream, 2 - 1, __fmt, | |
3682 | __builtin_va_arg_pack ()); | |
3683 | } | |
3684 | ||
3685 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3686 | printf (__const char *__restrict __fmt, ...) | |
3687 | { | |
3688 | return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); | |
3689 | } | |
3690 | ||
3691 | ||
3692 | ||
3693 | ||
3694 | ||
3695 | ||
3696 | ||
3697 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3698 | vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) | |
3699 | { | |
3700 | ||
3701 | return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); | |
3702 | ||
3703 | ||
3704 | ||
3705 | } | |
3706 | ||
3707 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3708 | vfprintf (FILE *__restrict __stream, | |
3709 | __const char *__restrict __fmt, __gnuc_va_list __ap) | |
3710 | { | |
3711 | return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); | |
3712 | } | |
3713 | ||
3714 | ||
3715 | ||
3716 | extern int __asprintf_chk (char **__restrict __ptr, int __flag, | |
3717 | __const char *__restrict __fmt, ...) | |
3718 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); | |
3719 | extern int __vasprintf_chk (char **__restrict __ptr, int __flag, | |
3720 | __const char *__restrict __fmt, __gnuc_va_list __arg) | |
3721 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); | |
3722 | extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, | |
3723 | ...) __attribute__ ((__format__ (__printf__, 3, 4))); | |
3724 | extern int __vdprintf_chk (int __fd, int __flag, | |
3725 | __const char *__restrict __fmt, __gnuc_va_list __arg) | |
3726 | __attribute__ ((__format__ (__printf__, 3, 0))); | |
3727 | extern int __obstack_printf_chk (struct obstack *__restrict __obstack, | |
3728 | int __flag, __const char *__restrict __format, | |
3729 | ...) | |
3730 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))); | |
3731 | extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, | |
3732 | int __flag, | |
3733 | __const char *__restrict __format, | |
3734 | __gnuc_va_list __args) | |
3735 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))); | |
3736 | ||
3737 | ||
3738 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3739 | __attribute__ ((__nothrow__ , __leaf__)) asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) | |
3740 | { | |
3741 | return __asprintf_chk (__ptr, 2 - 1, __fmt, | |
3742 | __builtin_va_arg_pack ()); | |
3743 | } | |
3744 | ||
3745 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3746 | __attribute__ ((__nothrow__ , __leaf__)) __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) | |
3747 | ||
3748 | { | |
3749 | return __asprintf_chk (__ptr, 2 - 1, __fmt, | |
3750 | __builtin_va_arg_pack ()); | |
3751 | } | |
3752 | ||
3753 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3754 | dprintf (int __fd, __const char *__restrict __fmt, ...) | |
3755 | { | |
3756 | return __dprintf_chk (__fd, 2 - 1, __fmt, | |
3757 | __builtin_va_arg_pack ()); | |
3758 | } | |
3759 | ||
3760 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3761 | __attribute__ ((__nothrow__ , __leaf__)) obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) | |
3762 | ||
3763 | { | |
3764 | return __obstack_printf_chk (__obstack, 2 - 1, __fmt, | |
3765 | __builtin_va_arg_pack ()); | |
3766 | } | |
3767 | # 195 "/usr/include/bits/stdio2.h" 3 4 | |
3768 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3769 | __attribute__ ((__nothrow__ , __leaf__)) vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) | |
3770 | ||
3771 | { | |
3772 | return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); | |
3773 | } | |
3774 | ||
3775 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3776 | vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) | |
3777 | { | |
3778 | return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); | |
3779 | } | |
3780 | ||
3781 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
3782 | __attribute__ ((__nothrow__ , __leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) | |
3783 | ||
3784 | { | |
3785 | return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, | |
3786 | __ap); | |
3787 | } | |
3788 | ||
3789 | ||
3790 | ||
3791 | ||
3792 | ||
3793 | extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); | |
3794 | extern char *__gets_warn (char *__str) __asm__ ("" "gets") | |
3795 | __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) | |
3796 | ; | |
3797 | ||
3798 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * | |
3799 | gets (char *__str) | |
3800 | { | |
3801 | if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) | |
3802 | return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); | |
3803 | return __gets_warn (__str); | |
3804 | } | |
3805 | ||
3806 | extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, | |
3807 | FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); | |
3808 | extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") | |
3809 | ||
3810 | __attribute__ ((__warn_unused_result__)); | |
3811 | extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") | |
3812 | ||
3813 | ||
3814 | __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) | |
3815 | ; | |
3816 | ||
3817 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * | |
3818 | fgets (char *__restrict __s, int __n, FILE *__restrict __stream) | |
3819 | { | |
3820 | if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) | |
3821 | { | |
3822 | if (!__builtin_constant_p (__n) || __n <= 0) | |
3823 | return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); | |
3824 | ||
3825 | if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) | |
3826 | return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); | |
3827 | } | |
3828 | return __fgets_alias (__s, __n, __stream); | |
3829 | } | |
3830 | ||
3831 | extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, | |
3832 | size_t __size, size_t __n, | |
3833 | FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); | |
3834 | extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") | |
3835 | ||
3836 | ||
3837 | __attribute__ ((__warn_unused_result__)); | |
3838 | extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") | |
3839 | ||
3840 | ||
3841 | ||
3842 | ||
3843 | __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) | |
3844 | ; | |
3845 | ||
3846 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t | |
3847 | fread (void *__restrict __ptr, size_t __size, size_t __n, | |
3848 | FILE *__restrict __stream) | |
3849 | { | |
3850 | if (__builtin_object_size (__ptr, 0) != (size_t) -1) | |
3851 | { | |
3852 | if (!__builtin_constant_p (__size) | |
3853 | || !__builtin_constant_p (__n) | |
3854 | || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) | |
3855 | return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); | |
3856 | ||
3857 | if (__size * __n > __builtin_object_size (__ptr, 0)) | |
3858 | return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); | |
3859 | } | |
3860 | return __fread_alias (__ptr, __size, __n, __stream); | |
3861 | } | |
3862 | ||
3863 | ||
3864 | extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, | |
3865 | int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); | |
3866 | extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") | |
3867 | ||
3868 | __attribute__ ((__warn_unused_result__)); | |
3869 | extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") | |
3870 | ||
3871 | ||
3872 | __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) | |
3873 | ; | |
3874 | ||
3875 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * | |
3876 | fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) | |
3877 | { | |
3878 | if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) | |
3879 | { | |
3880 | if (!__builtin_constant_p (__n) || __n <= 0) | |
3881 | return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); | |
3882 | ||
3883 | if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) | |
3884 | return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); | |
3885 | } | |
3886 | return __fgets_unlocked_alias (__s, __n, __stream); | |
3887 | } | |
3888 | ||
3889 | ||
3890 | ||
3891 | ||
3892 | extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, | |
3893 | size_t __size, size_t __n, | |
3894 | FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); | |
3895 | extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") | |
3896 | ||
3897 | ||
3898 | __attribute__ ((__warn_unused_result__)); | |
3899 | extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") | |
3900 | ||
3901 | ||
3902 | ||
3903 | ||
3904 | __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) | |
3905 | ; | |
3906 | ||
3907 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t | |
3908 | fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, | |
3909 | FILE *__restrict __stream) | |
3910 | { | |
3911 | if (__builtin_object_size (__ptr, 0) != (size_t) -1) | |
3912 | { | |
3913 | if (!__builtin_constant_p (__size) | |
3914 | || !__builtin_constant_p (__n) | |
3915 | || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) | |
3916 | return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, | |
3917 | __stream); | |
3918 | ||
3919 | if (__size * __n > __builtin_object_size (__ptr, 0)) | |
3920 | return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, | |
3921 | __stream); | |
3922 | } | |
3923 | ||
3924 | ||
3925 | if (__builtin_constant_p (__size) | |
3926 | && __builtin_constant_p (__n) | |
3927 | && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) | |
3928 | && __size * __n <= 8) | |
3929 | { | |
3930 | size_t __cnt = __size * __n; | |
3931 | char *__cptr = (char *) __ptr; | |
3932 | if (__cnt == 0) | |
3933 | return 0; | |
3934 | ||
3935 | for (; __cnt > 0; --__cnt) | |
3936 | { | |
3937 | int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); | |
3938 | if (__c == (-1)) | |
3939 | break; | |
3940 | *__cptr++ = __c; | |
3941 | } | |
3942 | return (__cptr - (char *) __ptr) / __size; | |
3943 | } | |
3944 | ||
3945 | return __fread_unlocked_alias (__ptr, __size, __n, __stream); | |
3946 | } | |
3947 | # 935 "/usr/include/stdio.h" 2 3 4 | |
3948 | ||
3949 | ||
3950 | ||
3951 | ||
3952 | ||
3953 | ||
3954 | # 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
3955 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stdarg.h" 1 3 4 | |
3956 | # 25 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
3957 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stdbool.h" 1 3 4 | |
3958 | # 26 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
3959 | # 1 "/usr/include/string.h" 1 3 4 | |
3960 | # 29 "/usr/include/string.h" 3 4 | |
3961 | ||
3962 | ||
3963 | ||
3964 | ||
3965 | ||
3966 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
3967 | # 35 "/usr/include/string.h" 2 3 4 | |
3968 | ||
3969 | ||
3970 | ||
3971 | ||
3972 | ||
3973 | ||
3974 | ||
3975 | ||
3976 | ||
3977 | extern void *memcpy (void *__restrict __dest, | |
3978 | __const void *__restrict __src, size_t __n) | |
3979 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
3980 | ||
3981 | ||
3982 | extern void *memmove (void *__dest, __const void *__src, size_t __n) | |
3983 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
3984 | ||
3985 | ||
3986 | ||
3987 | ||
3988 | ||
3989 | ||
3990 | extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, | |
3991 | int __c, size_t __n) | |
3992 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
3993 | ||
3994 | ||
3995 | ||
3996 | ||
3997 | ||
3998 | extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
3999 | ||
4000 | ||
4001 | extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) | |
4002 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4003 | # 95 "/usr/include/string.h" 3 4 | |
4004 | extern void *memchr (__const void *__s, int __c, size_t __n) | |
4005 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
4006 | ||
4007 | ||
4008 | # 109 "/usr/include/string.h" 3 4 | |
4009 | extern void *rawmemchr (__const void *__s, int __c) | |
4010 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
4011 | # 120 "/usr/include/string.h" 3 4 | |
4012 | extern void *memrchr (__const void *__s, int __c, size_t __n) | |
4013 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
4014 | ||
4015 | ||
4016 | ||
4017 | ||
4018 | ||
4019 | ||
4020 | extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) | |
4021 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
4022 | ||
4023 | extern char *strncpy (char *__restrict __dest, | |
4024 | __const char *__restrict __src, size_t __n) | |
4025 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
4026 | ||
4027 | ||
4028 | extern char *strcat (char *__restrict __dest, __const char *__restrict __src) | |
4029 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
4030 | ||
4031 | extern char *strncat (char *__restrict __dest, __const char *__restrict __src, | |
4032 | size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
4033 | ||
4034 | ||
4035 | extern int strcmp (__const char *__s1, __const char *__s2) | |
4036 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4037 | ||
4038 | extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) | |
4039 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4040 | ||
4041 | ||
4042 | extern int strcoll (__const char *__s1, __const char *__s2) | |
4043 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4044 | ||
4045 | extern size_t strxfrm (char *__restrict __dest, | |
4046 | __const char *__restrict __src, size_t __n) | |
4047 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
4048 | ||
4049 | # 165 "/usr/include/string.h" 3 4 | |
4050 | extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) | |
4051 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); | |
4052 | ||
4053 | extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, | |
4054 | __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); | |
4055 | ||
4056 | ||
4057 | ||
4058 | ||
4059 | ||
4060 | extern char *strdup (__const char *__s) | |
4061 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); | |
4062 | ||
4063 | ||
4064 | ||
4065 | ||
4066 | ||
4067 | ||
4068 | extern char *strndup (__const char *__string, size_t __n) | |
4069 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); | |
4070 | # 210 "/usr/include/string.h" 3 4 | |
4071 | ||
4072 | # 235 "/usr/include/string.h" 3 4 | |
4073 | extern char *strchr (__const char *__s, int __c) | |
4074 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
4075 | # 262 "/usr/include/string.h" 3 4 | |
4076 | extern char *strrchr (__const char *__s, int __c) | |
4077 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
4078 | ||
4079 | ||
4080 | # 276 "/usr/include/string.h" 3 4 | |
4081 | extern char *strchrnul (__const char *__s, int __c) | |
4082 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
4083 | ||
4084 | ||
4085 | ||
4086 | ||
4087 | ||
4088 | ||
4089 | extern size_t strcspn (__const char *__s, __const char *__reject) | |
4090 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4091 | ||
4092 | ||
4093 | extern size_t strspn (__const char *__s, __const char *__accept) | |
4094 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4095 | # 314 "/usr/include/string.h" 3 4 | |
4096 | extern char *strpbrk (__const char *__s, __const char *__accept) | |
4097 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4098 | # 342 "/usr/include/string.h" 3 4 | |
4099 | extern char *strstr (__const char *__haystack, __const char *__needle) | |
4100 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4101 | ||
4102 | ||
4103 | ||
4104 | ||
4105 | extern char *strtok (char *__restrict __s, __const char *__restrict __delim) | |
4106 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
4107 | ||
4108 | ||
4109 | ||
4110 | ||
4111 | extern char *__strtok_r (char *__restrict __s, | |
4112 | __const char *__restrict __delim, | |
4113 | char **__restrict __save_ptr) | |
4114 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); | |
4115 | ||
4116 | extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, | |
4117 | char **__restrict __save_ptr) | |
4118 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); | |
4119 | # 373 "/usr/include/string.h" 3 4 | |
4120 | extern char *strcasestr (__const char *__haystack, __const char *__needle) | |
4121 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4122 | ||
4123 | ||
4124 | ||
4125 | ||
4126 | ||
4127 | ||
4128 | ||
4129 | extern void *memmem (__const void *__haystack, size_t __haystacklen, | |
4130 | __const void *__needle, size_t __needlelen) | |
4131 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); | |
4132 | ||
4133 | ||
4134 | ||
4135 | extern void *__mempcpy (void *__restrict __dest, | |
4136 | __const void *__restrict __src, size_t __n) | |
4137 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
4138 | extern void *mempcpy (void *__restrict __dest, | |
4139 | __const void *__restrict __src, size_t __n) | |
4140 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
4141 | ||
4142 | ||
4143 | ||
4144 | ||
4145 | ||
4146 | extern size_t strlen (__const char *__s) | |
4147 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
4148 | ||
4149 | ||
4150 | ||
4151 | ||
4152 | ||
4153 | extern size_t strnlen (__const char *__string, size_t __maxlen) | |
4154 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
4155 | ||
4156 | ||
4157 | ||
4158 | ||
4159 | ||
4160 | extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__)); | |
4161 | ||
4162 | # 438 "/usr/include/string.h" 3 4 | |
4163 | extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) | |
4164 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
4165 | ||
4166 | ||
4167 | ||
4168 | ||
4169 | ||
4170 | extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); | |
4171 | ||
4172 | ||
4173 | ||
4174 | ||
4175 | ||
4176 | extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
4177 | ||
4178 | ||
4179 | ||
4180 | extern void bcopy (__const void *__src, void *__dest, size_t __n) | |
4181 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
4182 | ||
4183 | ||
4184 | extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
4185 | ||
4186 | ||
4187 | extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) | |
4188 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4189 | # 489 "/usr/include/string.h" 3 4 | |
4190 | extern char *index (__const char *__s, int __c) | |
4191 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
4192 | # 517 "/usr/include/string.h" 3 4 | |
4193 | extern char *rindex (__const char *__s, int __c) | |
4194 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); | |
4195 | ||
4196 | ||
4197 | ||
4198 | ||
4199 | extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
4200 | ||
4201 | ||
4202 | ||
4203 | ||
4204 | extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
4205 | ||
4206 | __extension__ extern int ffsll (long long int __ll) | |
4207 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
4208 | ||
4209 | ||
4210 | ||
4211 | ||
4212 | extern int strcasecmp (__const char *__s1, __const char *__s2) | |
4213 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4214 | ||
4215 | ||
4216 | extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) | |
4217 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4218 | ||
4219 | ||
4220 | ||
4221 | ||
4222 | ||
4223 | extern int strcasecmp_l (__const char *__s1, __const char *__s2, | |
4224 | __locale_t __loc) | |
4225 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); | |
4226 | ||
4227 | extern int strncasecmp_l (__const char *__s1, __const char *__s2, | |
4228 | size_t __n, __locale_t __loc) | |
4229 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); | |
4230 | ||
4231 | ||
4232 | ||
4233 | ||
4234 | ||
4235 | extern char *strsep (char **__restrict __stringp, | |
4236 | __const char *__restrict __delim) | |
4237 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
4238 | ||
4239 | ||
4240 | ||
4241 | ||
4242 | extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); | |
4243 | ||
4244 | ||
4245 | extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) | |
4246 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
4247 | extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) | |
4248 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
4249 | ||
4250 | ||
4251 | ||
4252 | extern char *__stpncpy (char *__restrict __dest, | |
4253 | __const char *__restrict __src, size_t __n) | |
4254 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
4255 | extern char *stpncpy (char *__restrict __dest, | |
4256 | __const char *__restrict __src, size_t __n) | |
4257 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
4258 | ||
4259 | ||
4260 | ||
4261 | ||
4262 | extern int strverscmp (__const char *__s1, __const char *__s2) | |
4263 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); | |
4264 | ||
4265 | ||
4266 | extern char *strfry (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
4267 | ||
4268 | ||
4269 | extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
4270 | # 606 "/usr/include/string.h" 3 4 | |
4271 | extern char *basename (__const char *__filename) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
4272 | # 634 "/usr/include/string.h" 3 4 | |
4273 | # 1 "/usr/include/bits/string.h" 1 3 4 | |
4274 | # 635 "/usr/include/string.h" 2 3 4 | |
4275 | ||
4276 | ||
4277 | # 1 "/usr/include/bits/string2.h" 1 3 4 | |
4278 | # 394 "/usr/include/bits/string2.h" 3 4 | |
4279 | extern void *__rawmemchr (const void *__s, int __c); | |
4280 | # 969 "/usr/include/bits/string2.h" 3 4 | |
4281 | extern __inline size_t __strcspn_c1 (__const char *__s, int __reject); | |
4282 | extern __inline size_t | |
4283 | __strcspn_c1 (__const char *__s, int __reject) | |
4284 | { | |
4285 | register size_t __result = 0; | |
4286 | while (__s[__result] != '\0' && __s[__result] != __reject) | |
4287 | ++__result; | |
4288 | return __result; | |
4289 | } | |
4290 | ||
4291 | extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, | |
4292 | int __reject2); | |
4293 | extern __inline size_t | |
4294 | __strcspn_c2 (__const char *__s, int __reject1, int __reject2) | |
4295 | { | |
4296 | register size_t __result = 0; | |
4297 | while (__s[__result] != '\0' && __s[__result] != __reject1 | |
4298 | && __s[__result] != __reject2) | |
4299 | ++__result; | |
4300 | return __result; | |
4301 | } | |
4302 | ||
4303 | extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, | |
4304 | int __reject2, int __reject3); | |
4305 | extern __inline size_t | |
4306 | __strcspn_c3 (__const char *__s, int __reject1, int __reject2, | |
4307 | int __reject3) | |
4308 | { | |
4309 | register size_t __result = 0; | |
4310 | while (__s[__result] != '\0' && __s[__result] != __reject1 | |
4311 | && __s[__result] != __reject2 && __s[__result] != __reject3) | |
4312 | ++__result; | |
4313 | return __result; | |
4314 | } | |
4315 | # 1045 "/usr/include/bits/string2.h" 3 4 | |
4316 | extern __inline size_t __strspn_c1 (__const char *__s, int __accept); | |
4317 | extern __inline size_t | |
4318 | __strspn_c1 (__const char *__s, int __accept) | |
4319 | { | |
4320 | register size_t __result = 0; | |
4321 | ||
4322 | while (__s[__result] == __accept) | |
4323 | ++__result; | |
4324 | return __result; | |
4325 | } | |
4326 | ||
4327 | extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, | |
4328 | int __accept2); | |
4329 | extern __inline size_t | |
4330 | __strspn_c2 (__const char *__s, int __accept1, int __accept2) | |
4331 | { | |
4332 | register size_t __result = 0; | |
4333 | ||
4334 | while (__s[__result] == __accept1 || __s[__result] == __accept2) | |
4335 | ++__result; | |
4336 | return __result; | |
4337 | } | |
4338 | ||
4339 | extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, | |
4340 | int __accept2, int __accept3); | |
4341 | extern __inline size_t | |
4342 | __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) | |
4343 | { | |
4344 | register size_t __result = 0; | |
4345 | ||
4346 | while (__s[__result] == __accept1 || __s[__result] == __accept2 | |
4347 | || __s[__result] == __accept3) | |
4348 | ++__result; | |
4349 | return __result; | |
4350 | } | |
4351 | # 1121 "/usr/include/bits/string2.h" 3 4 | |
4352 | extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1, | |
4353 | int __accept2); | |
4354 | extern __inline char * | |
4355 | __strpbrk_c2 (__const char *__s, int __accept1, int __accept2) | |
4356 | { | |
4357 | ||
4358 | while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) | |
4359 | ++__s; | |
4360 | return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; | |
4361 | } | |
4362 | ||
4363 | extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1, | |
4364 | int __accept2, int __accept3); | |
4365 | extern __inline char * | |
4366 | __strpbrk_c3 (__const char *__s, int __accept1, int __accept2, | |
4367 | int __accept3) | |
4368 | { | |
4369 | ||
4370 | while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 | |
4371 | && *__s != __accept3) | |
4372 | ++__s; | |
4373 | return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; | |
4374 | } | |
4375 | # 1172 "/usr/include/bits/string2.h" 3 4 | |
4376 | extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp); | |
4377 | extern __inline char * | |
4378 | __strtok_r_1c (char *__s, char __sep, char **__nextp) | |
4379 | { | |
4380 | char *__result; | |
4381 | if (__s == ((void *)0)) | |
4382 | __s = *__nextp; | |
4383 | while (*__s == __sep) | |
4384 | ++__s; | |
4385 | __result = ((void *)0); | |
4386 | if (*__s != '\0') | |
4387 | { | |
4388 | __result = __s++; | |
4389 | while (*__s != '\0') | |
4390 | if (*__s++ == __sep) | |
4391 | { | |
4392 | __s[-1] = '\0'; | |
4393 | break; | |
4394 | } | |
4395 | } | |
4396 | *__nextp = __s; | |
4397 | return __result; | |
4398 | } | |
4399 | # 1204 "/usr/include/bits/string2.h" 3 4 | |
4400 | extern char *__strsep_g (char **__stringp, __const char *__delim); | |
4401 | # 1222 "/usr/include/bits/string2.h" 3 4 | |
4402 | extern __inline char *__strsep_1c (char **__s, char __reject); | |
4403 | extern __inline char * | |
4404 | __strsep_1c (char **__s, char __reject) | |
4405 | { | |
4406 | register char *__retval = *__s; | |
4407 | if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) | |
4408 | *(*__s)++ = '\0'; | |
4409 | return __retval; | |
4410 | } | |
4411 | ||
4412 | extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2); | |
4413 | extern __inline char * | |
4414 | __strsep_2c (char **__s, char __reject1, char __reject2) | |
4415 | { | |
4416 | register char *__retval = *__s; | |
4417 | if (__retval != ((void *)0)) | |
4418 | { | |
4419 | register char *__cp = __retval; | |
4420 | while (1) | |
4421 | { | |
4422 | if (*__cp == '\0') | |
4423 | { | |
4424 | __cp = ((void *)0); | |
4425 | break; | |
4426 | } | |
4427 | if (*__cp == __reject1 || *__cp == __reject2) | |
4428 | { | |
4429 | *__cp++ = '\0'; | |
4430 | break; | |
4431 | } | |
4432 | ++__cp; | |
4433 | } | |
4434 | *__s = __cp; | |
4435 | } | |
4436 | return __retval; | |
4437 | } | |
4438 | ||
4439 | extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2, | |
4440 | char __reject3); | |
4441 | extern __inline char * | |
4442 | __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) | |
4443 | { | |
4444 | register char *__retval = *__s; | |
4445 | if (__retval != ((void *)0)) | |
4446 | { | |
4447 | register char *__cp = __retval; | |
4448 | while (1) | |
4449 | { | |
4450 | if (*__cp == '\0') | |
4451 | { | |
4452 | __cp = ((void *)0); | |
4453 | break; | |
4454 | } | |
4455 | if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) | |
4456 | { | |
4457 | *__cp++ = '\0'; | |
4458 | break; | |
4459 | } | |
4460 | ++__cp; | |
4461 | } | |
4462 | *__s = __cp; | |
4463 | } | |
4464 | return __retval; | |
4465 | } | |
4466 | # 1303 "/usr/include/bits/string2.h" 3 4 | |
4467 | extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)); | |
4468 | # 1322 "/usr/include/bits/string2.h" 3 4 | |
4469 | extern char *__strndup (__const char *__string, size_t __n) | |
4470 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)); | |
4471 | # 638 "/usr/include/string.h" 2 3 4 | |
4472 | ||
4473 | ||
4474 | ||
4475 | ||
4476 | # 1 "/usr/include/bits/string3.h" 1 3 4 | |
4477 | # 23 "/usr/include/bits/string3.h" 3 4 | |
4478 | extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) | |
4479 | ; | |
4480 | # 48 "/usr/include/bits/string3.h" 3 4 | |
4481 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * | |
4482 | __attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) | |
4483 | ||
4484 | { | |
4485 | return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); | |
4486 | } | |
4487 | ||
4488 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * | |
4489 | __attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, __const void *__src, size_t __len) | |
4490 | { | |
4491 | return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); | |
4492 | } | |
4493 | ||
4494 | ||
4495 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * | |
4496 | __attribute__ ((__nothrow__ , __leaf__)) mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) | |
4497 | ||
4498 | { | |
4499 | return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); | |
4500 | } | |
4501 | # 76 "/usr/include/bits/string3.h" 3 4 | |
4502 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * | |
4503 | __attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len) | |
4504 | { | |
4505 | if (__builtin_constant_p (__len) && __len == 0 | |
4506 | && (!__builtin_constant_p (__ch) || __ch != 0)) | |
4507 | { | |
4508 | __warn_memset_zero_len (); | |
4509 | return __dest; | |
4510 | } | |
4511 | return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); | |
4512 | } | |
4513 | ||
4514 | ||
4515 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void | |
4516 | __attribute__ ((__nothrow__ , __leaf__)) bcopy (__const void *__src, void *__dest, size_t __len) | |
4517 | { | |
4518 | (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); | |
4519 | } | |
4520 | ||
4521 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void | |
4522 | __attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len) | |
4523 | { | |
4524 | (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); | |
4525 | } | |
4526 | ||
4527 | ||
4528 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * | |
4529 | __attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, __const char *__restrict __src) | |
4530 | { | |
4531 | return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); | |
4532 | } | |
4533 | ||
4534 | ||
4535 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * | |
4536 | __attribute__ ((__nothrow__ , __leaf__)) stpcpy (char *__restrict __dest, __const char *__restrict __src) | |
4537 | { | |
4538 | return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); | |
4539 | } | |
4540 | ||
4541 | ||
4542 | ||
4543 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * | |
4544 | __attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) | |
4545 | ||
4546 | { | |
4547 | return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); | |
4548 | } | |
4549 | ||
4550 | ||
4551 | extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, | |
4552 | size_t __destlen) __attribute__ ((__nothrow__ , __leaf__)); | |
4553 | extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__ , __leaf__)) | |
4554 | ||
4555 | ; | |
4556 | ||
4557 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * | |
4558 | __attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, __const char *__src, size_t __n) | |
4559 | { | |
4560 | if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 | |
4561 | && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) | |
4562 | return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); | |
4563 | return __stpncpy_alias (__dest, __src, __n); | |
4564 | } | |
4565 | ||
4566 | ||
4567 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * | |
4568 | __attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, __const char *__restrict __src) | |
4569 | { | |
4570 | return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); | |
4571 | } | |
4572 | ||
4573 | ||
4574 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * | |
4575 | __attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) | |
4576 | ||
4577 | { | |
4578 | return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); | |
4579 | } | |
4580 | # 643 "/usr/include/string.h" 2 3 4 | |
4581 | ||
4582 | ||
4583 | ||
4584 | ||
4585 | # 27 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
4586 | # 1 "/usr/include/strings.h" 1 3 4 | |
4587 | # 28 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
4588 | # 1 "/usr/include/inttypes.h" 1 3 4 | |
4589 | # 28 "/usr/include/inttypes.h" 3 4 | |
4590 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stdint.h" 1 3 4 | |
4591 | ||
4592 | ||
4593 | # 1 "/usr/include/stdint.h" 1 3 4 | |
4594 | # 27 "/usr/include/stdint.h" 3 4 | |
4595 | # 1 "/usr/include/bits/wchar.h" 1 3 4 | |
4596 | # 28 "/usr/include/stdint.h" 2 3 4 | |
4597 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
4598 | # 29 "/usr/include/stdint.h" 2 3 4 | |
4599 | # 49 "/usr/include/stdint.h" 3 4 | |
4600 | typedef unsigned char uint8_t; | |
4601 | typedef unsigned short int uint16_t; | |
4602 | ||
4603 | typedef unsigned int uint32_t; | |
4604 | ||
4605 | ||
4606 | ||
4607 | ||
4608 | ||
4609 | __extension__ | |
4610 | typedef unsigned long long int uint64_t; | |
4611 | ||
4612 | ||
4613 | ||
4614 | ||
4615 | ||
4616 | ||
4617 | typedef signed char int_least8_t; | |
4618 | typedef short int int_least16_t; | |
4619 | typedef int int_least32_t; | |
4620 | ||
4621 | ||
4622 | ||
4623 | __extension__ | |
4624 | typedef long long int int_least64_t; | |
4625 | ||
4626 | ||
4627 | ||
4628 | typedef unsigned char uint_least8_t; | |
4629 | typedef unsigned short int uint_least16_t; | |
4630 | typedef unsigned int uint_least32_t; | |
4631 | ||
4632 | ||
4633 | ||
4634 | __extension__ | |
4635 | typedef unsigned long long int uint_least64_t; | |
4636 | ||
4637 | ||
4638 | ||
4639 | ||
4640 | ||
4641 | ||
4642 | typedef signed char int_fast8_t; | |
4643 | ||
4644 | ||
4645 | ||
4646 | ||
4647 | ||
4648 | typedef int int_fast16_t; | |
4649 | typedef int int_fast32_t; | |
4650 | __extension__ | |
4651 | typedef long long int int_fast64_t; | |
4652 | ||
4653 | ||
4654 | ||
4655 | typedef unsigned char uint_fast8_t; | |
4656 | ||
4657 | ||
4658 | ||
4659 | ||
4660 | ||
4661 | typedef unsigned int uint_fast16_t; | |
4662 | typedef unsigned int uint_fast32_t; | |
4663 | __extension__ | |
4664 | typedef unsigned long long int uint_fast64_t; | |
4665 | # 126 "/usr/include/stdint.h" 3 4 | |
4666 | typedef int intptr_t; | |
4667 | ||
4668 | ||
4669 | typedef unsigned int uintptr_t; | |
4670 | # 138 "/usr/include/stdint.h" 3 4 | |
4671 | __extension__ | |
4672 | typedef long long int intmax_t; | |
4673 | __extension__ | |
4674 | typedef unsigned long long int uintmax_t; | |
4675 | # 4 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stdint.h" 2 3 4 | |
4676 | # 29 "/usr/include/inttypes.h" 2 3 4 | |
4677 | ||
4678 | ||
4679 | ||
4680 | ||
4681 | ||
4682 | ||
4683 | typedef int __gwchar_t; | |
4684 | # 274 "/usr/include/inttypes.h" 3 4 | |
4685 | ||
4686 | # 288 "/usr/include/inttypes.h" 3 4 | |
4687 | typedef struct | |
4688 | { | |
4689 | long long int quot; | |
4690 | long long int rem; | |
4691 | } imaxdiv_t; | |
4692 | ||
4693 | ||
4694 | ||
4695 | ||
4696 | ||
4697 | extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
4698 | ||
4699 | ||
4700 | extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) | |
4701 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
4702 | ||
4703 | ||
4704 | extern intmax_t strtoimax (__const char *__restrict __nptr, | |
4705 | char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); | |
4706 | ||
4707 | ||
4708 | extern uintmax_t strtoumax (__const char *__restrict __nptr, | |
4709 | char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); | |
4710 | ||
4711 | ||
4712 | extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr, | |
4713 | __gwchar_t **__restrict __endptr, int __base) | |
4714 | __attribute__ ((__nothrow__ , __leaf__)); | |
4715 | ||
4716 | ||
4717 | extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr, | |
4718 | __gwchar_t ** __restrict __endptr, int __base) | |
4719 | __attribute__ ((__nothrow__ , __leaf__)); | |
4720 | # 379 "/usr/include/inttypes.h" 3 4 | |
4721 | __extension__ | |
4722 | extern long long int __strtoll_internal (__const char *__restrict __nptr, | |
4723 | char **__restrict __endptr, | |
4724 | int __base, int __group) | |
4725 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
4726 | ||
4727 | extern __inline intmax_t | |
4728 | __attribute__ ((__nothrow__ , __leaf__)) strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base) | |
4729 | ||
4730 | { | |
4731 | return __strtoll_internal (nptr, endptr, base, 0); | |
4732 | } | |
4733 | ||
4734 | __extension__ | |
4735 | extern unsigned long long int __strtoull_internal (__const char * | |
4736 | __restrict __nptr, | |
4737 | char ** | |
4738 | __restrict __endptr, | |
4739 | int __base, | |
4740 | int __group) | |
4741 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
4742 | ||
4743 | extern __inline uintmax_t | |
4744 | __attribute__ ((__nothrow__ , __leaf__)) strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base) | |
4745 | ||
4746 | { | |
4747 | return __strtoull_internal (nptr, endptr, base, 0); | |
4748 | } | |
4749 | ||
4750 | __extension__ | |
4751 | extern long long int __wcstoll_internal (__const __gwchar_t * | |
4752 | __restrict __nptr, | |
4753 | __gwchar_t **__restrict __endptr, | |
4754 | int __base, int __group) | |
4755 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
4756 | ||
4757 | extern __inline intmax_t | |
4758 | __attribute__ ((__nothrow__ , __leaf__)) wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) | |
4759 | ||
4760 | { | |
4761 | return __wcstoll_internal (nptr, endptr, base, 0); | |
4762 | } | |
4763 | ||
4764 | ||
4765 | __extension__ | |
4766 | extern unsigned long long int __wcstoull_internal (__const __gwchar_t * | |
4767 | __restrict __nptr, | |
4768 | __gwchar_t ** | |
4769 | __restrict __endptr, | |
4770 | int __base, | |
4771 | int __group) | |
4772 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
4773 | ||
4774 | extern __inline uintmax_t | |
4775 | __attribute__ ((__nothrow__ , __leaf__)) wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) | |
4776 | ||
4777 | { | |
4778 | return __wcstoull_internal (nptr, endptr, base, 0); | |
4779 | } | |
4780 | ||
4781 | ||
4782 | ||
4783 | ||
4784 | ||
4785 | # 29 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
4786 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 1 3 4 | |
4787 | # 34 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 3 4 | |
4788 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/syslimits.h" 1 3 4 | |
4789 | ||
4790 | ||
4791 | ||
4792 | ||
4793 | ||
4794 | ||
4795 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 1 3 4 | |
4796 | # 169 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 3 4 | |
4797 | # 1 "/usr/include/limits.h" 1 3 4 | |
4798 | # 145 "/usr/include/limits.h" 3 4 | |
4799 | # 1 "/usr/include/bits/posix1_lim.h" 1 3 4 | |
4800 | # 157 "/usr/include/bits/posix1_lim.h" 3 4 | |
4801 | # 1 "/usr/include/bits/local_lim.h" 1 3 4 | |
4802 | # 39 "/usr/include/bits/local_lim.h" 3 4 | |
4803 | # 1 "/usr/include/linux/limits.h" 1 3 4 | |
4804 | # 40 "/usr/include/bits/local_lim.h" 2 3 4 | |
4805 | # 158 "/usr/include/bits/posix1_lim.h" 2 3 4 | |
4806 | # 146 "/usr/include/limits.h" 2 3 4 | |
4807 | ||
4808 | ||
4809 | ||
4810 | # 1 "/usr/include/bits/posix2_lim.h" 1 3 4 | |
4811 | # 150 "/usr/include/limits.h" 2 3 4 | |
4812 | ||
4813 | ||
4814 | ||
4815 | # 1 "/usr/include/bits/xopen_lim.h" 1 3 4 | |
4816 | # 34 "/usr/include/bits/xopen_lim.h" 3 4 | |
4817 | # 1 "/usr/include/bits/stdio_lim.h" 1 3 4 | |
4818 | # 35 "/usr/include/bits/xopen_lim.h" 2 3 4 | |
4819 | # 154 "/usr/include/limits.h" 2 3 4 | |
4820 | # 170 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 2 3 4 | |
4821 | # 8 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/syslimits.h" 2 3 4 | |
4822 | # 35 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 2 3 4 | |
4823 | # 30 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
4824 | # 1 "/usr/include/time.h" 1 3 4 | |
4825 | # 30 "/usr/include/time.h" 3 4 | |
4826 | ||
4827 | ||
4828 | ||
4829 | ||
4830 | ||
4831 | ||
4832 | ||
4833 | ||
4834 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
4835 | # 39 "/usr/include/time.h" 2 3 4 | |
4836 | ||
4837 | ||
4838 | ||
4839 | # 1 "/usr/include/bits/time.h" 1 3 4 | |
4840 | # 86 "/usr/include/bits/time.h" 3 4 | |
4841 | # 1 "/usr/include/bits/timex.h" 1 3 4 | |
4842 | # 24 "/usr/include/bits/timex.h" 3 4 | |
4843 | struct timex | |
4844 | { | |
4845 | unsigned int modes; | |
4846 | long int offset; | |
4847 | long int freq; | |
4848 | long int maxerror; | |
4849 | long int esterror; | |
4850 | int status; | |
4851 | long int constant; | |
4852 | long int precision; | |
4853 | long int tolerance; | |
4854 | struct timeval time; | |
4855 | long int tick; | |
4856 | ||
4857 | long int ppsfreq; | |
4858 | long int jitter; | |
4859 | int shift; | |
4860 | long int stabil; | |
4861 | long int jitcnt; | |
4862 | long int calcnt; | |
4863 | long int errcnt; | |
4864 | long int stbcnt; | |
4865 | ||
4866 | int tai; | |
4867 | ||
4868 | ||
4869 | int :32; int :32; int :32; int :32; | |
4870 | int :32; int :32; int :32; int :32; | |
4871 | int :32; int :32; int :32; | |
4872 | }; | |
4873 | # 87 "/usr/include/bits/time.h" 2 3 4 | |
4874 | ||
4875 | ||
4876 | ||
4877 | ||
4878 | extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __attribute__ ((__nothrow__ , __leaf__)); | |
4879 | ||
4880 | ||
4881 | # 43 "/usr/include/time.h" 2 3 4 | |
4882 | # 131 "/usr/include/time.h" 3 4 | |
4883 | ||
4884 | ||
4885 | struct tm | |
4886 | { | |
4887 | int tm_sec; | |
4888 | int tm_min; | |
4889 | int tm_hour; | |
4890 | int tm_mday; | |
4891 | int tm_mon; | |
4892 | int tm_year; | |
4893 | int tm_wday; | |
4894 | int tm_yday; | |
4895 | int tm_isdst; | |
4896 | ||
4897 | ||
4898 | long int tm_gmtoff; | |
4899 | __const char *tm_zone; | |
4900 | ||
4901 | ||
4902 | ||
4903 | ||
4904 | }; | |
4905 | ||
4906 | ||
4907 | ||
4908 | ||
4909 | ||
4910 | ||
4911 | ||
4912 | ||
4913 | struct itimerspec | |
4914 | { | |
4915 | struct timespec it_interval; | |
4916 | struct timespec it_value; | |
4917 | }; | |
4918 | ||
4919 | ||
4920 | struct sigevent; | |
4921 | # 180 "/usr/include/time.h" 3 4 | |
4922 | ||
4923 | ||
4924 | ||
4925 | extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__)); | |
4926 | ||
4927 | ||
4928 | extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); | |
4929 | ||
4930 | ||
4931 | extern double difftime (time_t __time1, time_t __time0) | |
4932 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
4933 | ||
4934 | ||
4935 | extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); | |
4936 | ||
4937 | ||
4938 | ||
4939 | ||
4940 | ||
4941 | extern size_t strftime (char *__restrict __s, size_t __maxsize, | |
4942 | __const char *__restrict __format, | |
4943 | __const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); | |
4944 | ||
4945 | ||
4946 | ||
4947 | ||
4948 | ||
4949 | extern char *strptime (__const char *__restrict __s, | |
4950 | __const char *__restrict __fmt, struct tm *__tp) | |
4951 | __attribute__ ((__nothrow__ , __leaf__)); | |
4952 | ||
4953 | ||
4954 | ||
4955 | ||
4956 | ||
4957 | ||
4958 | ||
4959 | extern size_t strftime_l (char *__restrict __s, size_t __maxsize, | |
4960 | __const char *__restrict __format, | |
4961 | __const struct tm *__restrict __tp, | |
4962 | __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)); | |
4963 | ||
4964 | ||
4965 | ||
4966 | extern char *strptime_l (__const char *__restrict __s, | |
4967 | __const char *__restrict __fmt, struct tm *__tp, | |
4968 | __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)); | |
4969 | ||
4970 | ||
4971 | ||
4972 | ||
4973 | ||
4974 | ||
4975 | extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); | |
4976 | ||
4977 | ||
4978 | ||
4979 | extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); | |
4980 | ||
4981 | ||
4982 | ||
4983 | ||
4984 | ||
4985 | extern struct tm *gmtime_r (__const time_t *__restrict __timer, | |
4986 | struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); | |
4987 | ||
4988 | ||
4989 | ||
4990 | extern struct tm *localtime_r (__const time_t *__restrict __timer, | |
4991 | struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); | |
4992 | ||
4993 | ||
4994 | ||
4995 | ||
4996 | ||
4997 | extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); | |
4998 | ||
4999 | ||
5000 | extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); | |
5001 | ||
5002 | ||
5003 | ||
5004 | ||
5005 | ||
5006 | ||
5007 | ||
5008 | extern char *asctime_r (__const struct tm *__restrict __tp, | |
5009 | char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); | |
5010 | ||
5011 | ||
5012 | extern char *ctime_r (__const time_t *__restrict __timer, | |
5013 | char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); | |
5014 | ||
5015 | ||
5016 | ||
5017 | ||
5018 | extern char *__tzname[2]; | |
5019 | extern int __daylight; | |
5020 | extern long int __timezone; | |
5021 | ||
5022 | ||
5023 | ||
5024 | ||
5025 | extern char *tzname[2]; | |
5026 | ||
5027 | ||
5028 | ||
5029 | extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__)); | |
5030 | ||
5031 | ||
5032 | ||
5033 | extern int daylight; | |
5034 | extern long int timezone; | |
5035 | ||
5036 | ||
5037 | ||
5038 | ||
5039 | ||
5040 | extern int stime (__const time_t *__when) __attribute__ ((__nothrow__ , __leaf__)); | |
5041 | # 313 "/usr/include/time.h" 3 4 | |
5042 | extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); | |
5043 | ||
5044 | ||
5045 | extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); | |
5046 | ||
5047 | ||
5048 | extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
5049 | # 328 "/usr/include/time.h" 3 4 | |
5050 | extern int nanosleep (__const struct timespec *__requested_time, | |
5051 | struct timespec *__remaining); | |
5052 | ||
5053 | ||
5054 | ||
5055 | extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__)); | |
5056 | ||
5057 | ||
5058 | extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__)); | |
5059 | ||
5060 | ||
5061 | extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) | |
5062 | __attribute__ ((__nothrow__ , __leaf__)); | |
5063 | ||
5064 | ||
5065 | ||
5066 | ||
5067 | ||
5068 | ||
5069 | extern int clock_nanosleep (clockid_t __clock_id, int __flags, | |
5070 | __const struct timespec *__req, | |
5071 | struct timespec *__rem); | |
5072 | ||
5073 | ||
5074 | extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__)); | |
5075 | ||
5076 | ||
5077 | ||
5078 | ||
5079 | extern int timer_create (clockid_t __clock_id, | |
5080 | struct sigevent *__restrict __evp, | |
5081 | timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__)); | |
5082 | ||
5083 | ||
5084 | extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__)); | |
5085 | ||
5086 | ||
5087 | extern int timer_settime (timer_t __timerid, int __flags, | |
5088 | __const struct itimerspec *__restrict __value, | |
5089 | struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__)); | |
5090 | ||
5091 | ||
5092 | extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) | |
5093 | __attribute__ ((__nothrow__ , __leaf__)); | |
5094 | ||
5095 | ||
5096 | extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__)); | |
5097 | # 390 "/usr/include/time.h" 3 4 | |
5098 | extern int getdate_err; | |
5099 | # 399 "/usr/include/time.h" 3 4 | |
5100 | extern struct tm *getdate (__const char *__string); | |
5101 | # 413 "/usr/include/time.h" 3 4 | |
5102 | extern int getdate_r (__const char *__restrict __string, | |
5103 | struct tm *__restrict __resbufp); | |
5104 | ||
5105 | ||
5106 | ||
5107 | # 31 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
5108 | # 1 "/usr/include/ctype.h" 1 3 4 | |
5109 | # 30 "/usr/include/ctype.h" 3 4 | |
5110 | ||
5111 | # 48 "/usr/include/ctype.h" 3 4 | |
5112 | enum | |
5113 | { | |
5114 | _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), | |
5115 | _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), | |
5116 | _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), | |
5117 | _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), | |
5118 | _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), | |
5119 | _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), | |
5120 | _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), | |
5121 | _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), | |
5122 | _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), | |
5123 | _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), | |
5124 | _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), | |
5125 | _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) | |
5126 | }; | |
5127 | # 81 "/usr/include/ctype.h" 3 4 | |
5128 | extern __const unsigned short int **__ctype_b_loc (void) | |
5129 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const)); | |
5130 | extern __const __int32_t **__ctype_tolower_loc (void) | |
5131 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const)); | |
5132 | extern __const __int32_t **__ctype_toupper_loc (void) | |
5133 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const)); | |
5134 | # 106 "/usr/include/ctype.h" 3 4 | |
5135 | ||
5136 | ||
5137 | ||
5138 | ||
5139 | ||
5140 | ||
5141 | extern int isalnum (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5142 | extern int isalpha (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5143 | extern int iscntrl (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5144 | extern int isdigit (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5145 | extern int islower (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5146 | extern int isgraph (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5147 | extern int isprint (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5148 | extern int ispunct (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5149 | extern int isspace (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5150 | extern int isupper (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5151 | extern int isxdigit (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5152 | ||
5153 | ||
5154 | ||
5155 | extern int tolower (int __c) __attribute__ ((__nothrow__ , __leaf__)); | |
5156 | ||
5157 | ||
5158 | extern int toupper (int __c) __attribute__ ((__nothrow__ , __leaf__)); | |
5159 | ||
5160 | ||
5161 | ||
5162 | ||
5163 | ||
5164 | ||
5165 | ||
5166 | ||
5167 | extern int isblank (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5168 | ||
5169 | ||
5170 | ||
5171 | ||
5172 | ||
5173 | ||
5174 | extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__ , __leaf__)); | |
5175 | ||
5176 | ||
5177 | ||
5178 | ||
5179 | ||
5180 | ||
5181 | extern int isascii (int __c) __attribute__ ((__nothrow__ , __leaf__)); | |
5182 | ||
5183 | ||
5184 | ||
5185 | extern int toascii (int __c) __attribute__ ((__nothrow__ , __leaf__)); | |
5186 | ||
5187 | ||
5188 | ||
5189 | extern int _toupper (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5190 | extern int _tolower (int) __attribute__ ((__nothrow__ , __leaf__)); | |
5191 | # 216 "/usr/include/ctype.h" 3 4 | |
5192 | extern __inline int | |
5193 | __attribute__ ((__nothrow__ , __leaf__)) tolower (int __c) | |
5194 | { | |
5195 | return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; | |
5196 | } | |
5197 | ||
5198 | extern __inline int | |
5199 | __attribute__ ((__nothrow__ , __leaf__)) toupper (int __c) | |
5200 | { | |
5201 | return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; | |
5202 | } | |
5203 | # 273 "/usr/include/ctype.h" 3 4 | |
5204 | extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); | |
5205 | extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); | |
5206 | extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); | |
5207 | extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); | |
5208 | extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); | |
5209 | extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); | |
5210 | extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); | |
5211 | extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); | |
5212 | extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); | |
5213 | extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); | |
5214 | extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); | |
5215 | ||
5216 | extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); | |
5217 | ||
5218 | ||
5219 | ||
5220 | extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); | |
5221 | extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); | |
5222 | ||
5223 | ||
5224 | extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); | |
5225 | extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); | |
5226 | # 349 "/usr/include/ctype.h" 3 4 | |
5227 | ||
5228 | # 32 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
5229 | # 1 "/usr/include/errno.h" 1 3 4 | |
5230 | # 32 "/usr/include/errno.h" 3 4 | |
5231 | ||
5232 | ||
5233 | ||
5234 | ||
5235 | # 1 "/usr/include/bits/errno.h" 1 3 4 | |
5236 | # 25 "/usr/include/bits/errno.h" 3 4 | |
5237 | # 1 "/usr/include/linux/errno.h" 1 3 4 | |
5238 | ||
5239 | ||
5240 | ||
5241 | # 1 "/usr/include/asm/errno.h" 1 3 4 | |
5242 | # 1 "/usr/include/asm-generic/errno.h" 1 3 4 | |
5243 | ||
5244 | ||
5245 | ||
5246 | # 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 | |
5247 | # 5 "/usr/include/asm-generic/errno.h" 2 3 4 | |
5248 | # 1 "/usr/include/asm/errno.h" 2 3 4 | |
5249 | # 5 "/usr/include/linux/errno.h" 2 3 4 | |
5250 | # 26 "/usr/include/bits/errno.h" 2 3 4 | |
5251 | # 47 "/usr/include/bits/errno.h" 3 4 | |
5252 | extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
5253 | # 37 "/usr/include/errno.h" 2 3 4 | |
5254 | # 55 "/usr/include/errno.h" 3 4 | |
5255 | extern char *program_invocation_name, *program_invocation_short_name; | |
5256 | ||
5257 | ||
5258 | ||
5259 | ||
5260 | # 69 "/usr/include/errno.h" 3 4 | |
5261 | typedef int error_t; | |
5262 | # 33 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
5263 | # 1 "/usr/include/unistd.h" 1 3 4 | |
5264 | # 28 "/usr/include/unistd.h" 3 4 | |
5265 | ||
5266 | # 203 "/usr/include/unistd.h" 3 4 | |
5267 | # 1 "/usr/include/bits/posix_opt.h" 1 3 4 | |
5268 | # 204 "/usr/include/unistd.h" 2 3 4 | |
5269 | ||
5270 | ||
5271 | ||
5272 | # 1 "/usr/include/bits/environments.h" 1 3 4 | |
5273 | # 208 "/usr/include/unistd.h" 2 3 4 | |
5274 | # 227 "/usr/include/unistd.h" 3 4 | |
5275 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
5276 | # 228 "/usr/include/unistd.h" 2 3 4 | |
5277 | # 275 "/usr/include/unistd.h" 3 4 | |
5278 | typedef __socklen_t socklen_t; | |
5279 | # 288 "/usr/include/unistd.h" 3 4 | |
5280 | extern int access (__const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
5281 | ||
5282 | ||
5283 | ||
5284 | ||
5285 | extern int euidaccess (__const char *__name, int __type) | |
5286 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
5287 | ||
5288 | ||
5289 | extern int eaccess (__const char *__name, int __type) | |
5290 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
5291 | ||
5292 | ||
5293 | ||
5294 | ||
5295 | ||
5296 | ||
5297 | extern int faccessat (int __fd, __const char *__file, int __type, int __flag) | |
5298 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); | |
5299 | # 338 "/usr/include/unistd.h" 3 4 | |
5300 | extern __off64_t lseek (int __fd, __off64_t __offset, int __whence) __asm__ ("" "lseek64") __attribute__ ((__nothrow__ , __leaf__)) | |
5301 | ||
5302 | ; | |
5303 | ||
5304 | ||
5305 | ||
5306 | ||
5307 | ||
5308 | extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) | |
5309 | __attribute__ ((__nothrow__ , __leaf__)); | |
5310 | ||
5311 | ||
5312 | ||
5313 | ||
5314 | ||
5315 | ||
5316 | extern int close (int __fd); | |
5317 | ||
5318 | ||
5319 | ||
5320 | ||
5321 | ||
5322 | ||
5323 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); | |
5324 | ||
5325 | ||
5326 | ||
5327 | ||
5328 | ||
5329 | extern ssize_t write (int __fd, __const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); | |
5330 | # 389 "/usr/include/unistd.h" 3 4 | |
5331 | extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") | |
5332 | ||
5333 | __attribute__ ((__warn_unused_result__)); | |
5334 | extern ssize_t pwrite (int __fd, __const void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pwrite64") | |
5335 | ||
5336 | __attribute__ ((__warn_unused_result__)); | |
5337 | # 405 "/usr/include/unistd.h" 3 4 | |
5338 | extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, | |
5339 | __off64_t __offset) __attribute__ ((__warn_unused_result__)); | |
5340 | ||
5341 | ||
5342 | extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, | |
5343 | __off64_t __offset) __attribute__ ((__warn_unused_result__)); | |
5344 | ||
5345 | ||
5346 | ||
5347 | ||
5348 | ||
5349 | ||
5350 | ||
5351 | extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
5352 | ||
5353 | ||
5354 | ||
5355 | ||
5356 | extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
5357 | # 433 "/usr/include/unistd.h" 3 4 | |
5358 | extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__)); | |
5359 | # 445 "/usr/include/unistd.h" 3 4 | |
5360 | extern unsigned int sleep (unsigned int __seconds); | |
5361 | ||
5362 | ||
5363 | ||
5364 | ||
5365 | ||
5366 | ||
5367 | ||
5368 | extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) | |
5369 | __attribute__ ((__nothrow__ , __leaf__)); | |
5370 | ||
5371 | ||
5372 | ||
5373 | ||
5374 | ||
5375 | ||
5376 | extern int usleep (__useconds_t __useconds); | |
5377 | # 470 "/usr/include/unistd.h" 3 4 | |
5378 | extern int pause (void); | |
5379 | ||
5380 | ||
5381 | ||
5382 | extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) | |
5383 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
5384 | ||
5385 | ||
5386 | ||
5387 | extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
5388 | ||
5389 | ||
5390 | ||
5391 | ||
5392 | extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) | |
5393 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
5394 | ||
5395 | ||
5396 | ||
5397 | ||
5398 | ||
5399 | ||
5400 | extern int fchownat (int __fd, __const char *__file, __uid_t __owner, | |
5401 | __gid_t __group, int __flag) | |
5402 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); | |
5403 | ||
5404 | ||
5405 | ||
5406 | extern int chdir (__const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
5407 | ||
5408 | ||
5409 | ||
5410 | extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
5411 | # 512 "/usr/include/unistd.h" 3 4 | |
5412 | extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
5413 | ||
5414 | ||
5415 | ||
5416 | ||
5417 | ||
5418 | extern char *get_current_dir_name (void) __attribute__ ((__nothrow__ , __leaf__)); | |
5419 | ||
5420 | ||
5421 | ||
5422 | ||
5423 | ||
5424 | ||
5425 | ||
5426 | extern char *getwd (char *__buf) | |
5427 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); | |
5428 | ||
5429 | ||
5430 | ||
5431 | ||
5432 | extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
5433 | ||
5434 | ||
5435 | extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__)); | |
5436 | ||
5437 | ||
5438 | ||
5439 | ||
5440 | extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__ , __leaf__)); | |
5441 | ||
5442 | ||
5443 | ||
5444 | extern char **__environ; | |
5445 | ||
5446 | extern char **environ; | |
5447 | ||
5448 | ||
5449 | ||
5450 | ||
5451 | ||
5452 | extern int execve (__const char *__path, char *__const __argv[], | |
5453 | char *__const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
5454 | ||
5455 | ||
5456 | ||
5457 | ||
5458 | extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) | |
5459 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
5460 | ||
5461 | ||
5462 | ||
5463 | ||
5464 | extern int execv (__const char *__path, char *__const __argv[]) | |
5465 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
5466 | ||
5467 | ||
5468 | ||
5469 | extern int execle (__const char *__path, __const char *__arg, ...) | |
5470 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
5471 | ||
5472 | ||
5473 | ||
5474 | extern int execl (__const char *__path, __const char *__arg, ...) | |
5475 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
5476 | ||
5477 | ||
5478 | ||
5479 | extern int execvp (__const char *__file, char *__const __argv[]) | |
5480 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
5481 | ||
5482 | ||
5483 | ||
5484 | ||
5485 | extern int execlp (__const char *__file, __const char *__arg, ...) | |
5486 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
5487 | ||
5488 | ||
5489 | ||
5490 | ||
5491 | extern int execvpe (__const char *__file, char *__const __argv[], | |
5492 | char *__const __envp[]) | |
5493 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
5494 | ||
5495 | ||
5496 | ||
5497 | ||
5498 | ||
5499 | extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
5500 | ||
5501 | ||
5502 | ||
5503 | ||
5504 | extern void _exit (int __status) __attribute__ ((__noreturn__)); | |
5505 | ||
5506 | ||
5507 | ||
5508 | ||
5509 | ||
5510 | # 1 "/usr/include/bits/confname.h" 1 3 4 | |
5511 | # 26 "/usr/include/bits/confname.h" 3 4 | |
5512 | enum | |
5513 | { | |
5514 | _PC_LINK_MAX, | |
5515 | ||
5516 | _PC_MAX_CANON, | |
5517 | ||
5518 | _PC_MAX_INPUT, | |
5519 | ||
5520 | _PC_NAME_MAX, | |
5521 | ||
5522 | _PC_PATH_MAX, | |
5523 | ||
5524 | _PC_PIPE_BUF, | |
5525 | ||
5526 | _PC_CHOWN_RESTRICTED, | |
5527 | ||
5528 | _PC_NO_TRUNC, | |
5529 | ||
5530 | _PC_VDISABLE, | |
5531 | ||
5532 | _PC_SYNC_IO, | |
5533 | ||
5534 | _PC_ASYNC_IO, | |
5535 | ||
5536 | _PC_PRIO_IO, | |
5537 | ||
5538 | _PC_SOCK_MAXBUF, | |
5539 | ||
5540 | _PC_FILESIZEBITS, | |
5541 | ||
5542 | _PC_REC_INCR_XFER_SIZE, | |
5543 | ||
5544 | _PC_REC_MAX_XFER_SIZE, | |
5545 | ||
5546 | _PC_REC_MIN_XFER_SIZE, | |
5547 | ||
5548 | _PC_REC_XFER_ALIGN, | |
5549 | ||
5550 | _PC_ALLOC_SIZE_MIN, | |
5551 | ||
5552 | _PC_SYMLINK_MAX, | |
5553 | ||
5554 | _PC_2_SYMLINKS | |
5555 | ||
5556 | }; | |
5557 | ||
5558 | ||
5559 | enum | |
5560 | { | |
5561 | _SC_ARG_MAX, | |
5562 | ||
5563 | _SC_CHILD_MAX, | |
5564 | ||
5565 | _SC_CLK_TCK, | |
5566 | ||
5567 | _SC_NGROUPS_MAX, | |
5568 | ||
5569 | _SC_OPEN_MAX, | |
5570 | ||
5571 | _SC_STREAM_MAX, | |
5572 | ||
5573 | _SC_TZNAME_MAX, | |
5574 | ||
5575 | _SC_JOB_CONTROL, | |
5576 | ||
5577 | _SC_SAVED_IDS, | |
5578 | ||
5579 | _SC_REALTIME_SIGNALS, | |
5580 | ||
5581 | _SC_PRIORITY_SCHEDULING, | |
5582 | ||
5583 | _SC_TIMERS, | |
5584 | ||
5585 | _SC_ASYNCHRONOUS_IO, | |
5586 | ||
5587 | _SC_PRIORITIZED_IO, | |
5588 | ||
5589 | _SC_SYNCHRONIZED_IO, | |
5590 | ||
5591 | _SC_FSYNC, | |
5592 | ||
5593 | _SC_MAPPED_FILES, | |
5594 | ||
5595 | _SC_MEMLOCK, | |
5596 | ||
5597 | _SC_MEMLOCK_RANGE, | |
5598 | ||
5599 | _SC_MEMORY_PROTECTION, | |
5600 | ||
5601 | _SC_MESSAGE_PASSING, | |
5602 | ||
5603 | _SC_SEMAPHORES, | |
5604 | ||
5605 | _SC_SHARED_MEMORY_OBJECTS, | |
5606 | ||
5607 | _SC_AIO_LISTIO_MAX, | |
5608 | ||
5609 | _SC_AIO_MAX, | |
5610 | ||
5611 | _SC_AIO_PRIO_DELTA_MAX, | |
5612 | ||
5613 | _SC_DELAYTIMER_MAX, | |
5614 | ||
5615 | _SC_MQ_OPEN_MAX, | |
5616 | ||
5617 | _SC_MQ_PRIO_MAX, | |
5618 | ||
5619 | _SC_VERSION, | |
5620 | ||
5621 | _SC_PAGESIZE, | |
5622 | ||
5623 | ||
5624 | _SC_RTSIG_MAX, | |
5625 | ||
5626 | _SC_SEM_NSEMS_MAX, | |
5627 | ||
5628 | _SC_SEM_VALUE_MAX, | |
5629 | ||
5630 | _SC_SIGQUEUE_MAX, | |
5631 | ||
5632 | _SC_TIMER_MAX, | |
5633 | ||
5634 | ||
5635 | ||
5636 | ||
5637 | _SC_BC_BASE_MAX, | |
5638 | ||
5639 | _SC_BC_DIM_MAX, | |
5640 | ||
5641 | _SC_BC_SCALE_MAX, | |
5642 | ||
5643 | _SC_BC_STRING_MAX, | |
5644 | ||
5645 | _SC_COLL_WEIGHTS_MAX, | |
5646 | ||
5647 | _SC_EQUIV_CLASS_MAX, | |
5648 | ||
5649 | _SC_EXPR_NEST_MAX, | |
5650 | ||
5651 | _SC_LINE_MAX, | |
5652 | ||
5653 | _SC_RE_DUP_MAX, | |
5654 | ||
5655 | _SC_CHARCLASS_NAME_MAX, | |
5656 | ||
5657 | ||
5658 | _SC_2_VERSION, | |
5659 | ||
5660 | _SC_2_C_BIND, | |
5661 | ||
5662 | _SC_2_C_DEV, | |
5663 | ||
5664 | _SC_2_FORT_DEV, | |
5665 | ||
5666 | _SC_2_FORT_RUN, | |
5667 | ||
5668 | _SC_2_SW_DEV, | |
5669 | ||
5670 | _SC_2_LOCALEDEF, | |
5671 | ||
5672 | ||
5673 | _SC_PII, | |
5674 | ||
5675 | _SC_PII_XTI, | |
5676 | ||
5677 | _SC_PII_SOCKET, | |
5678 | ||
5679 | _SC_PII_INTERNET, | |
5680 | ||
5681 | _SC_PII_OSI, | |
5682 | ||
5683 | _SC_POLL, | |
5684 | ||
5685 | _SC_SELECT, | |
5686 | ||
5687 | _SC_UIO_MAXIOV, | |
5688 | ||
5689 | _SC_IOV_MAX = _SC_UIO_MAXIOV, | |
5690 | ||
5691 | _SC_PII_INTERNET_STREAM, | |
5692 | ||
5693 | _SC_PII_INTERNET_DGRAM, | |
5694 | ||
5695 | _SC_PII_OSI_COTS, | |
5696 | ||
5697 | _SC_PII_OSI_CLTS, | |
5698 | ||
5699 | _SC_PII_OSI_M, | |
5700 | ||
5701 | _SC_T_IOV_MAX, | |
5702 | ||
5703 | ||
5704 | ||
5705 | _SC_THREADS, | |
5706 | ||
5707 | _SC_THREAD_SAFE_FUNCTIONS, | |
5708 | ||
5709 | _SC_GETGR_R_SIZE_MAX, | |
5710 | ||
5711 | _SC_GETPW_R_SIZE_MAX, | |
5712 | ||
5713 | _SC_LOGIN_NAME_MAX, | |
5714 | ||
5715 | _SC_TTY_NAME_MAX, | |
5716 | ||
5717 | _SC_THREAD_DESTRUCTOR_ITERATIONS, | |
5718 | ||
5719 | _SC_THREAD_KEYS_MAX, | |
5720 | ||
5721 | _SC_THREAD_STACK_MIN, | |
5722 | ||
5723 | _SC_THREAD_THREADS_MAX, | |
5724 | ||
5725 | _SC_THREAD_ATTR_STACKADDR, | |
5726 | ||
5727 | _SC_THREAD_ATTR_STACKSIZE, | |
5728 | ||
5729 | _SC_THREAD_PRIORITY_SCHEDULING, | |
5730 | ||
5731 | _SC_THREAD_PRIO_INHERIT, | |
5732 | ||
5733 | _SC_THREAD_PRIO_PROTECT, | |
5734 | ||
5735 | _SC_THREAD_PROCESS_SHARED, | |
5736 | ||
5737 | ||
5738 | _SC_NPROCESSORS_CONF, | |
5739 | ||
5740 | _SC_NPROCESSORS_ONLN, | |
5741 | ||
5742 | _SC_PHYS_PAGES, | |
5743 | ||
5744 | _SC_AVPHYS_PAGES, | |
5745 | ||
5746 | _SC_ATEXIT_MAX, | |
5747 | ||
5748 | _SC_PASS_MAX, | |
5749 | ||
5750 | ||
5751 | _SC_XOPEN_VERSION, | |
5752 | ||
5753 | _SC_XOPEN_XCU_VERSION, | |
5754 | ||
5755 | _SC_XOPEN_UNIX, | |
5756 | ||
5757 | _SC_XOPEN_CRYPT, | |
5758 | ||
5759 | _SC_XOPEN_ENH_I18N, | |
5760 | ||
5761 | _SC_XOPEN_SHM, | |
5762 | ||
5763 | ||
5764 | _SC_2_CHAR_TERM, | |
5765 | ||
5766 | _SC_2_C_VERSION, | |
5767 | ||
5768 | _SC_2_UPE, | |
5769 | ||
5770 | ||
5771 | _SC_XOPEN_XPG2, | |
5772 | ||
5773 | _SC_XOPEN_XPG3, | |
5774 | ||
5775 | _SC_XOPEN_XPG4, | |
5776 | ||
5777 | ||
5778 | _SC_CHAR_BIT, | |
5779 | ||
5780 | _SC_CHAR_MAX, | |
5781 | ||
5782 | _SC_CHAR_MIN, | |
5783 | ||
5784 | _SC_INT_MAX, | |
5785 | ||
5786 | _SC_INT_MIN, | |
5787 | ||
5788 | _SC_LONG_BIT, | |
5789 | ||
5790 | _SC_WORD_BIT, | |
5791 | ||
5792 | _SC_MB_LEN_MAX, | |
5793 | ||
5794 | _SC_NZERO, | |
5795 | ||
5796 | _SC_SSIZE_MAX, | |
5797 | ||
5798 | _SC_SCHAR_MAX, | |
5799 | ||
5800 | _SC_SCHAR_MIN, | |
5801 | ||
5802 | _SC_SHRT_MAX, | |
5803 | ||
5804 | _SC_SHRT_MIN, | |
5805 | ||
5806 | _SC_UCHAR_MAX, | |
5807 | ||
5808 | _SC_UINT_MAX, | |
5809 | ||
5810 | _SC_ULONG_MAX, | |
5811 | ||
5812 | _SC_USHRT_MAX, | |
5813 | ||
5814 | ||
5815 | _SC_NL_ARGMAX, | |
5816 | ||
5817 | _SC_NL_LANGMAX, | |
5818 | ||
5819 | _SC_NL_MSGMAX, | |
5820 | ||
5821 | _SC_NL_NMAX, | |
5822 | ||
5823 | _SC_NL_SETMAX, | |
5824 | ||
5825 | _SC_NL_TEXTMAX, | |
5826 | ||
5827 | ||
5828 | _SC_XBS5_ILP32_OFF32, | |
5829 | ||
5830 | _SC_XBS5_ILP32_OFFBIG, | |
5831 | ||
5832 | _SC_XBS5_LP64_OFF64, | |
5833 | ||
5834 | _SC_XBS5_LPBIG_OFFBIG, | |
5835 | ||
5836 | ||
5837 | _SC_XOPEN_LEGACY, | |
5838 | ||
5839 | _SC_XOPEN_REALTIME, | |
5840 | ||
5841 | _SC_XOPEN_REALTIME_THREADS, | |
5842 | ||
5843 | ||
5844 | _SC_ADVISORY_INFO, | |
5845 | ||
5846 | _SC_BARRIERS, | |
5847 | ||
5848 | _SC_BASE, | |
5849 | ||
5850 | _SC_C_LANG_SUPPORT, | |
5851 | ||
5852 | _SC_C_LANG_SUPPORT_R, | |
5853 | ||
5854 | _SC_CLOCK_SELECTION, | |
5855 | ||
5856 | _SC_CPUTIME, | |
5857 | ||
5858 | _SC_THREAD_CPUTIME, | |
5859 | ||
5860 | _SC_DEVICE_IO, | |
5861 | ||
5862 | _SC_DEVICE_SPECIFIC, | |
5863 | ||
5864 | _SC_DEVICE_SPECIFIC_R, | |
5865 | ||
5866 | _SC_FD_MGMT, | |
5867 | ||
5868 | _SC_FIFO, | |
5869 | ||
5870 | _SC_PIPE, | |
5871 | ||
5872 | _SC_FILE_ATTRIBUTES, | |
5873 | ||
5874 | _SC_FILE_LOCKING, | |
5875 | ||
5876 | _SC_FILE_SYSTEM, | |
5877 | ||
5878 | _SC_MONOTONIC_CLOCK, | |
5879 | ||
5880 | _SC_MULTI_PROCESS, | |
5881 | ||
5882 | _SC_SINGLE_PROCESS, | |
5883 | ||
5884 | _SC_NETWORKING, | |
5885 | ||
5886 | _SC_READER_WRITER_LOCKS, | |
5887 | ||
5888 | _SC_SPIN_LOCKS, | |
5889 | ||
5890 | _SC_REGEXP, | |
5891 | ||
5892 | _SC_REGEX_VERSION, | |
5893 | ||
5894 | _SC_SHELL, | |
5895 | ||
5896 | _SC_SIGNALS, | |
5897 | ||
5898 | _SC_SPAWN, | |
5899 | ||
5900 | _SC_SPORADIC_SERVER, | |
5901 | ||
5902 | _SC_THREAD_SPORADIC_SERVER, | |
5903 | ||
5904 | _SC_SYSTEM_DATABASE, | |
5905 | ||
5906 | _SC_SYSTEM_DATABASE_R, | |
5907 | ||
5908 | _SC_TIMEOUTS, | |
5909 | ||
5910 | _SC_TYPED_MEMORY_OBJECTS, | |
5911 | ||
5912 | _SC_USER_GROUPS, | |
5913 | ||
5914 | _SC_USER_GROUPS_R, | |
5915 | ||
5916 | _SC_2_PBS, | |
5917 | ||
5918 | _SC_2_PBS_ACCOUNTING, | |
5919 | ||
5920 | _SC_2_PBS_LOCATE, | |
5921 | ||
5922 | _SC_2_PBS_MESSAGE, | |
5923 | ||
5924 | _SC_2_PBS_TRACK, | |
5925 | ||
5926 | _SC_SYMLOOP_MAX, | |
5927 | ||
5928 | _SC_STREAMS, | |
5929 | ||
5930 | _SC_2_PBS_CHECKPOINT, | |
5931 | ||
5932 | ||
5933 | _SC_V6_ILP32_OFF32, | |
5934 | ||
5935 | _SC_V6_ILP32_OFFBIG, | |
5936 | ||
5937 | _SC_V6_LP64_OFF64, | |
5938 | ||
5939 | _SC_V6_LPBIG_OFFBIG, | |
5940 | ||
5941 | ||
5942 | _SC_HOST_NAME_MAX, | |
5943 | ||
5944 | _SC_TRACE, | |
5945 | ||
5946 | _SC_TRACE_EVENT_FILTER, | |
5947 | ||
5948 | _SC_TRACE_INHERIT, | |
5949 | ||
5950 | _SC_TRACE_LOG, | |
5951 | ||
5952 | ||
5953 | _SC_LEVEL1_ICACHE_SIZE, | |
5954 | ||
5955 | _SC_LEVEL1_ICACHE_ASSOC, | |
5956 | ||
5957 | _SC_LEVEL1_ICACHE_LINESIZE, | |
5958 | ||
5959 | _SC_LEVEL1_DCACHE_SIZE, | |
5960 | ||
5961 | _SC_LEVEL1_DCACHE_ASSOC, | |
5962 | ||
5963 | _SC_LEVEL1_DCACHE_LINESIZE, | |
5964 | ||
5965 | _SC_LEVEL2_CACHE_SIZE, | |
5966 | ||
5967 | _SC_LEVEL2_CACHE_ASSOC, | |
5968 | ||
5969 | _SC_LEVEL2_CACHE_LINESIZE, | |
5970 | ||
5971 | _SC_LEVEL3_CACHE_SIZE, | |
5972 | ||
5973 | _SC_LEVEL3_CACHE_ASSOC, | |
5974 | ||
5975 | _SC_LEVEL3_CACHE_LINESIZE, | |
5976 | ||
5977 | _SC_LEVEL4_CACHE_SIZE, | |
5978 | ||
5979 | _SC_LEVEL4_CACHE_ASSOC, | |
5980 | ||
5981 | _SC_LEVEL4_CACHE_LINESIZE, | |
5982 | ||
5983 | ||
5984 | ||
5985 | _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, | |
5986 | ||
5987 | _SC_RAW_SOCKETS, | |
5988 | ||
5989 | ||
5990 | _SC_V7_ILP32_OFF32, | |
5991 | ||
5992 | _SC_V7_ILP32_OFFBIG, | |
5993 | ||
5994 | _SC_V7_LP64_OFF64, | |
5995 | ||
5996 | _SC_V7_LPBIG_OFFBIG, | |
5997 | ||
5998 | ||
5999 | _SC_SS_REPL_MAX, | |
6000 | ||
6001 | ||
6002 | _SC_TRACE_EVENT_NAME_MAX, | |
6003 | ||
6004 | _SC_TRACE_NAME_MAX, | |
6005 | ||
6006 | _SC_TRACE_SYS_MAX, | |
6007 | ||
6008 | _SC_TRACE_USER_EVENT_MAX, | |
6009 | ||
6010 | ||
6011 | _SC_XOPEN_STREAMS, | |
6012 | ||
6013 | ||
6014 | _SC_THREAD_ROBUST_PRIO_INHERIT, | |
6015 | ||
6016 | _SC_THREAD_ROBUST_PRIO_PROTECT | |
6017 | ||
6018 | }; | |
6019 | ||
6020 | ||
6021 | enum | |
6022 | { | |
6023 | _CS_PATH, | |
6024 | ||
6025 | ||
6026 | _CS_V6_WIDTH_RESTRICTED_ENVS, | |
6027 | ||
6028 | ||
6029 | ||
6030 | _CS_GNU_LIBC_VERSION, | |
6031 | ||
6032 | _CS_GNU_LIBPTHREAD_VERSION, | |
6033 | ||
6034 | ||
6035 | _CS_V5_WIDTH_RESTRICTED_ENVS, | |
6036 | ||
6037 | ||
6038 | ||
6039 | _CS_V7_WIDTH_RESTRICTED_ENVS, | |
6040 | ||
6041 | ||
6042 | ||
6043 | _CS_LFS_CFLAGS = 1000, | |
6044 | ||
6045 | _CS_LFS_LDFLAGS, | |
6046 | ||
6047 | _CS_LFS_LIBS, | |
6048 | ||
6049 | _CS_LFS_LINTFLAGS, | |
6050 | ||
6051 | _CS_LFS64_CFLAGS, | |
6052 | ||
6053 | _CS_LFS64_LDFLAGS, | |
6054 | ||
6055 | _CS_LFS64_LIBS, | |
6056 | ||
6057 | _CS_LFS64_LINTFLAGS, | |
6058 | ||
6059 | ||
6060 | _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, | |
6061 | ||
6062 | _CS_XBS5_ILP32_OFF32_LDFLAGS, | |
6063 | ||
6064 | _CS_XBS5_ILP32_OFF32_LIBS, | |
6065 | ||
6066 | _CS_XBS5_ILP32_OFF32_LINTFLAGS, | |
6067 | ||
6068 | _CS_XBS5_ILP32_OFFBIG_CFLAGS, | |
6069 | ||
6070 | _CS_XBS5_ILP32_OFFBIG_LDFLAGS, | |
6071 | ||
6072 | _CS_XBS5_ILP32_OFFBIG_LIBS, | |
6073 | ||
6074 | _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, | |
6075 | ||
6076 | _CS_XBS5_LP64_OFF64_CFLAGS, | |
6077 | ||
6078 | _CS_XBS5_LP64_OFF64_LDFLAGS, | |
6079 | ||
6080 | _CS_XBS5_LP64_OFF64_LIBS, | |
6081 | ||
6082 | _CS_XBS5_LP64_OFF64_LINTFLAGS, | |
6083 | ||
6084 | _CS_XBS5_LPBIG_OFFBIG_CFLAGS, | |
6085 | ||
6086 | _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, | |
6087 | ||
6088 | _CS_XBS5_LPBIG_OFFBIG_LIBS, | |
6089 | ||
6090 | _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, | |
6091 | ||
6092 | ||
6093 | _CS_POSIX_V6_ILP32_OFF32_CFLAGS, | |
6094 | ||
6095 | _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, | |
6096 | ||
6097 | _CS_POSIX_V6_ILP32_OFF32_LIBS, | |
6098 | ||
6099 | _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, | |
6100 | ||
6101 | _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, | |
6102 | ||
6103 | _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, | |
6104 | ||
6105 | _CS_POSIX_V6_ILP32_OFFBIG_LIBS, | |
6106 | ||
6107 | _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, | |
6108 | ||
6109 | _CS_POSIX_V6_LP64_OFF64_CFLAGS, | |
6110 | ||
6111 | _CS_POSIX_V6_LP64_OFF64_LDFLAGS, | |
6112 | ||
6113 | _CS_POSIX_V6_LP64_OFF64_LIBS, | |
6114 | ||
6115 | _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, | |
6116 | ||
6117 | _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, | |
6118 | ||
6119 | _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, | |
6120 | ||
6121 | _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, | |
6122 | ||
6123 | _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, | |
6124 | ||
6125 | ||
6126 | _CS_POSIX_V7_ILP32_OFF32_CFLAGS, | |
6127 | ||
6128 | _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, | |
6129 | ||
6130 | _CS_POSIX_V7_ILP32_OFF32_LIBS, | |
6131 | ||
6132 | _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, | |
6133 | ||
6134 | _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, | |
6135 | ||
6136 | _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, | |
6137 | ||
6138 | _CS_POSIX_V7_ILP32_OFFBIG_LIBS, | |
6139 | ||
6140 | _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, | |
6141 | ||
6142 | _CS_POSIX_V7_LP64_OFF64_CFLAGS, | |
6143 | ||
6144 | _CS_POSIX_V7_LP64_OFF64_LDFLAGS, | |
6145 | ||
6146 | _CS_POSIX_V7_LP64_OFF64_LIBS, | |
6147 | ||
6148 | _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, | |
6149 | ||
6150 | _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, | |
6151 | ||
6152 | _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, | |
6153 | ||
6154 | _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, | |
6155 | ||
6156 | _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, | |
6157 | ||
6158 | ||
6159 | _CS_V6_ENV, | |
6160 | ||
6161 | _CS_V7_ENV | |
6162 | ||
6163 | }; | |
6164 | # 611 "/usr/include/unistd.h" 2 3 4 | |
6165 | ||
6166 | ||
6167 | extern long int pathconf (__const char *__path, int __name) | |
6168 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
6169 | ||
6170 | ||
6171 | extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__)); | |
6172 | ||
6173 | ||
6174 | extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__)); | |
6175 | ||
6176 | ||
6177 | ||
6178 | extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); | |
6179 | ||
6180 | ||
6181 | ||
6182 | ||
6183 | extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6184 | ||
6185 | ||
6186 | extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6187 | ||
6188 | ||
6189 | ||
6190 | ||
6191 | extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6192 | # 647 "/usr/include/unistd.h" 3 4 | |
6193 | extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); | |
6194 | ||
6195 | extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); | |
6196 | ||
6197 | ||
6198 | ||
6199 | ||
6200 | ||
6201 | ||
6202 | extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__)); | |
6203 | # 673 "/usr/include/unistd.h" 3 4 | |
6204 | extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6205 | # 690 "/usr/include/unistd.h" 3 4 | |
6206 | extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6207 | ||
6208 | ||
6209 | ||
6210 | extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); | |
6211 | ||
6212 | ||
6213 | ||
6214 | extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6215 | ||
6216 | ||
6217 | extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6218 | ||
6219 | ||
6220 | extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6221 | ||
6222 | ||
6223 | extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6224 | ||
6225 | ||
6226 | ||
6227 | ||
6228 | extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
6229 | ||
6230 | ||
6231 | ||
6232 | extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)); | |
6233 | ||
6234 | ||
6235 | ||
6236 | ||
6237 | ||
6238 | ||
6239 | extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)); | |
6240 | ||
6241 | ||
6242 | ||
6243 | ||
6244 | extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)); | |
6245 | ||
6246 | ||
6247 | ||
6248 | ||
6249 | extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)); | |
6250 | ||
6251 | ||
6252 | ||
6253 | ||
6254 | ||
6255 | ||
6256 | extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)); | |
6257 | ||
6258 | ||
6259 | ||
6260 | ||
6261 | extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)); | |
6262 | ||
6263 | ||
6264 | ||
6265 | ||
6266 | extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)); | |
6267 | ||
6268 | ||
6269 | ||
6270 | ||
6271 | ||
6272 | extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) | |
6273 | __attribute__ ((__nothrow__ , __leaf__)); | |
6274 | ||
6275 | ||
6276 | ||
6277 | extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) | |
6278 | __attribute__ ((__nothrow__ , __leaf__)); | |
6279 | ||
6280 | ||
6281 | ||
6282 | extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) | |
6283 | __attribute__ ((__nothrow__ , __leaf__)); | |
6284 | ||
6285 | ||
6286 | ||
6287 | extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) | |
6288 | __attribute__ ((__nothrow__ , __leaf__)); | |
6289 | ||
6290 | ||
6291 | ||
6292 | ||
6293 | ||
6294 | ||
6295 | extern __pid_t fork (void) __attribute__ ((__nothrow__)); | |
6296 | ||
6297 | ||
6298 | ||
6299 | ||
6300 | ||
6301 | ||
6302 | ||
6303 | extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6304 | ||
6305 | ||
6306 | ||
6307 | ||
6308 | ||
6309 | extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__)); | |
6310 | ||
6311 | ||
6312 | ||
6313 | extern int ttyname_r (int __fd, char *__buf, size_t __buflen) | |
6314 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); | |
6315 | ||
6316 | ||
6317 | ||
6318 | extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__)); | |
6319 | ||
6320 | ||
6321 | ||
6322 | ||
6323 | ||
6324 | extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6325 | ||
6326 | ||
6327 | ||
6328 | ||
6329 | extern int link (__const char *__from, __const char *__to) | |
6330 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); | |
6331 | ||
6332 | ||
6333 | ||
6334 | ||
6335 | extern int linkat (int __fromfd, __const char *__from, int __tofd, | |
6336 | __const char *__to, int __flags) | |
6337 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); | |
6338 | ||
6339 | ||
6340 | ||
6341 | ||
6342 | extern int symlink (__const char *__from, __const char *__to) | |
6343 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); | |
6344 | ||
6345 | ||
6346 | ||
6347 | ||
6348 | extern ssize_t readlink (__const char *__restrict __path, | |
6349 | char *__restrict __buf, size_t __len) | |
6350 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); | |
6351 | ||
6352 | ||
6353 | ||
6354 | ||
6355 | extern int symlinkat (__const char *__from, int __tofd, | |
6356 | __const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); | |
6357 | ||
6358 | ||
6359 | extern ssize_t readlinkat (int __fd, __const char *__restrict __path, | |
6360 | char *__restrict __buf, size_t __len) | |
6361 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); | |
6362 | ||
6363 | ||
6364 | ||
6365 | extern int unlink (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
6366 | ||
6367 | ||
6368 | ||
6369 | extern int unlinkat (int __fd, __const char *__name, int __flag) | |
6370 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
6371 | ||
6372 | ||
6373 | ||
6374 | extern int rmdir (__const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
6375 | ||
6376 | ||
6377 | ||
6378 | extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__)); | |
6379 | ||
6380 | ||
6381 | extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__)); | |
6382 | ||
6383 | ||
6384 | ||
6385 | ||
6386 | ||
6387 | ||
6388 | extern char *getlogin (void); | |
6389 | ||
6390 | ||
6391 | ||
6392 | ||
6393 | ||
6394 | ||
6395 | ||
6396 | extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); | |
6397 | ||
6398 | ||
6399 | ||
6400 | ||
6401 | extern int setlogin (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
6402 | # 894 "/usr/include/unistd.h" 3 4 | |
6403 | # 1 "/usr/include/getopt.h" 1 3 4 | |
6404 | # 59 "/usr/include/getopt.h" 3 4 | |
6405 | extern char *optarg; | |
6406 | # 73 "/usr/include/getopt.h" 3 4 | |
6407 | extern int optind; | |
6408 | ||
6409 | ||
6410 | ||
6411 | ||
6412 | extern int opterr; | |
6413 | ||
6414 | ||
6415 | ||
6416 | extern int optopt; | |
6417 | # 152 "/usr/include/getopt.h" 3 4 | |
6418 | extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) | |
6419 | __attribute__ ((__nothrow__ , __leaf__)); | |
6420 | # 895 "/usr/include/unistd.h" 2 3 4 | |
6421 | ||
6422 | ||
6423 | ||
6424 | ||
6425 | ||
6426 | ||
6427 | ||
6428 | extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
6429 | ||
6430 | ||
6431 | ||
6432 | ||
6433 | ||
6434 | ||
6435 | extern int sethostname (__const char *__name, size_t __len) | |
6436 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
6437 | ||
6438 | ||
6439 | ||
6440 | extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
6441 | ||
6442 | ||
6443 | ||
6444 | ||
6445 | ||
6446 | extern int getdomainname (char *__name, size_t __len) | |
6447 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
6448 | extern int setdomainname (__const char *__name, size_t __len) | |
6449 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
6450 | ||
6451 | ||
6452 | ||
6453 | ||
6454 | ||
6455 | extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6456 | ||
6457 | ||
6458 | extern int revoke (__const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
6459 | ||
6460 | ||
6461 | ||
6462 | ||
6463 | ||
6464 | ||
6465 | ||
6466 | extern int profil (unsigned short int *__sample_buffer, size_t __size, | |
6467 | size_t __offset, unsigned int __scale) | |
6468 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
6469 | ||
6470 | ||
6471 | ||
6472 | ||
6473 | ||
6474 | extern int acct (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)); | |
6475 | ||
6476 | ||
6477 | ||
6478 | extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6479 | extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6480 | extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6481 | ||
6482 | ||
6483 | ||
6484 | ||
6485 | ||
6486 | extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
6487 | ||
6488 | ||
6489 | ||
6490 | ||
6491 | ||
6492 | ||
6493 | extern int chroot (__const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
6494 | ||
6495 | ||
6496 | ||
6497 | extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); | |
6498 | # 980 "/usr/include/unistd.h" 3 4 | |
6499 | extern int fsync (int __fd); | |
6500 | ||
6501 | ||
6502 | ||
6503 | ||
6504 | ||
6505 | ||
6506 | extern int syncfs (int __fd) __attribute__ ((__nothrow__ , __leaf__)); | |
6507 | ||
6508 | ||
6509 | ||
6510 | ||
6511 | ||
6512 | ||
6513 | extern long int gethostid (void); | |
6514 | ||
6515 | ||
6516 | extern void sync (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6517 | ||
6518 | ||
6519 | ||
6520 | ||
6521 | ||
6522 | extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
6523 | ||
6524 | ||
6525 | ||
6526 | ||
6527 | extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__)); | |
6528 | # 1022 "/usr/include/unistd.h" 3 4 | |
6529 | extern int truncate (__const char *__file, __off64_t __length) __asm__ ("" "truncate64") __attribute__ ((__nothrow__ , __leaf__)) | |
6530 | ||
6531 | __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
6532 | ||
6533 | ||
6534 | ||
6535 | ||
6536 | ||
6537 | extern int truncate64 (__const char *__file, __off64_t __length) | |
6538 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
6539 | # 1043 "/usr/include/unistd.h" 3 4 | |
6540 | extern int ftruncate (int __fd, __off64_t __length) __asm__ ("" "ftruncate64") __attribute__ ((__nothrow__ , __leaf__)) | |
6541 | __attribute__ ((__warn_unused_result__)); | |
6542 | ||
6543 | ||
6544 | ||
6545 | ||
6546 | ||
6547 | extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
6548 | # 1061 "/usr/include/unistd.h" 3 4 | |
6549 | extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
6550 | ||
6551 | ||
6552 | ||
6553 | ||
6554 | ||
6555 | extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__)); | |
6556 | # 1082 "/usr/include/unistd.h" 3 4 | |
6557 | extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__)); | |
6558 | # 1108 "/usr/include/unistd.h" 3 4 | |
6559 | extern int lockf (int __fd, int __cmd, __off64_t __len) __asm__ ("" "lockf64") | |
6560 | __attribute__ ((__warn_unused_result__)); | |
6561 | ||
6562 | ||
6563 | ||
6564 | ||
6565 | ||
6566 | extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__)); | |
6567 | # 1136 "/usr/include/unistd.h" 3 4 | |
6568 | extern int fdatasync (int __fildes); | |
6569 | ||
6570 | ||
6571 | ||
6572 | ||
6573 | ||
6574 | ||
6575 | ||
6576 | extern char *crypt (__const char *__key, __const char *__salt) | |
6577 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
6578 | ||
6579 | ||
6580 | ||
6581 | extern void encrypt (char *__block, int __edflag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
6582 | ||
6583 | ||
6584 | ||
6585 | ||
6586 | ||
6587 | ||
6588 | extern void swab (__const void *__restrict __from, void *__restrict __to, | |
6589 | ssize_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
6590 | ||
6591 | ||
6592 | ||
6593 | ||
6594 | ||
6595 | ||
6596 | ||
6597 | extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__)); | |
6598 | ||
6599 | ||
6600 | ||
6601 | ||
6602 | ||
6603 | # 1 "/usr/include/bits/unistd.h" 1 3 4 | |
6604 | # 24 "/usr/include/bits/unistd.h" 3 4 | |
6605 | extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, | |
6606 | size_t __buflen) __attribute__ ((__warn_unused_result__)); | |
6607 | extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") | |
6608 | __attribute__ ((__warn_unused_result__)); | |
6609 | extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") | |
6610 | ||
6611 | ||
6612 | __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) | |
6613 | ; | |
6614 | ||
6615 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t | |
6616 | read (int __fd, void *__buf, size_t __nbytes) | |
6617 | { | |
6618 | if (__builtin_object_size (__buf, 0) != (size_t) -1) | |
6619 | { | |
6620 | if (!__builtin_constant_p (__nbytes)) | |
6621 | return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); | |
6622 | ||
6623 | if (__nbytes > __builtin_object_size (__buf, 0)) | |
6624 | return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); | |
6625 | } | |
6626 | return __read_alias (__fd, __buf, __nbytes); | |
6627 | } | |
6628 | ||
6629 | ||
6630 | extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, | |
6631 | __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); | |
6632 | extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, | |
6633 | __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); | |
6634 | extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") | |
6635 | ||
6636 | __attribute__ ((__warn_unused_result__)); | |
6637 | extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") | |
6638 | ||
6639 | __attribute__ ((__warn_unused_result__)); | |
6640 | extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") | |
6641 | ||
6642 | ||
6643 | __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) | |
6644 | ; | |
6645 | extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") | |
6646 | ||
6647 | ||
6648 | ||
6649 | __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) | |
6650 | ; | |
6651 | # 87 "/usr/include/bits/unistd.h" 3 4 | |
6652 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t | |
6653 | pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) | |
6654 | { | |
6655 | if (__builtin_object_size (__buf, 0) != (size_t) -1) | |
6656 | { | |
6657 | if (!__builtin_constant_p (__nbytes)) | |
6658 | return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); | |
6659 | ||
6660 | if ( __nbytes > __builtin_object_size (__buf, 0)) | |
6661 | return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, | |
6662 | __builtin_object_size (__buf, 0)); | |
6663 | } | |
6664 | ||
6665 | return __pread64_alias (__fd, __buf, __nbytes, __offset); | |
6666 | } | |
6667 | ||
6668 | ||
6669 | ||
6670 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t | |
6671 | pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) | |
6672 | { | |
6673 | if (__builtin_object_size (__buf, 0) != (size_t) -1) | |
6674 | { | |
6675 | if (!__builtin_constant_p (__nbytes)) | |
6676 | return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); | |
6677 | ||
6678 | if ( __nbytes > __builtin_object_size (__buf, 0)) | |
6679 | return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, | |
6680 | __builtin_object_size (__buf, 0)); | |
6681 | } | |
6682 | ||
6683 | return __pread64_alias (__fd, __buf, __nbytes, __offset); | |
6684 | } | |
6685 | ||
6686 | ||
6687 | ||
6688 | ||
6689 | extern ssize_t __readlink_chk (__const char *__restrict __path, | |
6690 | char *__restrict __buf, size_t __len, | |
6691 | size_t __buflen) | |
6692 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); | |
6693 | extern ssize_t __readlink_alias (__const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__)) | |
6694 | ||
6695 | ||
6696 | __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); | |
6697 | extern ssize_t __readlink_chk_warn (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__)) | |
6698 | ||
6699 | ||
6700 | ||
6701 | __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) | |
6702 | ; | |
6703 | ||
6704 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t | |
6705 | __attribute__ ((__nothrow__ , __leaf__)) readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) | |
6706 | ||
6707 | { | |
6708 | if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) | |
6709 | { | |
6710 | if (!__builtin_constant_p (__len)) | |
6711 | return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); | |
6712 | ||
6713 | if ( __len > __builtin_object_size (__buf, 2 > 1)) | |
6714 | return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); | |
6715 | } | |
6716 | return __readlink_alias (__path, __buf, __len); | |
6717 | } | |
6718 | ||
6719 | ||
6720 | ||
6721 | extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path, | |
6722 | char *__restrict __buf, size_t __len, | |
6723 | size_t __buflen) | |
6724 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); | |
6725 | extern ssize_t __readlinkat_alias (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__)) | |
6726 | ||
6727 | ||
6728 | ||
6729 | __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); | |
6730 | extern ssize_t __readlinkat_chk_warn (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__)) | |
6731 | ||
6732 | ||
6733 | ||
6734 | __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) | |
6735 | ||
6736 | ; | |
6737 | ||
6738 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t | |
6739 | __attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) | |
6740 | ||
6741 | { | |
6742 | if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) | |
6743 | { | |
6744 | if (!__builtin_constant_p (__len)) | |
6745 | return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); | |
6746 | ||
6747 | if (__len > __builtin_object_size (__buf, 2 > 1)) | |
6748 | return __readlinkat_chk_warn (__fd, __path, __buf, __len, | |
6749 | __builtin_object_size (__buf, 2 > 1)); | |
6750 | } | |
6751 | return __readlinkat_alias (__fd, __path, __buf, __len); | |
6752 | } | |
6753 | ||
6754 | ||
6755 | extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) | |
6756 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
6757 | extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__)) | |
6758 | __attribute__ ((__warn_unused_result__)); | |
6759 | extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__)) | |
6760 | ||
6761 | ||
6762 | __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) | |
6763 | ; | |
6764 | ||
6765 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * | |
6766 | __attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size) | |
6767 | { | |
6768 | if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) | |
6769 | { | |
6770 | if (!__builtin_constant_p (__size)) | |
6771 | return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); | |
6772 | ||
6773 | if (__size > __builtin_object_size (__buf, 2 > 1)) | |
6774 | return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); | |
6775 | } | |
6776 | return __getcwd_alias (__buf, __size); | |
6777 | } | |
6778 | ||
6779 | ||
6780 | extern char *__getwd_chk (char *__buf, size_t buflen) | |
6781 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
6782 | extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__)) | |
6783 | __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) | |
6784 | ; | |
6785 | ||
6786 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * | |
6787 | __attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf) | |
6788 | { | |
6789 | if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) | |
6790 | return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); | |
6791 | return __getwd_warn (__buf); | |
6792 | } | |
6793 | ||
6794 | ||
6795 | extern size_t __confstr_chk (int __name, char *__buf, size_t __len, | |
6796 | size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)); | |
6797 | extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__)) | |
6798 | ; | |
6799 | extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__)) | |
6800 | ||
6801 | ||
6802 | __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) | |
6803 | ; | |
6804 | ||
6805 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t | |
6806 | __attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len) | |
6807 | { | |
6808 | if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) | |
6809 | { | |
6810 | if (!__builtin_constant_p (__len)) | |
6811 | return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); | |
6812 | ||
6813 | if (__builtin_object_size (__buf, 2 > 1) < __len) | |
6814 | return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); | |
6815 | } | |
6816 | return __confstr_alias (__name, __buf, __len); | |
6817 | } | |
6818 | ||
6819 | ||
6820 | extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) | |
6821 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
6822 | extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__)) | |
6823 | __attribute__ ((__warn_unused_result__)); | |
6824 | extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__)) | |
6825 | ||
6826 | ||
6827 | __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) | |
6828 | ; | |
6829 | ||
6830 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
6831 | __attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[]) | |
6832 | { | |
6833 | if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) | |
6834 | { | |
6835 | if (!__builtin_constant_p (__size) || __size < 0) | |
6836 | return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); | |
6837 | ||
6838 | if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) | |
6839 | return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); | |
6840 | } | |
6841 | return __getgroups_alias (__size, __list); | |
6842 | } | |
6843 | ||
6844 | ||
6845 | extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, | |
6846 | size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
6847 | extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__)) | |
6848 | ||
6849 | __attribute__ ((__nonnull__ (2))); | |
6850 | extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__)) | |
6851 | ||
6852 | ||
6853 | __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) | |
6854 | ; | |
6855 | ||
6856 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
6857 | __attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen) | |
6858 | { | |
6859 | if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) | |
6860 | { | |
6861 | if (!__builtin_constant_p (__buflen)) | |
6862 | return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); | |
6863 | ||
6864 | if (__buflen > __builtin_object_size (__buf, 2 > 1)) | |
6865 | return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); | |
6866 | } | |
6867 | return __ttyname_r_alias (__fd, __buf, __buflen); | |
6868 | } | |
6869 | ||
6870 | ||
6871 | ||
6872 | extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) | |
6873 | __attribute__ ((__nonnull__ (1))); | |
6874 | extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") | |
6875 | __attribute__ ((__nonnull__ (1))); | |
6876 | extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") | |
6877 | ||
6878 | ||
6879 | __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) | |
6880 | ; | |
6881 | ||
6882 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
6883 | getlogin_r (char *__buf, size_t __buflen) | |
6884 | { | |
6885 | if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) | |
6886 | { | |
6887 | if (!__builtin_constant_p (__buflen)) | |
6888 | return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); | |
6889 | ||
6890 | if (__buflen > __builtin_object_size (__buf, 2 > 1)) | |
6891 | return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); | |
6892 | } | |
6893 | return __getlogin_r_alias (__buf, __buflen); | |
6894 | } | |
6895 | ||
6896 | ||
6897 | ||
6898 | ||
6899 | extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) | |
6900 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
6901 | extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__)) | |
6902 | __attribute__ ((__nonnull__ (1))); | |
6903 | extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__)) | |
6904 | ||
6905 | ||
6906 | __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) | |
6907 | ; | |
6908 | ||
6909 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
6910 | __attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen) | |
6911 | { | |
6912 | if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) | |
6913 | { | |
6914 | if (!__builtin_constant_p (__buflen)) | |
6915 | return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); | |
6916 | ||
6917 | if (__buflen > __builtin_object_size (__buf, 2 > 1)) | |
6918 | return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); | |
6919 | } | |
6920 | return __gethostname_alias (__buf, __buflen); | |
6921 | } | |
6922 | ||
6923 | ||
6924 | ||
6925 | ||
6926 | extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) | |
6927 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
6928 | extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__)) | |
6929 | ||
6930 | __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); | |
6931 | extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__)) | |
6932 | ||
6933 | ||
6934 | __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) | |
6935 | ||
6936 | ; | |
6937 | ||
6938 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
6939 | __attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen) | |
6940 | { | |
6941 | if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) | |
6942 | { | |
6943 | if (!__builtin_constant_p (__buflen)) | |
6944 | return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); | |
6945 | ||
6946 | if (__buflen > __builtin_object_size (__buf, 2 > 1)) | |
6947 | return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); | |
6948 | } | |
6949 | return __getdomainname_alias (__buf, __buflen); | |
6950 | } | |
6951 | # 1172 "/usr/include/unistd.h" 2 3 4 | |
6952 | ||
6953 | ||
6954 | ||
6955 | # 34 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
6956 | # 1 "/usr/include/fcntl.h" 1 3 4 | |
6957 | # 30 "/usr/include/fcntl.h" 3 4 | |
6958 | ||
6959 | ||
6960 | ||
6961 | ||
6962 | # 1 "/usr/include/bits/fcntl.h" 1 3 4 | |
6963 | # 27 "/usr/include/bits/fcntl.h" 3 4 | |
6964 | # 1 "/usr/include/bits/uio.h" 1 3 4 | |
6965 | # 44 "/usr/include/bits/uio.h" 3 4 | |
6966 | struct iovec | |
6967 | { | |
6968 | void *iov_base; | |
6969 | size_t iov_len; | |
6970 | }; | |
6971 | # 28 "/usr/include/bits/fcntl.h" 2 3 4 | |
6972 | # 153 "/usr/include/bits/fcntl.h" 3 4 | |
6973 | struct flock | |
6974 | { | |
6975 | short int l_type; | |
6976 | short int l_whence; | |
6977 | ||
6978 | ||
6979 | ||
6980 | ||
6981 | __off64_t l_start; | |
6982 | __off64_t l_len; | |
6983 | ||
6984 | __pid_t l_pid; | |
6985 | }; | |
6986 | ||
6987 | ||
6988 | struct flock64 | |
6989 | { | |
6990 | short int l_type; | |
6991 | short int l_whence; | |
6992 | __off64_t l_start; | |
6993 | __off64_t l_len; | |
6994 | __pid_t l_pid; | |
6995 | }; | |
6996 | ||
6997 | ||
6998 | ||
6999 | ||
7000 | enum __pid_type | |
7001 | { | |
7002 | F_OWNER_TID = 0, | |
7003 | F_OWNER_PID, | |
7004 | F_OWNER_PGRP, | |
7005 | F_OWNER_GID = F_OWNER_PGRP | |
7006 | }; | |
7007 | ||
7008 | ||
7009 | struct f_owner_ex | |
7010 | { | |
7011 | enum __pid_type type; | |
7012 | __pid_t pid; | |
7013 | }; | |
7014 | # 239 "/usr/include/bits/fcntl.h" 3 4 | |
7015 | struct file_handle | |
7016 | { | |
7017 | unsigned int handle_bytes; | |
7018 | int handle_type; | |
7019 | ||
7020 | unsigned char f_handle[0]; | |
7021 | }; | |
7022 | ||
7023 | ||
7024 | ||
7025 | ||
7026 | ||
7027 | ||
7028 | ||
7029 | ||
7030 | ||
7031 | ||
7032 | extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) | |
7033 | __attribute__ ((__nothrow__ , __leaf__)); | |
7034 | ||
7035 | ||
7036 | ||
7037 | extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, | |
7038 | unsigned int __flags); | |
7039 | ||
7040 | ||
7041 | ||
7042 | ||
7043 | ||
7044 | ||
7045 | extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, | |
7046 | size_t __count, unsigned int __flags); | |
7047 | ||
7048 | ||
7049 | ||
7050 | ||
7051 | ||
7052 | extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, | |
7053 | __off64_t *__offout, size_t __len, | |
7054 | unsigned int __flags); | |
7055 | ||
7056 | ||
7057 | ||
7058 | ||
7059 | ||
7060 | extern ssize_t tee (int __fdin, int __fdout, size_t __len, | |
7061 | unsigned int __flags); | |
7062 | # 295 "/usr/include/bits/fcntl.h" 3 4 | |
7063 | extern int fallocate (int __fd, int __mode, __off64_t __offset, __off64_t __len) __asm__ ("" "fallocate64") | |
7064 | ||
7065 | ; | |
7066 | ||
7067 | ||
7068 | ||
7069 | ||
7070 | ||
7071 | extern int fallocate64 (int __fd, int __mode, __off64_t __offset, | |
7072 | __off64_t __len); | |
7073 | ||
7074 | ||
7075 | ||
7076 | ||
7077 | extern int name_to_handle_at (int __dfd, const char *__name, | |
7078 | struct file_handle *__handle, int *__mnt_id, | |
7079 | int __flags) __attribute__ ((__nothrow__ , __leaf__)); | |
7080 | ||
7081 | ||
7082 | ||
7083 | ||
7084 | ||
7085 | extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, | |
7086 | int __flags); | |
7087 | ||
7088 | ||
7089 | ||
7090 | ||
7091 | # 35 "/usr/include/fcntl.h" 2 3 4 | |
7092 | ||
7093 | ||
7094 | ||
7095 | ||
7096 | ||
7097 | ||
7098 | # 1 "/usr/include/bits/stat.h" 1 3 4 | |
7099 | # 39 "/usr/include/bits/stat.h" 3 4 | |
7100 | struct stat | |
7101 | { | |
7102 | __dev_t st_dev; | |
7103 | unsigned short int __pad1; | |
7104 | ||
7105 | ||
7106 | ||
7107 | __ino_t __st_ino; | |
7108 | ||
7109 | __mode_t st_mode; | |
7110 | __nlink_t st_nlink; | |
7111 | __uid_t st_uid; | |
7112 | __gid_t st_gid; | |
7113 | __dev_t st_rdev; | |
7114 | unsigned short int __pad2; | |
7115 | ||
7116 | ||
7117 | ||
7118 | __off64_t st_size; | |
7119 | ||
7120 | __blksize_t st_blksize; | |
7121 | ||
7122 | ||
7123 | ||
7124 | ||
7125 | __blkcnt64_t st_blocks; | |
7126 | # 73 "/usr/include/bits/stat.h" 3 4 | |
7127 | struct timespec st_atim; | |
7128 | struct timespec st_mtim; | |
7129 | struct timespec st_ctim; | |
7130 | # 91 "/usr/include/bits/stat.h" 3 4 | |
7131 | __ino64_t st_ino; | |
7132 | ||
7133 | }; | |
7134 | ||
7135 | ||
7136 | struct stat64 | |
7137 | { | |
7138 | __dev_t st_dev; | |
7139 | unsigned int __pad1; | |
7140 | ||
7141 | __ino_t __st_ino; | |
7142 | __mode_t st_mode; | |
7143 | __nlink_t st_nlink; | |
7144 | __uid_t st_uid; | |
7145 | __gid_t st_gid; | |
7146 | __dev_t st_rdev; | |
7147 | unsigned int __pad2; | |
7148 | __off64_t st_size; | |
7149 | __blksize_t st_blksize; | |
7150 | ||
7151 | __blkcnt64_t st_blocks; | |
7152 | ||
7153 | ||
7154 | ||
7155 | ||
7156 | ||
7157 | ||
7158 | ||
7159 | struct timespec st_atim; | |
7160 | struct timespec st_mtim; | |
7161 | struct timespec st_ctim; | |
7162 | # 130 "/usr/include/bits/stat.h" 3 4 | |
7163 | __ino64_t st_ino; | |
7164 | }; | |
7165 | # 42 "/usr/include/fcntl.h" 2 3 4 | |
7166 | # 125 "/usr/include/fcntl.h" 3 4 | |
7167 | extern int fcntl (int __fd, int __cmd, ...); | |
7168 | # 137 "/usr/include/fcntl.h" 3 4 | |
7169 | extern int open (__const char *__file, int __oflag, ...) __asm__ ("" "open64") | |
7170 | __attribute__ ((__nonnull__ (1))); | |
7171 | ||
7172 | ||
7173 | ||
7174 | ||
7175 | ||
7176 | extern int open64 (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); | |
7177 | # 162 "/usr/include/fcntl.h" 3 4 | |
7178 | extern int openat (int __fd, __const char *__file, int __oflag, ...) __asm__ ("" "openat64") | |
7179 | __attribute__ ((__nonnull__ (2))); | |
7180 | ||
7181 | ||
7182 | ||
7183 | ||
7184 | ||
7185 | extern int openat64 (int __fd, __const char *__file, int __oflag, ...) | |
7186 | __attribute__ ((__nonnull__ (2))); | |
7187 | # 183 "/usr/include/fcntl.h" 3 4 | |
7188 | extern int creat (__const char *__file, __mode_t __mode) __asm__ ("" "creat64") | |
7189 | __attribute__ ((__nonnull__ (1))); | |
7190 | ||
7191 | ||
7192 | ||
7193 | ||
7194 | ||
7195 | extern int creat64 (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1))); | |
7196 | # 230 "/usr/include/fcntl.h" 3 4 | |
7197 | extern int posix_fadvise (int __fd, __off64_t __offset, __off64_t __len, int __advise) __asm__ ("" "posix_fadvise64") __attribute__ ((__nothrow__ , __leaf__)) | |
7198 | ||
7199 | ; | |
7200 | ||
7201 | ||
7202 | ||
7203 | ||
7204 | ||
7205 | extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len, | |
7206 | int __advise) __attribute__ ((__nothrow__ , __leaf__)); | |
7207 | # 251 "/usr/include/fcntl.h" 3 4 | |
7208 | extern int posix_fallocate (int __fd, __off64_t __offset, __off64_t __len) __asm__ ("" "posix_fallocate64") | |
7209 | ||
7210 | ; | |
7211 | ||
7212 | ||
7213 | ||
7214 | ||
7215 | ||
7216 | extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len); | |
7217 | ||
7218 | ||
7219 | ||
7220 | ||
7221 | ||
7222 | ||
7223 | ||
7224 | # 1 "/usr/include/bits/fcntl2.h" 1 3 4 | |
7225 | # 31 "/usr/include/bits/fcntl2.h" 3 4 | |
7226 | extern int __open_2 (__const char *__path, int __oflag) __asm__ ("" "__open64_2") | |
7227 | __attribute__ ((__nonnull__ (1))); | |
7228 | extern int __open_alias (__const char *__path, int __oflag, ...) __asm__ ("" "open64") | |
7229 | __attribute__ ((__nonnull__ (1))); | |
7230 | ||
7231 | extern void __open_too_many_args (void) __attribute__((__error__ ("open can be called either with 2 or 3 arguments, not more"))) | |
7232 | ; | |
7233 | extern void __open_missing_mode (void) __attribute__((__error__ ("open with O_CREAT in second argument needs 3 arguments"))) | |
7234 | ; | |
7235 | ||
7236 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
7237 | open (__const char *__path, int __oflag, ...) | |
7238 | { | |
7239 | if (__builtin_va_arg_pack_len () > 1) | |
7240 | __open_too_many_args (); | |
7241 | ||
7242 | if (__builtin_constant_p (__oflag)) | |
7243 | { | |
7244 | if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) | |
7245 | { | |
7246 | __open_missing_mode (); | |
7247 | return __open_2 (__path, __oflag); | |
7248 | } | |
7249 | return __open_alias (__path, __oflag, __builtin_va_arg_pack ()); | |
7250 | } | |
7251 | ||
7252 | if (__builtin_va_arg_pack_len () < 1) | |
7253 | return __open_2 (__path, __oflag); | |
7254 | ||
7255 | return __open_alias (__path, __oflag, __builtin_va_arg_pack ()); | |
7256 | } | |
7257 | ||
7258 | ||
7259 | ||
7260 | extern int __open64_2 (__const char *__path, int __oflag) __attribute__ ((__nonnull__ (1))); | |
7261 | extern int __open64_alias (__const char *__path, int __oflag, ...) __asm__ ("" "open64") | |
7262 | __attribute__ ((__nonnull__ (1))); | |
7263 | extern void __open64_too_many_args (void) __attribute__((__error__ ("open64 can be called either with 2 or 3 arguments, not more"))) | |
7264 | ; | |
7265 | extern void __open64_missing_mode (void) __attribute__((__error__ ("open64 with O_CREAT in second argument needs 3 arguments"))) | |
7266 | ; | |
7267 | ||
7268 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
7269 | open64 (__const char *__path, int __oflag, ...) | |
7270 | { | |
7271 | if (__builtin_va_arg_pack_len () > 1) | |
7272 | __open64_too_many_args (); | |
7273 | ||
7274 | if (__builtin_constant_p (__oflag)) | |
7275 | { | |
7276 | if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) | |
7277 | { | |
7278 | __open64_missing_mode (); | |
7279 | return __open64_2 (__path, __oflag); | |
7280 | } | |
7281 | return __open64_alias (__path, __oflag, __builtin_va_arg_pack ()); | |
7282 | } | |
7283 | ||
7284 | if (__builtin_va_arg_pack_len () < 1) | |
7285 | return __open64_2 (__path, __oflag); | |
7286 | ||
7287 | return __open64_alias (__path, __oflag, __builtin_va_arg_pack ()); | |
7288 | } | |
7289 | # 105 "/usr/include/bits/fcntl2.h" 3 4 | |
7290 | extern int __openat_2 (int __fd, __const char *__path, int __oflag) __asm__ ("" "__openat64_2") | |
7291 | ||
7292 | __attribute__ ((__nonnull__ (2))); | |
7293 | extern int __openat_alias (int __fd, __const char *__path, int __oflag, ...) __asm__ ("" "openat64") | |
7294 | ||
7295 | __attribute__ ((__nonnull__ (2))); | |
7296 | ||
7297 | extern void __openat_too_many_args (void) __attribute__((__error__ ("openat can be called either with 3 or 4 arguments, not more"))) | |
7298 | ; | |
7299 | extern void __openat_missing_mode (void) __attribute__((__error__ ("openat with O_CREAT in third argument needs 4 arguments"))) | |
7300 | ; | |
7301 | ||
7302 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
7303 | openat (int __fd, __const char *__path, int __oflag, ...) | |
7304 | { | |
7305 | if (__builtin_va_arg_pack_len () > 1) | |
7306 | __openat_too_many_args (); | |
7307 | ||
7308 | if (__builtin_constant_p (__oflag)) | |
7309 | { | |
7310 | if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) | |
7311 | { | |
7312 | __openat_missing_mode (); | |
7313 | return __openat_2 (__fd, __path, __oflag); | |
7314 | } | |
7315 | return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); | |
7316 | } | |
7317 | ||
7318 | if (__builtin_va_arg_pack_len () < 1) | |
7319 | return __openat_2 (__fd, __path, __oflag); | |
7320 | ||
7321 | return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); | |
7322 | } | |
7323 | ||
7324 | ||
7325 | ||
7326 | extern int __openat64_2 (int __fd, __const char *__path, int __oflag) | |
7327 | __attribute__ ((__nonnull__ (2))); | |
7328 | extern int __openat64_alias (int __fd, __const char *__path, int __oflag, ...) __asm__ ("" "openat64") | |
7329 | ||
7330 | __attribute__ ((__nonnull__ (2))); | |
7331 | extern void __openat64_too_many_args (void) __attribute__((__error__ ("openat64 can be called either with 3 or 4 arguments, not more"))) | |
7332 | ; | |
7333 | extern void __openat64_missing_mode (void) __attribute__((__error__ ("openat64 with O_CREAT in third argument needs 4 arguments"))) | |
7334 | ; | |
7335 | ||
7336 | extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int | |
7337 | openat64 (int __fd, __const char *__path, int __oflag, ...) | |
7338 | { | |
7339 | if (__builtin_va_arg_pack_len () > 1) | |
7340 | __openat64_too_many_args (); | |
7341 | ||
7342 | if (__builtin_constant_p (__oflag)) | |
7343 | { | |
7344 | if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) | |
7345 | { | |
7346 | __openat64_missing_mode (); | |
7347 | return __openat64_2 (__fd, __path, __oflag); | |
7348 | } | |
7349 | return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); | |
7350 | } | |
7351 | ||
7352 | if (__builtin_va_arg_pack_len () < 1) | |
7353 | return __openat64_2 (__fd, __path, __oflag); | |
7354 | ||
7355 | return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); | |
7356 | } | |
7357 | # 268 "/usr/include/fcntl.h" 2 3 4 | |
7358 | ||
7359 | ||
7360 | ||
7361 | # 35 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
7362 | # 1 "/usr/include/sys/stat.h" 1 3 4 | |
7363 | # 105 "/usr/include/sys/stat.h" 3 4 | |
7364 | ||
7365 | ||
7366 | # 1 "/usr/include/bits/stat.h" 1 3 4 | |
7367 | # 108 "/usr/include/sys/stat.h" 2 3 4 | |
7368 | # 219 "/usr/include/sys/stat.h" 3 4 | |
7369 | extern int stat (__const char *__restrict __file, struct stat *__restrict __buf) __asm__ ("" "stat64") __attribute__ ((__nothrow__ , __leaf__)) | |
7370 | ||
7371 | __attribute__ ((__nonnull__ (1, 2))); | |
7372 | extern int fstat (int __fd, struct stat *__buf) __asm__ ("" "fstat64") __attribute__ ((__nothrow__ , __leaf__)) | |
7373 | __attribute__ ((__nonnull__ (2))); | |
7374 | ||
7375 | ||
7376 | ||
7377 | ||
7378 | ||
7379 | ||
7380 | extern int stat64 (__const char *__restrict __file, | |
7381 | struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
7382 | extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
7383 | # 245 "/usr/include/sys/stat.h" 3 4 | |
7384 | extern int fstatat (int __fd, __const char *__restrict __file, struct stat *__restrict __buf, int __flag) __asm__ ("" "fstatat64") __attribute__ ((__nothrow__ , __leaf__)) | |
7385 | ||
7386 | ||
7387 | __attribute__ ((__nonnull__ (2, 3))); | |
7388 | ||
7389 | ||
7390 | ||
7391 | ||
7392 | ||
7393 | ||
7394 | extern int fstatat64 (int __fd, __const char *__restrict __file, | |
7395 | struct stat64 *__restrict __buf, int __flag) | |
7396 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); | |
7397 | # 269 "/usr/include/sys/stat.h" 3 4 | |
7398 | extern int lstat (__const char *__restrict __file, struct stat *__restrict __buf) __asm__ ("" "lstat64") __attribute__ ((__nothrow__ , __leaf__)) | |
7399 | ||
7400 | ||
7401 | __attribute__ ((__nonnull__ (1, 2))); | |
7402 | ||
7403 | ||
7404 | ||
7405 | ||
7406 | ||
7407 | extern int lstat64 (__const char *__restrict __file, | |
7408 | struct stat64 *__restrict __buf) | |
7409 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
7410 | ||
7411 | ||
7412 | ||
7413 | ||
7414 | ||
7415 | extern int chmod (__const char *__file, __mode_t __mode) | |
7416 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
7417 | ||
7418 | ||
7419 | ||
7420 | ||
7421 | ||
7422 | extern int lchmod (__const char *__file, __mode_t __mode) | |
7423 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
7424 | ||
7425 | ||
7426 | ||
7427 | ||
7428 | extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)); | |
7429 | ||
7430 | ||
7431 | ||
7432 | ||
7433 | ||
7434 | extern int fchmodat (int __fd, __const char *__file, __mode_t __mode, | |
7435 | int __flag) | |
7436 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); | |
7437 | ||
7438 | ||
7439 | ||
7440 | ||
7441 | ||
7442 | ||
7443 | extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ , __leaf__)); | |
7444 | ||
7445 | ||
7446 | ||
7447 | ||
7448 | extern __mode_t getumask (void) __attribute__ ((__nothrow__ , __leaf__)); | |
7449 | ||
7450 | ||
7451 | ||
7452 | extern int mkdir (__const char *__path, __mode_t __mode) | |
7453 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
7454 | ||
7455 | ||
7456 | ||
7457 | ||
7458 | ||
7459 | extern int mkdirat (int __fd, __const char *__path, __mode_t __mode) | |
7460 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
7461 | ||
7462 | ||
7463 | ||
7464 | ||
7465 | ||
7466 | ||
7467 | extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) | |
7468 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
7469 | ||
7470 | ||
7471 | ||
7472 | ||
7473 | ||
7474 | extern int mknodat (int __fd, __const char *__path, __mode_t __mode, | |
7475 | __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
7476 | ||
7477 | ||
7478 | ||
7479 | ||
7480 | ||
7481 | extern int mkfifo (__const char *__path, __mode_t __mode) | |
7482 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
7483 | ||
7484 | ||
7485 | ||
7486 | ||
7487 | ||
7488 | extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode) | |
7489 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
7490 | ||
7491 | ||
7492 | ||
7493 | ||
7494 | ||
7495 | extern int utimensat (int __fd, __const char *__path, | |
7496 | __const struct timespec __times[2], | |
7497 | int __flags) | |
7498 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
7499 | ||
7500 | ||
7501 | ||
7502 | ||
7503 | extern int futimens (int __fd, __const struct timespec __times[2]) __attribute__ ((__nothrow__ , __leaf__)); | |
7504 | # 412 "/usr/include/sys/stat.h" 3 4 | |
7505 | extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) __asm__ ("" "__fxstat64") __attribute__ ((__nothrow__ , __leaf__)) | |
7506 | ||
7507 | __attribute__ ((__nonnull__ (3))); | |
7508 | extern int __xstat (int __ver, __const char *__filename, struct stat *__stat_buf) __asm__ ("" "__xstat64") __attribute__ ((__nothrow__ , __leaf__)) | |
7509 | ||
7510 | __attribute__ ((__nonnull__ (2, 3))); | |
7511 | extern int __lxstat (int __ver, __const char *__filename, struct stat *__stat_buf) __asm__ ("" "__lxstat64") __attribute__ ((__nothrow__ , __leaf__)) | |
7512 | ||
7513 | __attribute__ ((__nonnull__ (2, 3))); | |
7514 | extern int __fxstatat (int __ver, int __fildes, __const char *__filename, struct stat *__stat_buf, int __flag) __asm__ ("" "__fxstatat64") __attribute__ ((__nothrow__ , __leaf__)) | |
7515 | ||
7516 | ||
7517 | __attribute__ ((__nonnull__ (3, 4))); | |
7518 | # 434 "/usr/include/sys/stat.h" 3 4 | |
7519 | extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) | |
7520 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); | |
7521 | extern int __xstat64 (int __ver, __const char *__filename, | |
7522 | struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); | |
7523 | extern int __lxstat64 (int __ver, __const char *__filename, | |
7524 | struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); | |
7525 | extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename, | |
7526 | struct stat64 *__stat_buf, int __flag) | |
7527 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))); | |
7528 | ||
7529 | extern int __xmknod (int __ver, __const char *__path, __mode_t __mode, | |
7530 | __dev_t *__dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); | |
7531 | ||
7532 | extern int __xmknodat (int __ver, int __fd, __const char *__path, | |
7533 | __mode_t __mode, __dev_t *__dev) | |
7534 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 5))); | |
7535 | ||
7536 | ||
7537 | ||
7538 | ||
7539 | extern __inline int | |
7540 | __attribute__ ((__nothrow__ , __leaf__)) stat (__const char *__path, struct stat *__statbuf) | |
7541 | { | |
7542 | return __xstat (3, __path, __statbuf); | |
7543 | } | |
7544 | ||
7545 | ||
7546 | extern __inline int | |
7547 | __attribute__ ((__nothrow__ , __leaf__)) lstat (__const char *__path, struct stat *__statbuf) | |
7548 | { | |
7549 | return __lxstat (3, __path, __statbuf); | |
7550 | } | |
7551 | ||
7552 | ||
7553 | extern __inline int | |
7554 | __attribute__ ((__nothrow__ , __leaf__)) fstat (int __fd, struct stat *__statbuf) | |
7555 | { | |
7556 | return __fxstat (3, __fd, __statbuf); | |
7557 | } | |
7558 | ||
7559 | ||
7560 | extern __inline int | |
7561 | __attribute__ ((__nothrow__ , __leaf__)) fstatat (int __fd, __const char *__filename, struct stat *__statbuf, int __flag) | |
7562 | ||
7563 | { | |
7564 | return __fxstatat (3, __fd, __filename, __statbuf, __flag); | |
7565 | } | |
7566 | ||
7567 | ||
7568 | ||
7569 | extern __inline int | |
7570 | __attribute__ ((__nothrow__ , __leaf__)) mknod (__const char *__path, __mode_t __mode, __dev_t __dev) | |
7571 | { | |
7572 | return __xmknod (1, __path, __mode, &__dev); | |
7573 | } | |
7574 | ||
7575 | ||
7576 | ||
7577 | extern __inline int | |
7578 | __attribute__ ((__nothrow__ , __leaf__)) mknodat (int __fd, __const char *__path, __mode_t __mode, __dev_t __dev) | |
7579 | ||
7580 | { | |
7581 | return __xmknodat (1, __fd, __path, __mode, &__dev); | |
7582 | } | |
7583 | ||
7584 | ||
7585 | ||
7586 | ||
7587 | ||
7588 | extern __inline int | |
7589 | __attribute__ ((__nothrow__ , __leaf__)) stat64 (__const char *__path, struct stat64 *__statbuf) | |
7590 | { | |
7591 | return __xstat64 (3, __path, __statbuf); | |
7592 | } | |
7593 | ||
7594 | ||
7595 | extern __inline int | |
7596 | __attribute__ ((__nothrow__ , __leaf__)) lstat64 (__const char *__path, struct stat64 *__statbuf) | |
7597 | { | |
7598 | return __lxstat64 (3, __path, __statbuf); | |
7599 | } | |
7600 | ||
7601 | ||
7602 | extern __inline int | |
7603 | __attribute__ ((__nothrow__ , __leaf__)) fstat64 (int __fd, struct stat64 *__statbuf) | |
7604 | { | |
7605 | return __fxstat64 (3, __fd, __statbuf); | |
7606 | } | |
7607 | ||
7608 | ||
7609 | extern __inline int | |
7610 | __attribute__ ((__nothrow__ , __leaf__)) fstatat64 (int __fd, __const char *__filename, struct stat64 *__statbuf, int __flag) | |
7611 | ||
7612 | { | |
7613 | return __fxstatat64 (3, __fd, __filename, __statbuf, __flag); | |
7614 | } | |
7615 | ||
7616 | ||
7617 | ||
7618 | ||
7619 | ||
7620 | ||
7621 | ||
7622 | # 36 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
7623 | # 1 "/usr/include/sys/time.h" 1 3 4 | |
7624 | # 29 "/usr/include/sys/time.h" 3 4 | |
7625 | # 1 "/usr/include/bits/time.h" 1 3 4 | |
7626 | # 30 "/usr/include/sys/time.h" 2 3 4 | |
7627 | # 39 "/usr/include/sys/time.h" 3 4 | |
7628 | ||
7629 | # 57 "/usr/include/sys/time.h" 3 4 | |
7630 | struct timezone | |
7631 | { | |
7632 | int tz_minuteswest; | |
7633 | int tz_dsttime; | |
7634 | }; | |
7635 | ||
7636 | typedef struct timezone *__restrict __timezone_ptr_t; | |
7637 | # 73 "/usr/include/sys/time.h" 3 4 | |
7638 | extern int gettimeofday (struct timeval *__restrict __tv, | |
7639 | __timezone_ptr_t __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
7640 | ||
7641 | ||
7642 | ||
7643 | ||
7644 | extern int settimeofday (__const struct timeval *__tv, | |
7645 | __const struct timezone *__tz) | |
7646 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
7647 | ||
7648 | ||
7649 | ||
7650 | ||
7651 | ||
7652 | extern int adjtime (__const struct timeval *__delta, | |
7653 | struct timeval *__olddelta) __attribute__ ((__nothrow__ , __leaf__)); | |
7654 | ||
7655 | ||
7656 | ||
7657 | ||
7658 | enum __itimer_which | |
7659 | { | |
7660 | ||
7661 | ITIMER_REAL = 0, | |
7662 | ||
7663 | ||
7664 | ITIMER_VIRTUAL = 1, | |
7665 | ||
7666 | ||
7667 | ||
7668 | ITIMER_PROF = 2 | |
7669 | ||
7670 | }; | |
7671 | ||
7672 | ||
7673 | ||
7674 | struct itimerval | |
7675 | { | |
7676 | ||
7677 | struct timeval it_interval; | |
7678 | ||
7679 | struct timeval it_value; | |
7680 | }; | |
7681 | ||
7682 | ||
7683 | ||
7684 | ||
7685 | typedef enum __itimer_which __itimer_which_t; | |
7686 | ||
7687 | ||
7688 | ||
7689 | ||
7690 | ||
7691 | ||
7692 | extern int getitimer (__itimer_which_t __which, | |
7693 | struct itimerval *__value) __attribute__ ((__nothrow__ , __leaf__)); | |
7694 | ||
7695 | ||
7696 | ||
7697 | ||
7698 | extern int setitimer (__itimer_which_t __which, | |
7699 | __const struct itimerval *__restrict __new, | |
7700 | struct itimerval *__restrict __old) __attribute__ ((__nothrow__ , __leaf__)); | |
7701 | ||
7702 | ||
7703 | ||
7704 | ||
7705 | extern int utimes (__const char *__file, __const struct timeval __tvp[2]) | |
7706 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
7707 | ||
7708 | ||
7709 | ||
7710 | extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) | |
7711 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
7712 | ||
7713 | ||
7714 | extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)); | |
7715 | ||
7716 | ||
7717 | ||
7718 | ||
7719 | ||
7720 | ||
7721 | extern int futimesat (int __fd, __const char *__file, | |
7722 | __const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)); | |
7723 | # 191 "/usr/include/sys/time.h" 3 4 | |
7724 | ||
7725 | # 37 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
7726 | # 1 "/usr/include/assert.h" 1 3 4 | |
7727 | # 66 "/usr/include/assert.h" 3 4 | |
7728 | ||
7729 | ||
7730 | ||
7731 | extern void __assert_fail (__const char *__assertion, __const char *__file, | |
7732 | unsigned int __line, __const char *__function) | |
7733 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); | |
7734 | ||
7735 | ||
7736 | extern void __assert_perror_fail (int __errnum, __const char *__file, | |
7737 | unsigned int __line, | |
7738 | __const char *__function) | |
7739 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); | |
7740 | ||
7741 | ||
7742 | ||
7743 | ||
7744 | extern void __assert (const char *__assertion, const char *__file, int __line) | |
7745 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); | |
7746 | ||
7747 | ||
7748 | ||
7749 | # 38 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
7750 | # 1 "/usr/include/signal.h" 1 3 4 | |
7751 | # 31 "/usr/include/signal.h" 3 4 | |
7752 | ||
7753 | ||
7754 | # 1 "/usr/include/bits/sigset.h" 1 3 4 | |
7755 | # 104 "/usr/include/bits/sigset.h" 3 4 | |
7756 | extern int __sigismember (__const __sigset_t *, int); | |
7757 | extern int __sigaddset (__sigset_t *, int); | |
7758 | extern int __sigdelset (__sigset_t *, int); | |
7759 | # 118 "/usr/include/bits/sigset.h" 3 4 | |
7760 | extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } | |
7761 | extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } | |
7762 | extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } | |
7763 | # 34 "/usr/include/signal.h" 2 3 4 | |
7764 | ||
7765 | ||
7766 | ||
7767 | ||
7768 | ||
7769 | ||
7770 | ||
7771 | typedef __sig_atomic_t sig_atomic_t; | |
7772 | ||
7773 | # 58 "/usr/include/signal.h" 3 4 | |
7774 | # 1 "/usr/include/bits/signum.h" 1 3 4 | |
7775 | # 59 "/usr/include/signal.h" 2 3 4 | |
7776 | # 79 "/usr/include/signal.h" 3 4 | |
7777 | # 1 "/usr/include/bits/siginfo.h" 1 3 4 | |
7778 | # 25 "/usr/include/bits/siginfo.h" 3 4 | |
7779 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
7780 | # 26 "/usr/include/bits/siginfo.h" 2 3 4 | |
7781 | ||
7782 | ||
7783 | ||
7784 | ||
7785 | ||
7786 | ||
7787 | ||
7788 | typedef union sigval | |
7789 | { | |
7790 | int sival_int; | |
7791 | void *sival_ptr; | |
7792 | } sigval_t; | |
7793 | # 51 "/usr/include/bits/siginfo.h" 3 4 | |
7794 | typedef struct siginfo | |
7795 | { | |
7796 | int si_signo; | |
7797 | int si_errno; | |
7798 | ||
7799 | int si_code; | |
7800 | ||
7801 | union | |
7802 | { | |
7803 | int _pad[((128 / sizeof (int)) - 3)]; | |
7804 | ||
7805 | ||
7806 | struct | |
7807 | { | |
7808 | __pid_t si_pid; | |
7809 | __uid_t si_uid; | |
7810 | } _kill; | |
7811 | ||
7812 | ||
7813 | struct | |
7814 | { | |
7815 | int si_tid; | |
7816 | int si_overrun; | |
7817 | sigval_t si_sigval; | |
7818 | } _timer; | |
7819 | ||
7820 | ||
7821 | struct | |
7822 | { | |
7823 | __pid_t si_pid; | |
7824 | __uid_t si_uid; | |
7825 | sigval_t si_sigval; | |
7826 | } _rt; | |
7827 | ||
7828 | ||
7829 | struct | |
7830 | { | |
7831 | __pid_t si_pid; | |
7832 | __uid_t si_uid; | |
7833 | int si_status; | |
7834 | __clock_t si_utime; | |
7835 | __clock_t si_stime; | |
7836 | } _sigchld; | |
7837 | ||
7838 | ||
7839 | struct | |
7840 | { | |
7841 | void *si_addr; | |
7842 | } _sigfault; | |
7843 | ||
7844 | ||
7845 | struct | |
7846 | { | |
7847 | long int si_band; | |
7848 | int si_fd; | |
7849 | } _sigpoll; | |
7850 | } _sifields; | |
7851 | } siginfo_t; | |
7852 | # 129 "/usr/include/bits/siginfo.h" 3 4 | |
7853 | enum | |
7854 | { | |
7855 | SI_ASYNCNL = -60, | |
7856 | ||
7857 | SI_TKILL = -6, | |
7858 | ||
7859 | SI_SIGIO, | |
7860 | ||
7861 | SI_ASYNCIO, | |
7862 | ||
7863 | SI_MESGQ, | |
7864 | ||
7865 | SI_TIMER, | |
7866 | ||
7867 | SI_QUEUE, | |
7868 | ||
7869 | SI_USER, | |
7870 | ||
7871 | SI_KERNEL = 0x80 | |
7872 | ||
7873 | }; | |
7874 | ||
7875 | ||
7876 | ||
7877 | enum | |
7878 | { | |
7879 | ILL_ILLOPC = 1, | |
7880 | ||
7881 | ILL_ILLOPN, | |
7882 | ||
7883 | ILL_ILLADR, | |
7884 | ||
7885 | ILL_ILLTRP, | |
7886 | ||
7887 | ILL_PRVOPC, | |
7888 | ||
7889 | ILL_PRVREG, | |
7890 | ||
7891 | ILL_COPROC, | |
7892 | ||
7893 | ILL_BADSTK | |
7894 | ||
7895 | }; | |
7896 | ||
7897 | ||
7898 | enum | |
7899 | { | |
7900 | FPE_INTDIV = 1, | |
7901 | ||
7902 | FPE_INTOVF, | |
7903 | ||
7904 | FPE_FLTDIV, | |
7905 | ||
7906 | FPE_FLTOVF, | |
7907 | ||
7908 | FPE_FLTUND, | |
7909 | ||
7910 | FPE_FLTRES, | |
7911 | ||
7912 | FPE_FLTINV, | |
7913 | ||
7914 | FPE_FLTSUB | |
7915 | ||
7916 | }; | |
7917 | ||
7918 | ||
7919 | enum | |
7920 | { | |
7921 | SEGV_MAPERR = 1, | |
7922 | ||
7923 | SEGV_ACCERR | |
7924 | ||
7925 | }; | |
7926 | ||
7927 | ||
7928 | enum | |
7929 | { | |
7930 | BUS_ADRALN = 1, | |
7931 | ||
7932 | BUS_ADRERR, | |
7933 | ||
7934 | BUS_OBJERR | |
7935 | ||
7936 | }; | |
7937 | ||
7938 | ||
7939 | enum | |
7940 | { | |
7941 | TRAP_BRKPT = 1, | |
7942 | ||
7943 | TRAP_TRACE | |
7944 | ||
7945 | }; | |
7946 | ||
7947 | ||
7948 | enum | |
7949 | { | |
7950 | CLD_EXITED = 1, | |
7951 | ||
7952 | CLD_KILLED, | |
7953 | ||
7954 | CLD_DUMPED, | |
7955 | ||
7956 | CLD_TRAPPED, | |
7957 | ||
7958 | CLD_STOPPED, | |
7959 | ||
7960 | CLD_CONTINUED | |
7961 | ||
7962 | }; | |
7963 | ||
7964 | ||
7965 | enum | |
7966 | { | |
7967 | POLL_IN = 1, | |
7968 | ||
7969 | POLL_OUT, | |
7970 | ||
7971 | POLL_MSG, | |
7972 | ||
7973 | POLL_ERR, | |
7974 | ||
7975 | POLL_PRI, | |
7976 | ||
7977 | POLL_HUP | |
7978 | ||
7979 | }; | |
7980 | # 273 "/usr/include/bits/siginfo.h" 3 4 | |
7981 | typedef struct sigevent | |
7982 | { | |
7983 | sigval_t sigev_value; | |
7984 | int sigev_signo; | |
7985 | int sigev_notify; | |
7986 | ||
7987 | union | |
7988 | { | |
7989 | int _pad[((64 / sizeof (int)) - 3)]; | |
7990 | ||
7991 | ||
7992 | ||
7993 | __pid_t _tid; | |
7994 | ||
7995 | struct | |
7996 | { | |
7997 | void (*_function) (sigval_t); | |
7998 | void *_attribute; | |
7999 | } _sigev_thread; | |
8000 | } _sigev_un; | |
8001 | } sigevent_t; | |
8002 | ||
8003 | ||
8004 | ||
8005 | ||
8006 | ||
8007 | ||
8008 | enum | |
8009 | { | |
8010 | SIGEV_SIGNAL = 0, | |
8011 | ||
8012 | SIGEV_NONE, | |
8013 | ||
8014 | SIGEV_THREAD, | |
8015 | ||
8016 | ||
8017 | SIGEV_THREAD_ID = 4 | |
8018 | ||
8019 | }; | |
8020 | # 80 "/usr/include/signal.h" 2 3 4 | |
8021 | ||
8022 | ||
8023 | ||
8024 | ||
8025 | typedef void (*__sighandler_t) (int); | |
8026 | ||
8027 | ||
8028 | ||
8029 | ||
8030 | extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) | |
8031 | __attribute__ ((__nothrow__ , __leaf__)); | |
8032 | ||
8033 | extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) | |
8034 | __attribute__ ((__nothrow__ , __leaf__)); | |
8035 | ||
8036 | ||
8037 | ||
8038 | ||
8039 | ||
8040 | ||
8041 | ||
8042 | extern __sighandler_t signal (int __sig, __sighandler_t __handler) | |
8043 | __attribute__ ((__nothrow__ , __leaf__)); | |
8044 | # 113 "/usr/include/signal.h" 3 4 | |
8045 | ||
8046 | ||
8047 | ||
8048 | ||
8049 | ||
8050 | extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) | |
8051 | __attribute__ ((__nothrow__ , __leaf__)); | |
8052 | ||
8053 | ||
8054 | ||
8055 | ||
8056 | ||
8057 | ||
8058 | extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__)); | |
8059 | ||
8060 | ||
8061 | ||
8062 | ||
8063 | ||
8064 | ||
8065 | extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__)); | |
8066 | ||
8067 | ||
8068 | ||
8069 | ||
8070 | extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__)); | |
8071 | ||
8072 | ||
8073 | ||
8074 | ||
8075 | extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) | |
8076 | __attribute__ ((__nothrow__ , __leaf__)); | |
8077 | extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); | |
8078 | ||
8079 | ||
8080 | ||
8081 | ||
8082 | extern void psignal (int __sig, __const char *__s); | |
8083 | ||
8084 | ||
8085 | ||
8086 | ||
8087 | extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s); | |
8088 | # 168 "/usr/include/signal.h" 3 4 | |
8089 | extern int __sigpause (int __sig_or_mask, int __is_sig); | |
8090 | # 177 "/usr/include/signal.h" 3 4 | |
8091 | extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); | |
8092 | # 196 "/usr/include/signal.h" 3 4 | |
8093 | extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); | |
8094 | ||
8095 | ||
8096 | extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); | |
8097 | ||
8098 | ||
8099 | extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); | |
8100 | # 211 "/usr/include/signal.h" 3 4 | |
8101 | typedef __sighandler_t sighandler_t; | |
8102 | ||
8103 | ||
8104 | ||
8105 | ||
8106 | typedef __sighandler_t sig_t; | |
8107 | ||
8108 | ||
8109 | ||
8110 | ||
8111 | ||
8112 | extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
8113 | ||
8114 | ||
8115 | extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
8116 | ||
8117 | ||
8118 | extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
8119 | ||
8120 | ||
8121 | extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
8122 | ||
8123 | ||
8124 | extern int sigismember (__const sigset_t *__set, int __signo) | |
8125 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
8126 | ||
8127 | ||
8128 | ||
8129 | extern int sigisemptyset (__const sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
8130 | ||
8131 | ||
8132 | extern int sigandset (sigset_t *__set, __const sigset_t *__left, | |
8133 | __const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); | |
8134 | ||
8135 | ||
8136 | extern int sigorset (sigset_t *__set, __const sigset_t *__left, | |
8137 | __const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); | |
8138 | ||
8139 | ||
8140 | ||
8141 | ||
8142 | # 1 "/usr/include/bits/sigaction.h" 1 3 4 | |
8143 | # 25 "/usr/include/bits/sigaction.h" 3 4 | |
8144 | struct sigaction | |
8145 | { | |
8146 | ||
8147 | ||
8148 | union | |
8149 | { | |
8150 | ||
8151 | __sighandler_t sa_handler; | |
8152 | ||
8153 | void (*sa_sigaction) (int, siginfo_t *, void *); | |
8154 | } | |
8155 | __sigaction_handler; | |
8156 | ||
8157 | ||
8158 | ||
8159 | ||
8160 | ||
8161 | ||
8162 | ||
8163 | __sigset_t sa_mask; | |
8164 | ||
8165 | ||
8166 | int sa_flags; | |
8167 | ||
8168 | ||
8169 | void (*sa_restorer) (void); | |
8170 | }; | |
8171 | # 253 "/usr/include/signal.h" 2 3 4 | |
8172 | ||
8173 | ||
8174 | extern int sigprocmask (int __how, __const sigset_t *__restrict __set, | |
8175 | sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__)); | |
8176 | ||
8177 | ||
8178 | ||
8179 | ||
8180 | ||
8181 | ||
8182 | extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); | |
8183 | ||
8184 | ||
8185 | extern int sigaction (int __sig, __const struct sigaction *__restrict __act, | |
8186 | struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__)); | |
8187 | ||
8188 | ||
8189 | extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
8190 | ||
8191 | ||
8192 | ||
8193 | ||
8194 | ||
8195 | ||
8196 | extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) | |
8197 | __attribute__ ((__nonnull__ (1, 2))); | |
8198 | ||
8199 | ||
8200 | ||
8201 | ||
8202 | ||
8203 | ||
8204 | extern int sigwaitinfo (__const sigset_t *__restrict __set, | |
8205 | siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); | |
8206 | ||
8207 | ||
8208 | ||
8209 | ||
8210 | ||
8211 | ||
8212 | extern int sigtimedwait (__const sigset_t *__restrict __set, | |
8213 | siginfo_t *__restrict __info, | |
8214 | __const struct timespec *__restrict __timeout) | |
8215 | __attribute__ ((__nonnull__ (1))); | |
8216 | ||
8217 | ||
8218 | ||
8219 | extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) | |
8220 | __attribute__ ((__nothrow__ , __leaf__)); | |
8221 | # 310 "/usr/include/signal.h" 3 4 | |
8222 | extern __const char *__const _sys_siglist[65]; | |
8223 | extern __const char *__const sys_siglist[65]; | |
8224 | ||
8225 | ||
8226 | struct sigvec | |
8227 | { | |
8228 | __sighandler_t sv_handler; | |
8229 | int sv_mask; | |
8230 | ||
8231 | int sv_flags; | |
8232 | ||
8233 | }; | |
8234 | # 334 "/usr/include/signal.h" 3 4 | |
8235 | extern int sigvec (int __sig, __const struct sigvec *__vec, | |
8236 | struct sigvec *__ovec) __attribute__ ((__nothrow__ , __leaf__)); | |
8237 | ||
8238 | ||
8239 | ||
8240 | # 1 "/usr/include/bits/sigcontext.h" 1 3 4 | |
8241 | # 28 "/usr/include/bits/sigcontext.h" 3 4 | |
8242 | # 1 "/usr/include/asm/sigcontext.h" 1 3 4 | |
8243 | ||
8244 | ||
8245 | ||
8246 | ||
8247 | # 1 "/usr/include/linux/types.h" 1 3 4 | |
8248 | ||
8249 | ||
8250 | ||
8251 | # 1 "/usr/include/asm/types.h" 1 3 4 | |
8252 | ||
8253 | ||
8254 | ||
8255 | # 1 "/usr/include/asm-generic/types.h" 1 3 4 | |
8256 | ||
8257 | ||
8258 | ||
8259 | ||
8260 | ||
8261 | ||
8262 | # 1 "/usr/include/asm-generic/int-ll64.h" 1 3 4 | |
8263 | # 11 "/usr/include/asm-generic/int-ll64.h" 3 4 | |
8264 | # 1 "/usr/include/asm/bitsperlong.h" 1 3 4 | |
8265 | # 10 "/usr/include/asm/bitsperlong.h" 3 4 | |
8266 | # 1 "/usr/include/asm-generic/bitsperlong.h" 1 3 4 | |
8267 | # 11 "/usr/include/asm/bitsperlong.h" 2 3 4 | |
8268 | # 12 "/usr/include/asm-generic/int-ll64.h" 2 3 4 | |
8269 | ||
8270 | ||
8271 | ||
8272 | ||
8273 | ||
8274 | ||
8275 | ||
8276 | typedef __signed__ char __s8; | |
8277 | typedef unsigned char __u8; | |
8278 | ||
8279 | typedef __signed__ short __s16; | |
8280 | typedef unsigned short __u16; | |
8281 | ||
8282 | typedef __signed__ int __s32; | |
8283 | typedef unsigned int __u32; | |
8284 | ||
8285 | ||
8286 | __extension__ typedef __signed__ long long __s64; | |
8287 | __extension__ typedef unsigned long long __u64; | |
8288 | # 8 "/usr/include/asm-generic/types.h" 2 3 4 | |
8289 | ||
8290 | ||
8291 | ||
8292 | typedef unsigned short umode_t; | |
8293 | # 5 "/usr/include/asm/types.h" 2 3 4 | |
8294 | # 5 "/usr/include/linux/types.h" 2 3 4 | |
8295 | ||
8296 | ||
8297 | ||
8298 | # 1 "/usr/include/linux/posix_types.h" 1 3 4 | |
8299 | ||
8300 | ||
8301 | ||
8302 | # 1 "/usr/include/linux/stddef.h" 1 3 4 | |
8303 | # 14 "/usr/include/linux/stddef.h" 3 4 | |
8304 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
8305 | # 150 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 3 4 | |
8306 | typedef int ptrdiff_t; | |
8307 | # 15 "/usr/include/linux/stddef.h" 2 3 4 | |
8308 | # 5 "/usr/include/linux/posix_types.h" 2 3 4 | |
8309 | # 36 "/usr/include/linux/posix_types.h" 3 4 | |
8310 | typedef struct { | |
8311 | unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))]; | |
8312 | } __kernel_fd_set; | |
8313 | ||
8314 | ||
8315 | typedef void (*__kernel_sighandler_t)(int); | |
8316 | ||
8317 | ||
8318 | typedef int __kernel_key_t; | |
8319 | typedef int __kernel_mqd_t; | |
8320 | ||
8321 | # 1 "/usr/include/asm/posix_types.h" 1 3 4 | |
8322 | ||
8323 | # 1 "/usr/include/asm/posix_types_32.h" 1 3 4 | |
8324 | # 10 "/usr/include/asm/posix_types_32.h" 3 4 | |
8325 | typedef unsigned long __kernel_ino_t; | |
8326 | typedef unsigned short __kernel_mode_t; | |
8327 | typedef unsigned short __kernel_nlink_t; | |
8328 | typedef long __kernel_off_t; | |
8329 | typedef int __kernel_pid_t; | |
8330 | typedef unsigned short __kernel_ipc_pid_t; | |
8331 | typedef unsigned short __kernel_uid_t; | |
8332 | typedef unsigned short __kernel_gid_t; | |
8333 | typedef unsigned int __kernel_size_t; | |
8334 | typedef int __kernel_ssize_t; | |
8335 | typedef int __kernel_ptrdiff_t; | |
8336 | typedef long __kernel_time_t; | |
8337 | typedef long __kernel_suseconds_t; | |
8338 | typedef long __kernel_clock_t; | |
8339 | typedef int __kernel_timer_t; | |
8340 | typedef int __kernel_clockid_t; | |
8341 | typedef int __kernel_daddr_t; | |
8342 | typedef char * __kernel_caddr_t; | |
8343 | typedef unsigned short __kernel_uid16_t; | |
8344 | typedef unsigned short __kernel_gid16_t; | |
8345 | typedef unsigned int __kernel_uid32_t; | |
8346 | typedef unsigned int __kernel_gid32_t; | |
8347 | ||
8348 | typedef unsigned short __kernel_old_uid_t; | |
8349 | typedef unsigned short __kernel_old_gid_t; | |
8350 | typedef unsigned short __kernel_old_dev_t; | |
8351 | ||
8352 | ||
8353 | typedef long long __kernel_loff_t; | |
8354 | ||
8355 | ||
8356 | typedef struct { | |
8357 | int val[2]; | |
8358 | } __kernel_fsid_t; | |
8359 | # 3 "/usr/include/asm/posix_types.h" 2 3 4 | |
8360 | # 48 "/usr/include/linux/posix_types.h" 2 3 4 | |
8361 | # 9 "/usr/include/linux/types.h" 2 3 4 | |
8362 | # 27 "/usr/include/linux/types.h" 3 4 | |
8363 | typedef __u16 __le16; | |
8364 | typedef __u16 __be16; | |
8365 | typedef __u32 __le32; | |
8366 | typedef __u32 __be32; | |
8367 | typedef __u64 __le64; | |
8368 | typedef __u64 __be64; | |
8369 | ||
8370 | typedef __u16 __sum16; | |
8371 | typedef __u32 __wsum; | |
8372 | # 6 "/usr/include/asm/sigcontext.h" 2 3 4 | |
8373 | # 23 "/usr/include/asm/sigcontext.h" 3 4 | |
8374 | struct _fpx_sw_bytes { | |
8375 | __u32 magic1; | |
8376 | __u32 extended_size; | |
8377 | ||
8378 | ||
8379 | __u64 xstate_bv; | |
8380 | ||
8381 | ||
8382 | ||
8383 | ||
8384 | __u32 xstate_size; | |
8385 | ||
8386 | ||
8387 | ||
8388 | ||
8389 | __u32 padding[7]; | |
8390 | }; | |
8391 | # 56 "/usr/include/asm/sigcontext.h" 3 4 | |
8392 | struct _fpreg { | |
8393 | unsigned short significand[4]; | |
8394 | unsigned short exponent; | |
8395 | }; | |
8396 | ||
8397 | struct _fpxreg { | |
8398 | unsigned short significand[4]; | |
8399 | unsigned short exponent; | |
8400 | unsigned short padding[3]; | |
8401 | }; | |
8402 | ||
8403 | struct _xmmreg { | |
8404 | unsigned long element[4]; | |
8405 | }; | |
8406 | ||
8407 | struct _fpstate { | |
8408 | ||
8409 | unsigned long cw; | |
8410 | unsigned long sw; | |
8411 | unsigned long tag; | |
8412 | unsigned long ipoff; | |
8413 | unsigned long cssel; | |
8414 | unsigned long dataoff; | |
8415 | unsigned long datasel; | |
8416 | struct _fpreg _st[8]; | |
8417 | unsigned short status; | |
8418 | unsigned short magic; | |
8419 | ||
8420 | ||
8421 | unsigned long _fxsr_env[6]; | |
8422 | unsigned long mxcsr; | |
8423 | unsigned long reserved; | |
8424 | struct _fpxreg _fxsr_st[8]; | |
8425 | struct _xmmreg _xmm[8]; | |
8426 | unsigned long padding1[44]; | |
8427 | ||
8428 | union { | |
8429 | unsigned long padding2[12]; | |
8430 | struct _fpx_sw_bytes sw_reserved; | |
8431 | ||
8432 | }; | |
8433 | }; | |
8434 | ||
8435 | ||
8436 | ||
8437 | ||
8438 | ||
8439 | ||
8440 | struct sigcontext { | |
8441 | unsigned short gs, __gsh; | |
8442 | unsigned short fs, __fsh; | |
8443 | unsigned short es, __esh; | |
8444 | unsigned short ds, __dsh; | |
8445 | unsigned long edi; | |
8446 | unsigned long esi; | |
8447 | unsigned long ebp; | |
8448 | unsigned long esp; | |
8449 | unsigned long ebx; | |
8450 | unsigned long edx; | |
8451 | unsigned long ecx; | |
8452 | unsigned long eax; | |
8453 | unsigned long trapno; | |
8454 | unsigned long err; | |
8455 | unsigned long eip; | |
8456 | unsigned short cs, __csh; | |
8457 | unsigned long eflags; | |
8458 | unsigned long esp_at_signal; | |
8459 | unsigned short ss, __ssh; | |
8460 | struct _fpstate *fpstate; | |
8461 | unsigned long oldmask; | |
8462 | unsigned long cr2; | |
8463 | }; | |
8464 | # 190 "/usr/include/asm/sigcontext.h" 3 4 | |
8465 | struct _xsave_hdr { | |
8466 | __u64 xstate_bv; | |
8467 | __u64 reserved1[2]; | |
8468 | __u64 reserved2[5]; | |
8469 | }; | |
8470 | ||
8471 | struct _ymmh_state { | |
8472 | ||
8473 | __u32 ymmh_space[64]; | |
8474 | }; | |
8475 | ||
8476 | ||
8477 | ||
8478 | ||
8479 | ||
8480 | ||
8481 | ||
8482 | struct _xstate { | |
8483 | struct _fpstate fpstate; | |
8484 | struct _xsave_hdr xstate_hdr; | |
8485 | struct _ymmh_state ymmh; | |
8486 | ||
8487 | }; | |
8488 | # 29 "/usr/include/bits/sigcontext.h" 2 3 4 | |
8489 | ||
8490 | ||
8491 | ||
8492 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
8493 | # 33 "/usr/include/bits/sigcontext.h" 2 3 4 | |
8494 | # 340 "/usr/include/signal.h" 2 3 4 | |
8495 | ||
8496 | ||
8497 | extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__)); | |
8498 | ||
8499 | ||
8500 | ||
8501 | ||
8502 | ||
8503 | ||
8504 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
8505 | # 350 "/usr/include/signal.h" 2 3 4 | |
8506 | ||
8507 | ||
8508 | ||
8509 | ||
8510 | extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__)); | |
8511 | ||
8512 | # 1 "/usr/include/bits/sigstack.h" 1 3 4 | |
8513 | # 26 "/usr/include/bits/sigstack.h" 3 4 | |
8514 | struct sigstack | |
8515 | { | |
8516 | void *ss_sp; | |
8517 | int ss_onstack; | |
8518 | }; | |
8519 | ||
8520 | ||
8521 | ||
8522 | enum | |
8523 | { | |
8524 | SS_ONSTACK = 1, | |
8525 | ||
8526 | SS_DISABLE | |
8527 | ||
8528 | }; | |
8529 | # 50 "/usr/include/bits/sigstack.h" 3 4 | |
8530 | typedef struct sigaltstack | |
8531 | { | |
8532 | void *ss_sp; | |
8533 | int ss_flags; | |
8534 | size_t ss_size; | |
8535 | } stack_t; | |
8536 | # 357 "/usr/include/signal.h" 2 3 4 | |
8537 | ||
8538 | ||
8539 | # 1 "/usr/include/sys/ucontext.h" 1 3 4 | |
8540 | # 23 "/usr/include/sys/ucontext.h" 3 4 | |
8541 | # 1 "/usr/include/signal.h" 1 3 4 | |
8542 | # 24 "/usr/include/sys/ucontext.h" 2 3 4 | |
8543 | ||
8544 | ||
8545 | ||
8546 | # 1 "/usr/include/bits/sigcontext.h" 1 3 4 | |
8547 | # 28 "/usr/include/sys/ucontext.h" 2 3 4 | |
8548 | ||
8549 | ||
8550 | ||
8551 | typedef int greg_t; | |
8552 | ||
8553 | ||
8554 | ||
8555 | ||
8556 | ||
8557 | typedef greg_t gregset_t[19]; | |
8558 | ||
8559 | ||
8560 | ||
8561 | enum | |
8562 | { | |
8563 | REG_GS = 0, | |
8564 | ||
8565 | REG_FS, | |
8566 | ||
8567 | REG_ES, | |
8568 | ||
8569 | REG_DS, | |
8570 | ||
8571 | REG_EDI, | |
8572 | ||
8573 | REG_ESI, | |
8574 | ||
8575 | REG_EBP, | |
8576 | ||
8577 | REG_ESP, | |
8578 | ||
8579 | REG_EBX, | |
8580 | ||
8581 | REG_EDX, | |
8582 | ||
8583 | REG_ECX, | |
8584 | ||
8585 | REG_EAX, | |
8586 | ||
8587 | REG_TRAPNO, | |
8588 | ||
8589 | REG_ERR, | |
8590 | ||
8591 | REG_EIP, | |
8592 | ||
8593 | REG_CS, | |
8594 | ||
8595 | REG_EFL, | |
8596 | ||
8597 | REG_UESP, | |
8598 | ||
8599 | REG_SS | |
8600 | ||
8601 | }; | |
8602 | ||
8603 | ||
8604 | ||
8605 | struct _libc_fpreg | |
8606 | { | |
8607 | unsigned short int significand[4]; | |
8608 | unsigned short int exponent; | |
8609 | }; | |
8610 | ||
8611 | struct _libc_fpstate | |
8612 | { | |
8613 | unsigned long int cw; | |
8614 | unsigned long int sw; | |
8615 | unsigned long int tag; | |
8616 | unsigned long int ipoff; | |
8617 | unsigned long int cssel; | |
8618 | unsigned long int dataoff; | |
8619 | unsigned long int datasel; | |
8620 | struct _libc_fpreg _st[8]; | |
8621 | unsigned long int status; | |
8622 | }; | |
8623 | ||
8624 | ||
8625 | typedef struct _libc_fpstate *fpregset_t; | |
8626 | ||
8627 | ||
8628 | typedef struct | |
8629 | { | |
8630 | gregset_t gregs; | |
8631 | ||
8632 | ||
8633 | fpregset_t fpregs; | |
8634 | unsigned long int oldmask; | |
8635 | unsigned long int cr2; | |
8636 | } mcontext_t; | |
8637 | ||
8638 | ||
8639 | typedef struct ucontext | |
8640 | { | |
8641 | unsigned long int uc_flags; | |
8642 | struct ucontext *uc_link; | |
8643 | stack_t uc_stack; | |
8644 | mcontext_t uc_mcontext; | |
8645 | __sigset_t uc_sigmask; | |
8646 | struct _libc_fpstate __fpregs_mem; | |
8647 | } ucontext_t; | |
8648 | # 360 "/usr/include/signal.h" 2 3 4 | |
8649 | ||
8650 | ||
8651 | ||
8652 | ||
8653 | ||
8654 | extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) | |
8655 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); | |
8656 | ||
8657 | ||
8658 | ||
8659 | extern int sigaltstack (__const struct sigaltstack *__restrict __ss, | |
8660 | struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__)); | |
8661 | ||
8662 | ||
8663 | ||
8664 | ||
8665 | ||
8666 | ||
8667 | ||
8668 | extern int sighold (int __sig) __attribute__ ((__nothrow__ , __leaf__)); | |
8669 | ||
8670 | ||
8671 | extern int sigrelse (int __sig) __attribute__ ((__nothrow__ , __leaf__)); | |
8672 | ||
8673 | ||
8674 | extern int sigignore (int __sig) __attribute__ ((__nothrow__ , __leaf__)); | |
8675 | ||
8676 | ||
8677 | extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__ , __leaf__)); | |
8678 | ||
8679 | ||
8680 | ||
8681 | ||
8682 | ||
8683 | ||
8684 | # 1 "/usr/include/bits/sigthread.h" 1 3 4 | |
8685 | # 31 "/usr/include/bits/sigthread.h" 3 4 | |
8686 | extern int pthread_sigmask (int __how, | |
8687 | __const __sigset_t *__restrict __newmask, | |
8688 | __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__)); | |
8689 | ||
8690 | ||
8691 | extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__)); | |
8692 | ||
8693 | ||
8694 | ||
8695 | extern int pthread_sigqueue (pthread_t __threadid, int __signo, | |
8696 | const union sigval __value) __attribute__ ((__nothrow__ , __leaf__)); | |
8697 | # 396 "/usr/include/signal.h" 2 3 4 | |
8698 | ||
8699 | ||
8700 | ||
8701 | ||
8702 | ||
8703 | ||
8704 | extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__)); | |
8705 | ||
8706 | extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__)); | |
8707 | ||
8708 | ||
8709 | ||
8710 | ||
8711 | # 39 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
8712 | # 1 "/usr/include/glib-2.0/glib.h" 1 | |
8713 | # 32 "/usr/include/glib-2.0/glib.h" | |
8714 | # 1 "/usr/include/glib-2.0/glib/galloca.h" 1 | |
8715 | # 34 "/usr/include/glib-2.0/glib/galloca.h" | |
8716 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
8717 | # 34 "/usr/include/glib-2.0/glib/gtypes.h" | |
8718 | # 1 "/usr/lib/glib-2.0/include/glibconfig.h" 1 | |
8719 | # 9 "/usr/lib/glib-2.0/include/glibconfig.h" | |
8720 | # 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 | |
8721 | # 40 "/usr/include/glib-2.0/glib/gmacros.h" | |
8722 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
8723 | # 41 "/usr/include/glib-2.0/glib/gmacros.h" 2 | |
8724 | # 10 "/usr/lib/glib-2.0/include/glibconfig.h" 2 | |
8725 | ||
8726 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 1 3 4 | |
8727 | # 12 "/usr/lib/glib-2.0/include/glibconfig.h" 2 | |
8728 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/float.h" 1 3 4 | |
8729 | # 13 "/usr/lib/glib-2.0/include/glibconfig.h" 2 | |
8730 | # 22 "/usr/lib/glib-2.0/include/glibconfig.h" | |
8731 | ||
8732 | # 38 "/usr/lib/glib-2.0/include/glibconfig.h" | |
8733 | typedef signed char gint8; | |
8734 | typedef unsigned char guint8; | |
8735 | typedef signed short gint16; | |
8736 | typedef unsigned short guint16; | |
8737 | ||
8738 | ||
8739 | ||
8740 | typedef signed int gint32; | |
8741 | typedef unsigned int guint32; | |
8742 | ||
8743 | ||
8744 | ||
8745 | ||
8746 | ||
8747 | __extension__ typedef signed long long gint64; | |
8748 | __extension__ typedef unsigned long long guint64; | |
8749 | # 65 "/usr/lib/glib-2.0/include/glibconfig.h" | |
8750 | typedef signed int gssize; | |
8751 | typedef unsigned int gsize; | |
8752 | # 75 "/usr/lib/glib-2.0/include/glibconfig.h" | |
8753 | typedef gint64 goffset; | |
8754 | # 90 "/usr/lib/glib-2.0/include/glibconfig.h" | |
8755 | typedef signed int gintptr; | |
8756 | typedef unsigned int guintptr; | |
8757 | # 197 "/usr/lib/glib-2.0/include/glibconfig.h" | |
8758 | typedef int GPid; | |
8759 | # 207 "/usr/lib/glib-2.0/include/glibconfig.h" | |
8760 | ||
8761 | # 35 "/usr/include/glib-2.0/glib/gtypes.h" 2 | |
8762 | # 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 | |
8763 | # 36 "/usr/include/glib-2.0/glib/gtypes.h" 2 | |
8764 | # 1 "/usr/include/glib-2.0/glib/gversionmacros.h" 1 | |
8765 | # 37 "/usr/include/glib-2.0/glib/gtypes.h" 2 | |
8766 | ||
8767 | ||
8768 | ||
8769 | # 48 "/usr/include/glib-2.0/glib/gtypes.h" | |
8770 | typedef char gchar; | |
8771 | typedef short gshort; | |
8772 | typedef long glong; | |
8773 | typedef int gint; | |
8774 | typedef gint gboolean; | |
8775 | ||
8776 | typedef unsigned char guchar; | |
8777 | typedef unsigned short gushort; | |
8778 | typedef unsigned long gulong; | |
8779 | typedef unsigned int guint; | |
8780 | ||
8781 | typedef float gfloat; | |
8782 | typedef double gdouble; | |
8783 | # 79 "/usr/include/glib-2.0/glib/gtypes.h" | |
8784 | typedef void* gpointer; | |
8785 | typedef const void *gconstpointer; | |
8786 | ||
8787 | typedef gint (*GCompareFunc) (gconstpointer a, | |
8788 | gconstpointer b); | |
8789 | typedef gint (*GCompareDataFunc) (gconstpointer a, | |
8790 | gconstpointer b, | |
8791 | gpointer user_data); | |
8792 | typedef gboolean (*GEqualFunc) (gconstpointer a, | |
8793 | gconstpointer b); | |
8794 | typedef void (*GDestroyNotify) (gpointer data); | |
8795 | typedef void (*GFunc) (gpointer data, | |
8796 | gpointer user_data); | |
8797 | typedef guint (*GHashFunc) (gconstpointer key); | |
8798 | typedef void (*GHFunc) (gpointer key, | |
8799 | gpointer value, | |
8800 | gpointer user_data); | |
8801 | # 105 "/usr/include/glib-2.0/glib/gtypes.h" | |
8802 | typedef void (*GFreeFunc) (gpointer data); | |
8803 | # 119 "/usr/include/glib-2.0/glib/gtypes.h" | |
8804 | typedef const gchar * (*GTranslateFunc) (const gchar *str, | |
8805 | gpointer data); | |
8806 | # 401 "/usr/include/glib-2.0/glib/gtypes.h" | |
8807 | typedef union _GDoubleIEEE754 GDoubleIEEE754; | |
8808 | typedef union _GFloatIEEE754 GFloatIEEE754; | |
8809 | ||
8810 | ||
8811 | ||
8812 | ||
8813 | ||
8814 | union _GFloatIEEE754 | |
8815 | { | |
8816 | gfloat v_float; | |
8817 | struct { | |
8818 | guint mantissa : 23; | |
8819 | guint biased_exponent : 8; | |
8820 | guint sign : 1; | |
8821 | } mpn; | |
8822 | }; | |
8823 | union _GDoubleIEEE754 | |
8824 | { | |
8825 | gdouble v_double; | |
8826 | struct { | |
8827 | guint mantissa_low : 32; | |
8828 | guint mantissa_high : 20; | |
8829 | guint biased_exponent : 11; | |
8830 | guint sign : 1; | |
8831 | } mpn; | |
8832 | }; | |
8833 | # 451 "/usr/include/glib-2.0/glib/gtypes.h" | |
8834 | typedef struct _GTimeVal GTimeVal; | |
8835 | ||
8836 | struct _GTimeVal | |
8837 | { | |
8838 | glong tv_sec; | |
8839 | glong tv_usec; | |
8840 | }; | |
8841 | ||
8842 | ||
8843 | # 35 "/usr/include/glib-2.0/glib/galloca.h" 2 | |
8844 | # 33 "/usr/include/glib-2.0/glib.h" 2 | |
8845 | # 1 "/usr/include/glib-2.0/glib/garray.h" 1 | |
8846 | # 34 "/usr/include/glib-2.0/glib/garray.h" | |
8847 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
8848 | # 35 "/usr/include/glib-2.0/glib/garray.h" 2 | |
8849 | ||
8850 | ||
8851 | ||
8852 | typedef struct _GBytes GBytes; | |
8853 | typedef struct _GArray GArray; | |
8854 | typedef struct _GByteArray GByteArray; | |
8855 | typedef struct _GPtrArray GPtrArray; | |
8856 | ||
8857 | struct _GArray | |
8858 | { | |
8859 | gchar *data; | |
8860 | guint len; | |
8861 | }; | |
8862 | ||
8863 | struct _GByteArray | |
8864 | { | |
8865 | guint8 *data; | |
8866 | guint len; | |
8867 | }; | |
8868 | ||
8869 | struct _GPtrArray | |
8870 | { | |
8871 | gpointer *pdata; | |
8872 | guint len; | |
8873 | }; | |
8874 | # 71 "/usr/include/glib-2.0/glib/garray.h" | |
8875 | GArray* g_array_new (gboolean zero_terminated, | |
8876 | gboolean clear_, | |
8877 | guint element_size); | |
8878 | GArray* g_array_sized_new (gboolean zero_terminated, | |
8879 | gboolean clear_, | |
8880 | guint element_size, | |
8881 | guint reserved_size); | |
8882 | gchar* g_array_free (GArray *array, | |
8883 | gboolean free_segment); | |
8884 | GArray *g_array_ref (GArray *array); | |
8885 | void g_array_unref (GArray *array); | |
8886 | guint g_array_get_element_size (GArray *array); | |
8887 | GArray* g_array_append_vals (GArray *array, | |
8888 | gconstpointer data, | |
8889 | guint len); | |
8890 | GArray* g_array_prepend_vals (GArray *array, | |
8891 | gconstpointer data, | |
8892 | guint len); | |
8893 | GArray* g_array_insert_vals (GArray *array, | |
8894 | guint index_, | |
8895 | gconstpointer data, | |
8896 | guint len); | |
8897 | GArray* g_array_set_size (GArray *array, | |
8898 | guint length); | |
8899 | GArray* g_array_remove_index (GArray *array, | |
8900 | guint index_); | |
8901 | GArray* g_array_remove_index_fast (GArray *array, | |
8902 | guint index_); | |
8903 | GArray* g_array_remove_range (GArray *array, | |
8904 | guint index_, | |
8905 | guint length); | |
8906 | void g_array_sort (GArray *array, | |
8907 | GCompareFunc compare_func); | |
8908 | void g_array_sort_with_data (GArray *array, | |
8909 | GCompareDataFunc compare_func, | |
8910 | gpointer user_data); | |
8911 | void g_array_set_clear_func (GArray *array, | |
8912 | GDestroyNotify clear_func); | |
8913 | ||
8914 | ||
8915 | ||
8916 | ||
8917 | ||
8918 | ||
8919 | GPtrArray* g_ptr_array_new (void); | |
8920 | GPtrArray* g_ptr_array_new_with_free_func (GDestroyNotify element_free_func); | |
8921 | GPtrArray* g_ptr_array_sized_new (guint reserved_size); | |
8922 | GPtrArray* g_ptr_array_new_full (guint reserved_size, | |
8923 | GDestroyNotify element_free_func); | |
8924 | gpointer* g_ptr_array_free (GPtrArray *array, | |
8925 | gboolean free_seg); | |
8926 | GPtrArray* g_ptr_array_ref (GPtrArray *array); | |
8927 | void g_ptr_array_unref (GPtrArray *array); | |
8928 | void g_ptr_array_set_free_func (GPtrArray *array, | |
8929 | GDestroyNotify element_free_func); | |
8930 | void g_ptr_array_set_size (GPtrArray *array, | |
8931 | gint length); | |
8932 | gpointer g_ptr_array_remove_index (GPtrArray *array, | |
8933 | guint index_); | |
8934 | gpointer g_ptr_array_remove_index_fast (GPtrArray *array, | |
8935 | guint index_); | |
8936 | gboolean g_ptr_array_remove (GPtrArray *array, | |
8937 | gpointer data); | |
8938 | gboolean g_ptr_array_remove_fast (GPtrArray *array, | |
8939 | gpointer data); | |
8940 | void g_ptr_array_remove_range (GPtrArray *array, | |
8941 | guint index_, | |
8942 | guint length); | |
8943 | void g_ptr_array_add (GPtrArray *array, | |
8944 | gpointer data); | |
8945 | void g_ptr_array_sort (GPtrArray *array, | |
8946 | GCompareFunc compare_func); | |
8947 | void g_ptr_array_sort_with_data (GPtrArray *array, | |
8948 | GCompareDataFunc compare_func, | |
8949 | gpointer user_data); | |
8950 | void g_ptr_array_foreach (GPtrArray *array, | |
8951 | GFunc func, | |
8952 | gpointer user_data); | |
8953 | ||
8954 | ||
8955 | ||
8956 | ||
8957 | ||
8958 | ||
8959 | GByteArray* g_byte_array_new (void); | |
8960 | GByteArray* g_byte_array_new_take (guint8 *data, | |
8961 | gsize len); | |
8962 | GByteArray* g_byte_array_sized_new (guint reserved_size); | |
8963 | guint8* g_byte_array_free (GByteArray *array, | |
8964 | gboolean free_segment); | |
8965 | GBytes* g_byte_array_free_to_bytes (GByteArray *array); | |
8966 | GByteArray *g_byte_array_ref (GByteArray *array); | |
8967 | void g_byte_array_unref (GByteArray *array); | |
8968 | GByteArray* g_byte_array_append (GByteArray *array, | |
8969 | const guint8 *data, | |
8970 | guint len); | |
8971 | GByteArray* g_byte_array_prepend (GByteArray *array, | |
8972 | const guint8 *data, | |
8973 | guint len); | |
8974 | GByteArray* g_byte_array_set_size (GByteArray *array, | |
8975 | guint length); | |
8976 | GByteArray* g_byte_array_remove_index (GByteArray *array, | |
8977 | guint index_); | |
8978 | GByteArray* g_byte_array_remove_index_fast (GByteArray *array, | |
8979 | guint index_); | |
8980 | GByteArray* g_byte_array_remove_range (GByteArray *array, | |
8981 | guint index_, | |
8982 | guint length); | |
8983 | void g_byte_array_sort (GByteArray *array, | |
8984 | GCompareFunc compare_func); | |
8985 | void g_byte_array_sort_with_data (GByteArray *array, | |
8986 | GCompareDataFunc compare_func, | |
8987 | gpointer user_data); | |
8988 | ||
8989 | ||
8990 | # 34 "/usr/include/glib-2.0/glib.h" 2 | |
8991 | # 1 "/usr/include/glib-2.0/glib/gasyncqueue.h" 1 | |
8992 | # 34 "/usr/include/glib-2.0/glib/gasyncqueue.h" | |
8993 | # 1 "/usr/include/glib-2.0/glib/gthread.h" 1 | |
8994 | # 34 "/usr/include/glib-2.0/glib/gthread.h" | |
8995 | # 1 "/usr/include/glib-2.0/glib/gatomic.h" 1 | |
8996 | # 29 "/usr/include/glib-2.0/glib/gatomic.h" | |
8997 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
8998 | # 30 "/usr/include/glib-2.0/glib/gatomic.h" 2 | |
8999 | ||
9000 | ||
9001 | ||
9002 | gint g_atomic_int_get (volatile gint *atomic); | |
9003 | void g_atomic_int_set (volatile gint *atomic, | |
9004 | gint newval); | |
9005 | void g_atomic_int_inc (volatile gint *atomic); | |
9006 | gboolean g_atomic_int_dec_and_test (volatile gint *atomic); | |
9007 | gboolean g_atomic_int_compare_and_exchange (volatile gint *atomic, | |
9008 | gint oldval, | |
9009 | gint newval); | |
9010 | gint g_atomic_int_add (volatile gint *atomic, | |
9011 | gint val); | |
9012 | ||
9013 | guint g_atomic_int_and (volatile guint *atomic, | |
9014 | guint val); | |
9015 | ||
9016 | guint g_atomic_int_or (volatile guint *atomic, | |
9017 | guint val); | |
9018 | guint g_atomic_int_xor (volatile guint *atomic, | |
9019 | guint val); | |
9020 | ||
9021 | gpointer g_atomic_pointer_get (volatile void *atomic); | |
9022 | void g_atomic_pointer_set (volatile void *atomic, | |
9023 | gpointer newval); | |
9024 | gboolean g_atomic_pointer_compare_and_exchange (volatile void *atomic, | |
9025 | gpointer oldval, | |
9026 | gpointer newval); | |
9027 | gssize g_atomic_pointer_add (volatile void *atomic, | |
9028 | gssize val); | |
9029 | ||
9030 | gsize g_atomic_pointer_and (volatile void *atomic, | |
9031 | gsize val); | |
9032 | ||
9033 | gsize g_atomic_pointer_or (volatile void *atomic, | |
9034 | gsize val); | |
9035 | gsize g_atomic_pointer_xor (volatile void *atomic, | |
9036 | gsize val); | |
9037 | ||
9038 | __attribute__((__deprecated__("Use '" "g_atomic_add" "' instead"))) | |
9039 | gint g_atomic_int_exchange_and_add (volatile gint *atomic, | |
9040 | gint val); | |
9041 | ||
9042 | ||
9043 | # 35 "/usr/include/glib-2.0/glib/gthread.h" 2 | |
9044 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
9045 | # 30 "/usr/include/glib-2.0/glib/gerror.h" | |
9046 | # 1 "/usr/include/glib-2.0/glib/gquark.h" 1 | |
9047 | # 34 "/usr/include/glib-2.0/glib/gquark.h" | |
9048 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
9049 | # 35 "/usr/include/glib-2.0/glib/gquark.h" 2 | |
9050 | ||
9051 | ||
9052 | ||
9053 | typedef guint32 GQuark; | |
9054 | ||
9055 | ||
9056 | ||
9057 | GQuark g_quark_try_string (const gchar *string); | |
9058 | GQuark g_quark_from_static_string (const gchar *string); | |
9059 | GQuark g_quark_from_string (const gchar *string); | |
9060 | const gchar * g_quark_to_string (GQuark quark) __attribute__((__const__)); | |
9061 | ||
9062 | const gchar * g_intern_string (const gchar *string); | |
9063 | const gchar * g_intern_static_string (const gchar *string); | |
9064 | ||
9065 | ||
9066 | # 31 "/usr/include/glib-2.0/glib/gerror.h" 2 | |
9067 | ||
9068 | ||
9069 | # 43 "/usr/include/glib-2.0/glib/gerror.h" | |
9070 | typedef struct _GError GError; | |
9071 | ||
9072 | struct _GError | |
9073 | { | |
9074 | GQuark domain; | |
9075 | gint code; | |
9076 | gchar *message; | |
9077 | }; | |
9078 | ||
9079 | GError* g_error_new (GQuark domain, | |
9080 | gint code, | |
9081 | const gchar *format, | |
9082 | ...) __attribute__((__format__ (__printf__, 3, 4))); | |
9083 | ||
9084 | GError* g_error_new_literal (GQuark domain, | |
9085 | gint code, | |
9086 | const gchar *message); | |
9087 | GError* g_error_new_valist (GQuark domain, | |
9088 | gint code, | |
9089 | const gchar *format, | |
9090 | va_list args); | |
9091 | ||
9092 | void g_error_free (GError *error); | |
9093 | GError* g_error_copy (const GError *error); | |
9094 | ||
9095 | gboolean g_error_matches (const GError *error, | |
9096 | GQuark domain, | |
9097 | gint code); | |
9098 | ||
9099 | ||
9100 | ||
9101 | ||
9102 | void g_set_error (GError **err, | |
9103 | GQuark domain, | |
9104 | gint code, | |
9105 | const gchar *format, | |
9106 | ...) __attribute__((__format__ (__printf__, 4, 5))); | |
9107 | ||
9108 | void g_set_error_literal (GError **err, | |
9109 | GQuark domain, | |
9110 | gint code, | |
9111 | const gchar *message); | |
9112 | ||
9113 | ||
9114 | ||
9115 | void g_propagate_error (GError **dest, | |
9116 | GError *src); | |
9117 | ||
9118 | ||
9119 | void g_clear_error (GError **err); | |
9120 | ||
9121 | ||
9122 | void g_prefix_error (GError **err, | |
9123 | const gchar *format, | |
9124 | ...) __attribute__((__format__ (__printf__, 2, 3))); | |
9125 | ||
9126 | ||
9127 | void g_propagate_prefixed_error (GError **dest, | |
9128 | GError *src, | |
9129 | const gchar *format, | |
9130 | ...) __attribute__((__format__ (__printf__, 3, 4))); | |
9131 | ||
9132 | ||
9133 | # 36 "/usr/include/glib-2.0/glib/gthread.h" 2 | |
9134 | ||
9135 | ||
9136 | ||
9137 | ||
9138 | GQuark g_thread_error_quark (void); | |
9139 | ||
9140 | typedef enum | |
9141 | { | |
9142 | G_THREAD_ERROR_AGAIN | |
9143 | } GThreadError; | |
9144 | ||
9145 | typedef gpointer (*GThreadFunc) (gpointer data); | |
9146 | ||
9147 | typedef struct _GThread GThread; | |
9148 | ||
9149 | typedef union _GMutex GMutex; | |
9150 | typedef struct _GRecMutex GRecMutex; | |
9151 | typedef struct _GRWLock GRWLock; | |
9152 | typedef struct _GCond GCond; | |
9153 | typedef struct _GPrivate GPrivate; | |
9154 | typedef struct _GOnce GOnce; | |
9155 | ||
9156 | union _GMutex | |
9157 | { | |
9158 | ||
9159 | gpointer p; | |
9160 | guint i[2]; | |
9161 | }; | |
9162 | ||
9163 | struct _GRWLock | |
9164 | { | |
9165 | ||
9166 | gpointer p; | |
9167 | guint i[2]; | |
9168 | }; | |
9169 | ||
9170 | struct _GCond | |
9171 | { | |
9172 | ||
9173 | gpointer p; | |
9174 | guint i[2]; | |
9175 | }; | |
9176 | ||
9177 | struct _GRecMutex | |
9178 | { | |
9179 | ||
9180 | gpointer p; | |
9181 | guint i[2]; | |
9182 | }; | |
9183 | ||
9184 | ||
9185 | struct _GPrivate | |
9186 | { | |
9187 | ||
9188 | gpointer p; | |
9189 | GDestroyNotify notify; | |
9190 | gpointer future[2]; | |
9191 | }; | |
9192 | ||
9193 | typedef enum | |
9194 | { | |
9195 | G_ONCE_STATUS_NOTCALLED, | |
9196 | G_ONCE_STATUS_PROGRESS, | |
9197 | G_ONCE_STATUS_READY | |
9198 | } GOnceStatus; | |
9199 | ||
9200 | ||
9201 | struct _GOnce | |
9202 | { | |
9203 | volatile GOnceStatus status; | |
9204 | volatile gpointer retval; | |
9205 | }; | |
9206 | # 140 "/usr/include/glib-2.0/glib/gthread.h" | |
9207 | GThread * g_thread_ref (GThread *thread); | |
9208 | void g_thread_unref (GThread *thread); | |
9209 | GThread * g_thread_new (const gchar *name, | |
9210 | GThreadFunc func, | |
9211 | gpointer data); | |
9212 | GThread * g_thread_try_new (const gchar *name, | |
9213 | GThreadFunc func, | |
9214 | gpointer data, | |
9215 | GError **error); | |
9216 | GThread * g_thread_self (void); | |
9217 | void g_thread_exit (gpointer retval); | |
9218 | gpointer g_thread_join (GThread *thread); | |
9219 | void g_thread_yield (void); | |
9220 | ||
9221 | ||
9222 | void g_mutex_init (GMutex *mutex); | |
9223 | void g_mutex_clear (GMutex *mutex); | |
9224 | void g_mutex_lock (GMutex *mutex); | |
9225 | gboolean g_mutex_trylock (GMutex *mutex); | |
9226 | void g_mutex_unlock (GMutex *mutex); | |
9227 | ||
9228 | void g_rw_lock_init (GRWLock *rw_lock); | |
9229 | void g_rw_lock_clear (GRWLock *rw_lock); | |
9230 | void g_rw_lock_writer_lock (GRWLock *rw_lock); | |
9231 | gboolean g_rw_lock_writer_trylock (GRWLock *rw_lock); | |
9232 | void g_rw_lock_writer_unlock (GRWLock *rw_lock); | |
9233 | void g_rw_lock_reader_lock (GRWLock *rw_lock); | |
9234 | gboolean g_rw_lock_reader_trylock (GRWLock *rw_lock); | |
9235 | void g_rw_lock_reader_unlock (GRWLock *rw_lock); | |
9236 | ||
9237 | void g_rec_mutex_init (GRecMutex *rec_mutex); | |
9238 | void g_rec_mutex_clear (GRecMutex *rec_mutex); | |
9239 | void g_rec_mutex_lock (GRecMutex *rec_mutex); | |
9240 | gboolean g_rec_mutex_trylock (GRecMutex *rec_mutex); | |
9241 | void g_rec_mutex_unlock (GRecMutex *rec_mutex); | |
9242 | ||
9243 | void g_cond_init (GCond *cond); | |
9244 | void g_cond_clear (GCond *cond); | |
9245 | void g_cond_wait (GCond *cond, | |
9246 | GMutex *mutex); | |
9247 | void g_cond_signal (GCond *cond); | |
9248 | void g_cond_broadcast (GCond *cond); | |
9249 | gboolean g_cond_wait_until (GCond *cond, | |
9250 | GMutex *mutex, | |
9251 | gint64 end_time); | |
9252 | ||
9253 | gpointer g_private_get (GPrivate *key); | |
9254 | void g_private_set (GPrivate *key, | |
9255 | gpointer value); | |
9256 | void g_private_replace (GPrivate *key, | |
9257 | gpointer value); | |
9258 | ||
9259 | gpointer g_once_impl (GOnce *once, | |
9260 | GThreadFunc func, | |
9261 | gpointer arg); | |
9262 | gboolean g_once_init_enter (volatile void *location); | |
9263 | void g_once_init_leave (volatile void *location, | |
9264 | gsize result); | |
9265 | # 229 "/usr/include/glib-2.0/glib/gthread.h" | |
9266 | ||
9267 | # 35 "/usr/include/glib-2.0/glib/gasyncqueue.h" 2 | |
9268 | ||
9269 | ||
9270 | ||
9271 | typedef struct _GAsyncQueue GAsyncQueue; | |
9272 | ||
9273 | GAsyncQueue *g_async_queue_new (void); | |
9274 | GAsyncQueue *g_async_queue_new_full (GDestroyNotify item_free_func); | |
9275 | void g_async_queue_lock (GAsyncQueue *queue); | |
9276 | void g_async_queue_unlock (GAsyncQueue *queue); | |
9277 | GAsyncQueue *g_async_queue_ref (GAsyncQueue *queue); | |
9278 | void g_async_queue_unref (GAsyncQueue *queue); | |
9279 | ||
9280 | __attribute__((__deprecated__("Use '" "g_async_queue_ref" "' instead"))) | |
9281 | void g_async_queue_ref_unlocked (GAsyncQueue *queue); | |
9282 | ||
9283 | __attribute__((__deprecated__("Use '" "g_async_queue_unref" "' instead"))) | |
9284 | void g_async_queue_unref_and_unlock (GAsyncQueue *queue); | |
9285 | ||
9286 | void g_async_queue_push (GAsyncQueue *queue, | |
9287 | gpointer data); | |
9288 | void g_async_queue_push_unlocked (GAsyncQueue *queue, | |
9289 | gpointer data); | |
9290 | void g_async_queue_push_sorted (GAsyncQueue *queue, | |
9291 | gpointer data, | |
9292 | GCompareDataFunc func, | |
9293 | gpointer user_data); | |
9294 | void g_async_queue_push_sorted_unlocked (GAsyncQueue *queue, | |
9295 | gpointer data, | |
9296 | GCompareDataFunc func, | |
9297 | gpointer user_data); | |
9298 | gpointer g_async_queue_pop (GAsyncQueue *queue); | |
9299 | gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue); | |
9300 | gpointer g_async_queue_try_pop (GAsyncQueue *queue); | |
9301 | gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue); | |
9302 | gpointer g_async_queue_timeout_pop (GAsyncQueue *queue, | |
9303 | guint64 timeout); | |
9304 | gpointer g_async_queue_timeout_pop_unlocked (GAsyncQueue *queue, | |
9305 | guint64 timeout); | |
9306 | gint g_async_queue_length (GAsyncQueue *queue); | |
9307 | gint g_async_queue_length_unlocked (GAsyncQueue *queue); | |
9308 | void g_async_queue_sort (GAsyncQueue *queue, | |
9309 | GCompareDataFunc func, | |
9310 | gpointer user_data); | |
9311 | void g_async_queue_sort_unlocked (GAsyncQueue *queue, | |
9312 | GCompareDataFunc func, | |
9313 | gpointer user_data); | |
9314 | ||
9315 | __attribute__((__deprecated__("Use '" "g_async_queue_timeout_pop" "' instead"))) | |
9316 | gpointer g_async_queue_timed_pop (GAsyncQueue *queue, | |
9317 | GTimeVal *end_time); | |
9318 | __attribute__((__deprecated__("Use '" "g_async_queue_timeout_pop_unlocked" "' instead"))) | |
9319 | gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, | |
9320 | GTimeVal *end_time); | |
9321 | ||
9322 | ||
9323 | # 35 "/usr/include/glib-2.0/glib.h" 2 | |
9324 | # 1 "/usr/include/glib-2.0/glib/gatomic.h" 1 | |
9325 | # 36 "/usr/include/glib-2.0/glib.h" 2 | |
9326 | # 1 "/usr/include/glib-2.0/glib/gbacktrace.h" 1 | |
9327 | # 34 "/usr/include/glib-2.0/glib/gbacktrace.h" | |
9328 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
9329 | # 35 "/usr/include/glib-2.0/glib/gbacktrace.h" 2 | |
9330 | ||
9331 | ||
9332 | ||
9333 | ||
9334 | void g_on_error_query (const gchar *prg_name); | |
9335 | void g_on_error_stack_trace (const gchar *prg_name); | |
9336 | # 62 "/usr/include/glib-2.0/glib/gbacktrace.h" | |
9337 | ||
9338 | # 37 "/usr/include/glib-2.0/glib.h" 2 | |
9339 | # 1 "/usr/include/glib-2.0/glib/gbase64.h" 1 | |
9340 | # 28 "/usr/include/glib-2.0/glib/gbase64.h" | |
9341 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
9342 | # 29 "/usr/include/glib-2.0/glib/gbase64.h" 2 | |
9343 | ||
9344 | ||
9345 | ||
9346 | gsize g_base64_encode_step (const guchar *in, | |
9347 | gsize len, | |
9348 | gboolean break_lines, | |
9349 | gchar *out, | |
9350 | gint *state, | |
9351 | gint *save); | |
9352 | gsize g_base64_encode_close (gboolean break_lines, | |
9353 | gchar *out, | |
9354 | gint *state, | |
9355 | gint *save); | |
9356 | gchar* g_base64_encode (const guchar *data, | |
9357 | gsize len) __attribute__((__malloc__)); | |
9358 | gsize g_base64_decode_step (const gchar *in, | |
9359 | gsize len, | |
9360 | guchar *out, | |
9361 | gint *state, | |
9362 | guint *save); | |
9363 | guchar *g_base64_decode (const gchar *text, | |
9364 | gsize *out_len) __attribute__((__malloc__)); | |
9365 | guchar *g_base64_decode_inplace (gchar *text, | |
9366 | gsize *out_len); | |
9367 | ||
9368 | ||
9369 | ||
9370 | # 38 "/usr/include/glib-2.0/glib.h" 2 | |
9371 | # 1 "/usr/include/glib-2.0/glib/gbitlock.h" 1 | |
9372 | # 26 "/usr/include/glib-2.0/glib/gbitlock.h" | |
9373 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
9374 | # 27 "/usr/include/glib-2.0/glib/gbitlock.h" 2 | |
9375 | ||
9376 | ||
9377 | ||
9378 | ||
9379 | ||
9380 | ||
9381 | ||
9382 | void g_bit_lock (volatile gint *address, | |
9383 | gint lock_bit); | |
9384 | gboolean g_bit_trylock (volatile gint *address, | |
9385 | gint lock_bit); | |
9386 | void g_bit_unlock (volatile gint *address, | |
9387 | gint lock_bit); | |
9388 | ||
9389 | void g_pointer_bit_lock (volatile void *address, | |
9390 | gint lock_bit); | |
9391 | gboolean g_pointer_bit_trylock (volatile void *address, | |
9392 | gint lock_bit); | |
9393 | void g_pointer_bit_unlock (volatile void *address, | |
9394 | gint lock_bit); | |
9395 | # 70 "/usr/include/glib-2.0/glib/gbitlock.h" | |
9396 | ||
9397 | # 39 "/usr/include/glib-2.0/glib.h" 2 | |
9398 | # 1 "/usr/include/glib-2.0/glib/gbookmarkfile.h" 1 | |
9399 | # 27 "/usr/include/glib-2.0/glib/gbookmarkfile.h" | |
9400 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
9401 | # 28 "/usr/include/glib-2.0/glib/gbookmarkfile.h" 2 | |
9402 | ||
9403 | ||
9404 | ||
9405 | # 57 "/usr/include/glib-2.0/glib/gbookmarkfile.h" | |
9406 | typedef enum | |
9407 | { | |
9408 | G_BOOKMARK_FILE_ERROR_INVALID_URI, | |
9409 | G_BOOKMARK_FILE_ERROR_INVALID_VALUE, | |
9410 | G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED, | |
9411 | G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND, | |
9412 | G_BOOKMARK_FILE_ERROR_READ, | |
9413 | G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING, | |
9414 | G_BOOKMARK_FILE_ERROR_WRITE, | |
9415 | G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND | |
9416 | } GBookmarkFileError; | |
9417 | ||
9418 | GQuark g_bookmark_file_error_quark (void); | |
9419 | ||
9420 | ||
9421 | ||
9422 | ||
9423 | ||
9424 | ||
9425 | ||
9426 | typedef struct _GBookmarkFile GBookmarkFile; | |
9427 | ||
9428 | GBookmarkFile *g_bookmark_file_new (void); | |
9429 | void g_bookmark_file_free (GBookmarkFile *bookmark); | |
9430 | ||
9431 | gboolean g_bookmark_file_load_from_file (GBookmarkFile *bookmark, | |
9432 | const gchar *filename, | |
9433 | GError **error); | |
9434 | gboolean g_bookmark_file_load_from_data (GBookmarkFile *bookmark, | |
9435 | const gchar *data, | |
9436 | gsize length, | |
9437 | GError **error); | |
9438 | gboolean g_bookmark_file_load_from_data_dirs (GBookmarkFile *bookmark, | |
9439 | const gchar *file, | |
9440 | gchar **full_path, | |
9441 | GError **error); | |
9442 | gchar * g_bookmark_file_to_data (GBookmarkFile *bookmark, | |
9443 | gsize *length, | |
9444 | GError **error) __attribute__((__malloc__)); | |
9445 | gboolean g_bookmark_file_to_file (GBookmarkFile *bookmark, | |
9446 | const gchar *filename, | |
9447 | GError **error); | |
9448 | ||
9449 | void g_bookmark_file_set_title (GBookmarkFile *bookmark, | |
9450 | const gchar *uri, | |
9451 | const gchar *title); | |
9452 | gchar * g_bookmark_file_get_title (GBookmarkFile *bookmark, | |
9453 | const gchar *uri, | |
9454 | GError **error) __attribute__((__malloc__)); | |
9455 | void g_bookmark_file_set_description (GBookmarkFile *bookmark, | |
9456 | const gchar *uri, | |
9457 | const gchar *description); | |
9458 | gchar * g_bookmark_file_get_description (GBookmarkFile *bookmark, | |
9459 | const gchar *uri, | |
9460 | GError **error) __attribute__((__malloc__)); | |
9461 | void g_bookmark_file_set_mime_type (GBookmarkFile *bookmark, | |
9462 | const gchar *uri, | |
9463 | const gchar *mime_type); | |
9464 | gchar * g_bookmark_file_get_mime_type (GBookmarkFile *bookmark, | |
9465 | const gchar *uri, | |
9466 | GError **error) __attribute__((__malloc__)); | |
9467 | void g_bookmark_file_set_groups (GBookmarkFile *bookmark, | |
9468 | const gchar *uri, | |
9469 | const gchar **groups, | |
9470 | gsize length); | |
9471 | void g_bookmark_file_add_group (GBookmarkFile *bookmark, | |
9472 | const gchar *uri, | |
9473 | const gchar *group); | |
9474 | gboolean g_bookmark_file_has_group (GBookmarkFile *bookmark, | |
9475 | const gchar *uri, | |
9476 | const gchar *group, | |
9477 | GError **error); | |
9478 | gchar ** g_bookmark_file_get_groups (GBookmarkFile *bookmark, | |
9479 | const gchar *uri, | |
9480 | gsize *length, | |
9481 | GError **error) __attribute__((__malloc__)); | |
9482 | void g_bookmark_file_add_application (GBookmarkFile *bookmark, | |
9483 | const gchar *uri, | |
9484 | const gchar *name, | |
9485 | const gchar *exec); | |
9486 | gboolean g_bookmark_file_has_application (GBookmarkFile *bookmark, | |
9487 | const gchar *uri, | |
9488 | const gchar *name, | |
9489 | GError **error); | |
9490 | gchar ** g_bookmark_file_get_applications (GBookmarkFile *bookmark, | |
9491 | const gchar *uri, | |
9492 | gsize *length, | |
9493 | GError **error) __attribute__((__malloc__)); | |
9494 | gboolean g_bookmark_file_set_app_info (GBookmarkFile *bookmark, | |
9495 | const gchar *uri, | |
9496 | const gchar *name, | |
9497 | const gchar *exec, | |
9498 | gint count, | |
9499 | time_t stamp, | |
9500 | GError **error); | |
9501 | gboolean g_bookmark_file_get_app_info (GBookmarkFile *bookmark, | |
9502 | const gchar *uri, | |
9503 | const gchar *name, | |
9504 | gchar **exec, | |
9505 | guint *count, | |
9506 | time_t *stamp, | |
9507 | GError **error); | |
9508 | void g_bookmark_file_set_is_private (GBookmarkFile *bookmark, | |
9509 | const gchar *uri, | |
9510 | gboolean is_private); | |
9511 | gboolean g_bookmark_file_get_is_private (GBookmarkFile *bookmark, | |
9512 | const gchar *uri, | |
9513 | GError **error); | |
9514 | void g_bookmark_file_set_icon (GBookmarkFile *bookmark, | |
9515 | const gchar *uri, | |
9516 | const gchar *href, | |
9517 | const gchar *mime_type); | |
9518 | gboolean g_bookmark_file_get_icon (GBookmarkFile *bookmark, | |
9519 | const gchar *uri, | |
9520 | gchar **href, | |
9521 | gchar **mime_type, | |
9522 | GError **error); | |
9523 | void g_bookmark_file_set_added (GBookmarkFile *bookmark, | |
9524 | const gchar *uri, | |
9525 | time_t added); | |
9526 | time_t g_bookmark_file_get_added (GBookmarkFile *bookmark, | |
9527 | const gchar *uri, | |
9528 | GError **error); | |
9529 | void g_bookmark_file_set_modified (GBookmarkFile *bookmark, | |
9530 | const gchar *uri, | |
9531 | time_t modified); | |
9532 | time_t g_bookmark_file_get_modified (GBookmarkFile *bookmark, | |
9533 | const gchar *uri, | |
9534 | GError **error); | |
9535 | void g_bookmark_file_set_visited (GBookmarkFile *bookmark, | |
9536 | const gchar *uri, | |
9537 | time_t visited); | |
9538 | time_t g_bookmark_file_get_visited (GBookmarkFile *bookmark, | |
9539 | const gchar *uri, | |
9540 | GError **error); | |
9541 | gboolean g_bookmark_file_has_item (GBookmarkFile *bookmark, | |
9542 | const gchar *uri); | |
9543 | gint g_bookmark_file_get_size (GBookmarkFile *bookmark); | |
9544 | gchar ** g_bookmark_file_get_uris (GBookmarkFile *bookmark, | |
9545 | gsize *length) __attribute__((__malloc__)); | |
9546 | gboolean g_bookmark_file_remove_group (GBookmarkFile *bookmark, | |
9547 | const gchar *uri, | |
9548 | const gchar *group, | |
9549 | GError **error); | |
9550 | gboolean g_bookmark_file_remove_application (GBookmarkFile *bookmark, | |
9551 | const gchar *uri, | |
9552 | const gchar *name, | |
9553 | GError **error); | |
9554 | gboolean g_bookmark_file_remove_item (GBookmarkFile *bookmark, | |
9555 | const gchar *uri, | |
9556 | GError **error); | |
9557 | gboolean g_bookmark_file_move_item (GBookmarkFile *bookmark, | |
9558 | const gchar *old_uri, | |
9559 | const gchar *new_uri, | |
9560 | GError **error); | |
9561 | ||
9562 | ||
9563 | # 40 "/usr/include/glib-2.0/glib.h" 2 | |
9564 | # 1 "/usr/include/glib-2.0/glib/gbytes.h" 1 | |
9565 | # 31 "/usr/include/glib-2.0/glib/gbytes.h" | |
9566 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
9567 | # 32 "/usr/include/glib-2.0/glib/gbytes.h" 2 | |
9568 | # 1 "/usr/include/glib-2.0/glib/garray.h" 1 | |
9569 | # 33 "/usr/include/glib-2.0/glib/gbytes.h" 2 | |
9570 | ||
9571 | ||
9572 | ||
9573 | GBytes * g_bytes_new (gconstpointer data, | |
9574 | gsize size); | |
9575 | ||
9576 | GBytes * g_bytes_new_take (gpointer data, | |
9577 | gsize size); | |
9578 | ||
9579 | GBytes * g_bytes_new_static (gconstpointer data, | |
9580 | gsize size); | |
9581 | ||
9582 | GBytes * g_bytes_new_with_free_func (gconstpointer data, | |
9583 | gsize size, | |
9584 | GDestroyNotify free_func, | |
9585 | gpointer user_data); | |
9586 | ||
9587 | GBytes * g_bytes_new_from_bytes (GBytes *bytes, | |
9588 | gsize offset, | |
9589 | gsize length); | |
9590 | ||
9591 | gconstpointer g_bytes_get_data (GBytes *bytes, | |
9592 | gsize *size); | |
9593 | ||
9594 | gsize g_bytes_get_size (GBytes *bytes); | |
9595 | ||
9596 | GBytes * g_bytes_ref (GBytes *bytes); | |
9597 | ||
9598 | void g_bytes_unref (GBytes *bytes); | |
9599 | ||
9600 | gpointer g_bytes_unref_to_data (GBytes *bytes, | |
9601 | gsize *size); | |
9602 | ||
9603 | GByteArray * g_bytes_unref_to_array (GBytes *bytes); | |
9604 | ||
9605 | guint g_bytes_hash (gconstpointer bytes); | |
9606 | ||
9607 | gboolean g_bytes_equal (gconstpointer bytes1, | |
9608 | gconstpointer bytes2); | |
9609 | ||
9610 | gint g_bytes_compare (gconstpointer bytes1, | |
9611 | gconstpointer bytes2); | |
9612 | ||
9613 | ||
9614 | # 41 "/usr/include/glib-2.0/glib.h" 2 | |
9615 | # 1 "/usr/include/glib-2.0/glib/gcharset.h" 1 | |
9616 | # 28 "/usr/include/glib-2.0/glib/gcharset.h" | |
9617 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
9618 | # 29 "/usr/include/glib-2.0/glib/gcharset.h" 2 | |
9619 | ||
9620 | ||
9621 | ||
9622 | gboolean g_get_charset (const char **charset); | |
9623 | gchar * g_get_codeset (void); | |
9624 | ||
9625 | const gchar * const * g_get_language_names (void); | |
9626 | gchar ** g_get_locale_variants (const gchar *locale); | |
9627 | ||
9628 | ||
9629 | # 42 "/usr/include/glib-2.0/glib.h" 2 | |
9630 | # 1 "/usr/include/glib-2.0/glib/gchecksum.h" 1 | |
9631 | # 28 "/usr/include/glib-2.0/glib/gchecksum.h" | |
9632 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
9633 | # 29 "/usr/include/glib-2.0/glib/gchecksum.h" 2 | |
9634 | ||
9635 | ||
9636 | # 46 "/usr/include/glib-2.0/glib/gchecksum.h" | |
9637 | typedef enum { | |
9638 | G_CHECKSUM_MD5, | |
9639 | G_CHECKSUM_SHA1, | |
9640 | G_CHECKSUM_SHA256 | |
9641 | } GChecksumType; | |
9642 | # 61 "/usr/include/glib-2.0/glib/gchecksum.h" | |
9643 | typedef struct _GChecksum GChecksum; | |
9644 | ||
9645 | gssize g_checksum_type_get_length (GChecksumType checksum_type); | |
9646 | ||
9647 | GChecksum * g_checksum_new (GChecksumType checksum_type); | |
9648 | void g_checksum_reset (GChecksum *checksum); | |
9649 | GChecksum * g_checksum_copy (const GChecksum *checksum); | |
9650 | void g_checksum_free (GChecksum *checksum); | |
9651 | void g_checksum_update (GChecksum *checksum, | |
9652 | const guchar *data, | |
9653 | gssize length); | |
9654 | const gchar * g_checksum_get_string (GChecksum *checksum); | |
9655 | void g_checksum_get_digest (GChecksum *checksum, | |
9656 | guint8 *buffer, | |
9657 | gsize *digest_len); | |
9658 | ||
9659 | gchar *g_compute_checksum_for_data (GChecksumType checksum_type, | |
9660 | const guchar *data, | |
9661 | gsize length); | |
9662 | gchar *g_compute_checksum_for_string (GChecksumType checksum_type, | |
9663 | const gchar *str, | |
9664 | gssize length); | |
9665 | ||
9666 | ||
9667 | # 43 "/usr/include/glib-2.0/glib.h" 2 | |
9668 | # 1 "/usr/include/glib-2.0/glib/gconvert.h" 1 | |
9669 | # 34 "/usr/include/glib-2.0/glib/gconvert.h" | |
9670 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
9671 | # 35 "/usr/include/glib-2.0/glib/gconvert.h" 2 | |
9672 | ||
9673 | ||
9674 | # 50 "/usr/include/glib-2.0/glib/gconvert.h" | |
9675 | typedef enum | |
9676 | { | |
9677 | G_CONVERT_ERROR_NO_CONVERSION, | |
9678 | G_CONVERT_ERROR_ILLEGAL_SEQUENCE, | |
9679 | G_CONVERT_ERROR_FAILED, | |
9680 | G_CONVERT_ERROR_PARTIAL_INPUT, | |
9681 | G_CONVERT_ERROR_BAD_URI, | |
9682 | G_CONVERT_ERROR_NOT_ABSOLUTE_PATH | |
9683 | } GConvertError; | |
9684 | # 68 "/usr/include/glib-2.0/glib/gconvert.h" | |
9685 | GQuark g_convert_error_quark (void); | |
9686 | # 77 "/usr/include/glib-2.0/glib/gconvert.h" | |
9687 | typedef struct _GIConv *GIConv; | |
9688 | ||
9689 | GIConv g_iconv_open (const gchar *to_codeset, | |
9690 | const gchar *from_codeset); | |
9691 | gsize g_iconv (GIConv converter, | |
9692 | gchar **inbuf, | |
9693 | gsize *inbytes_left, | |
9694 | gchar **outbuf, | |
9695 | gsize *outbytes_left); | |
9696 | gint g_iconv_close (GIConv converter); | |
9697 | ||
9698 | ||
9699 | gchar* g_convert (const gchar *str, | |
9700 | gssize len, | |
9701 | const gchar *to_codeset, | |
9702 | const gchar *from_codeset, | |
9703 | gsize *bytes_read, | |
9704 | gsize *bytes_written, | |
9705 | GError **error) __attribute__((__malloc__)); | |
9706 | gchar* g_convert_with_iconv (const gchar *str, | |
9707 | gssize len, | |
9708 | GIConv converter, | |
9709 | gsize *bytes_read, | |
9710 | gsize *bytes_written, | |
9711 | GError **error) __attribute__((__malloc__)); | |
9712 | gchar* g_convert_with_fallback (const gchar *str, | |
9713 | gssize len, | |
9714 | const gchar *to_codeset, | |
9715 | const gchar *from_codeset, | |
9716 | const gchar *fallback, | |
9717 | gsize *bytes_read, | |
9718 | gsize *bytes_written, | |
9719 | GError **error) __attribute__((__malloc__)); | |
9720 | ||
9721 | ||
9722 | ||
9723 | ||
9724 | gchar* g_locale_to_utf8 (const gchar *opsysstring, | |
9725 | gssize len, | |
9726 | gsize *bytes_read, | |
9727 | gsize *bytes_written, | |
9728 | GError **error) __attribute__((__malloc__)); | |
9729 | gchar* g_locale_from_utf8 (const gchar *utf8string, | |
9730 | gssize len, | |
9731 | gsize *bytes_read, | |
9732 | gsize *bytes_written, | |
9733 | GError **error) __attribute__((__malloc__)); | |
9734 | # 137 "/usr/include/glib-2.0/glib/gconvert.h" | |
9735 | gchar* g_filename_to_utf8 (const gchar *opsysstring, | |
9736 | gssize len, | |
9737 | gsize *bytes_read, | |
9738 | gsize *bytes_written, | |
9739 | GError **error) __attribute__((__malloc__)); | |
9740 | gchar* g_filename_from_utf8 (const gchar *utf8string, | |
9741 | gssize len, | |
9742 | gsize *bytes_read, | |
9743 | gsize *bytes_written, | |
9744 | GError **error) __attribute__((__malloc__)); | |
9745 | ||
9746 | gchar *g_filename_from_uri (const gchar *uri, | |
9747 | gchar **hostname, | |
9748 | GError **error) __attribute__((__malloc__)); | |
9749 | ||
9750 | gchar *g_filename_to_uri (const gchar *filename, | |
9751 | const gchar *hostname, | |
9752 | GError **error) __attribute__((__malloc__)); | |
9753 | gchar *g_filename_display_name (const gchar *filename) __attribute__((__malloc__)); | |
9754 | gboolean g_get_filename_charsets (const gchar ***charsets); | |
9755 | ||
9756 | gchar *g_filename_display_basename (const gchar *filename) __attribute__((__malloc__)); | |
9757 | ||
9758 | gchar **g_uri_list_extract_uris (const gchar *uri_list) __attribute__((__malloc__)); | |
9759 | ||
9760 | ||
9761 | # 44 "/usr/include/glib-2.0/glib.h" 2 | |
9762 | # 1 "/usr/include/glib-2.0/glib/gdataset.h" 1 | |
9763 | # 34 "/usr/include/glib-2.0/glib/gdataset.h" | |
9764 | # 1 "/usr/include/glib-2.0/glib/gquark.h" 1 | |
9765 | # 35 "/usr/include/glib-2.0/glib/gdataset.h" 2 | |
9766 | ||
9767 | ||
9768 | ||
9769 | typedef struct _GData GData; | |
9770 | ||
9771 | typedef void (*GDataForeachFunc) (GQuark key_id, | |
9772 | gpointer data, | |
9773 | gpointer user_data); | |
9774 | ||
9775 | ||
9776 | ||
9777 | void g_datalist_init (GData **datalist); | |
9778 | void g_datalist_clear (GData **datalist); | |
9779 | gpointer g_datalist_id_get_data (GData **datalist, | |
9780 | GQuark key_id); | |
9781 | void g_datalist_id_set_data_full (GData **datalist, | |
9782 | GQuark key_id, | |
9783 | gpointer data, | |
9784 | GDestroyNotify destroy_func); | |
9785 | gpointer g_datalist_id_remove_no_notify (GData **datalist, | |
9786 | GQuark key_id); | |
9787 | void g_datalist_foreach (GData **datalist, | |
9788 | GDataForeachFunc func, | |
9789 | gpointer user_data); | |
9790 | # 69 "/usr/include/glib-2.0/glib/gdataset.h" | |
9791 | void g_datalist_set_flags (GData **datalist, | |
9792 | guint flags); | |
9793 | void g_datalist_unset_flags (GData **datalist, | |
9794 | guint flags); | |
9795 | guint g_datalist_get_flags (GData **datalist); | |
9796 | # 91 "/usr/include/glib-2.0/glib/gdataset.h" | |
9797 | void g_dataset_destroy (gconstpointer dataset_location); | |
9798 | gpointer g_dataset_id_get_data (gconstpointer dataset_location, | |
9799 | GQuark key_id); | |
9800 | gpointer g_datalist_get_data (GData **datalist, | |
9801 | const gchar *key); | |
9802 | void g_dataset_id_set_data_full (gconstpointer dataset_location, | |
9803 | GQuark key_id, | |
9804 | gpointer data, | |
9805 | GDestroyNotify destroy_func); | |
9806 | gpointer g_dataset_id_remove_no_notify (gconstpointer dataset_location, | |
9807 | GQuark key_id); | |
9808 | void g_dataset_foreach (gconstpointer dataset_location, | |
9809 | GDataForeachFunc func, | |
9810 | gpointer user_data); | |
9811 | # 120 "/usr/include/glib-2.0/glib/gdataset.h" | |
9812 | ||
9813 | # 45 "/usr/include/glib-2.0/glib.h" 2 | |
9814 | # 1 "/usr/include/glib-2.0/glib/gdate.h" 1 | |
9815 | # 36 "/usr/include/glib-2.0/glib/gdate.h" | |
9816 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
9817 | # 37 "/usr/include/glib-2.0/glib/gdate.h" 2 | |
9818 | # 1 "/usr/include/glib-2.0/glib/gquark.h" 1 | |
9819 | # 38 "/usr/include/glib-2.0/glib/gdate.h" 2 | |
9820 | ||
9821 | ||
9822 | # 50 "/usr/include/glib-2.0/glib/gdate.h" | |
9823 | typedef gint32 GTime; | |
9824 | typedef guint16 GDateYear; | |
9825 | typedef guint8 GDateDay; | |
9826 | typedef struct _GDate GDate; | |
9827 | ||
9828 | ||
9829 | typedef enum | |
9830 | { | |
9831 | G_DATE_DAY = 0, | |
9832 | G_DATE_MONTH = 1, | |
9833 | G_DATE_YEAR = 2 | |
9834 | } GDateDMY; | |
9835 | ||
9836 | ||
9837 | typedef enum | |
9838 | { | |
9839 | G_DATE_BAD_WEEKDAY = 0, | |
9840 | G_DATE_MONDAY = 1, | |
9841 | G_DATE_TUESDAY = 2, | |
9842 | G_DATE_WEDNESDAY = 3, | |
9843 | G_DATE_THURSDAY = 4, | |
9844 | G_DATE_FRIDAY = 5, | |
9845 | G_DATE_SATURDAY = 6, | |
9846 | G_DATE_SUNDAY = 7 | |
9847 | } GDateWeekday; | |
9848 | typedef enum | |
9849 | { | |
9850 | G_DATE_BAD_MONTH = 0, | |
9851 | G_DATE_JANUARY = 1, | |
9852 | G_DATE_FEBRUARY = 2, | |
9853 | G_DATE_MARCH = 3, | |
9854 | G_DATE_APRIL = 4, | |
9855 | G_DATE_MAY = 5, | |
9856 | G_DATE_JUNE = 6, | |
9857 | G_DATE_JULY = 7, | |
9858 | G_DATE_AUGUST = 8, | |
9859 | G_DATE_SEPTEMBER = 9, | |
9860 | G_DATE_OCTOBER = 10, | |
9861 | G_DATE_NOVEMBER = 11, | |
9862 | G_DATE_DECEMBER = 12 | |
9863 | } GDateMonth; | |
9864 | # 101 "/usr/include/glib-2.0/glib/gdate.h" | |
9865 | struct _GDate | |
9866 | { | |
9867 | guint julian_days : 32; | |
9868 | ||
9869 | ||
9870 | ||
9871 | ||
9872 | ||
9873 | guint julian : 1; | |
9874 | guint dmy : 1; | |
9875 | ||
9876 | ||
9877 | guint day : 6; | |
9878 | guint month : 4; | |
9879 | guint year : 16; | |
9880 | }; | |
9881 | ||
9882 | ||
9883 | ||
9884 | ||
9885 | ||
9886 | GDate* g_date_new (void); | |
9887 | GDate* g_date_new_dmy (GDateDay day, | |
9888 | GDateMonth month, | |
9889 | GDateYear year); | |
9890 | GDate* g_date_new_julian (guint32 julian_day); | |
9891 | void g_date_free (GDate *date); | |
9892 | ||
9893 | ||
9894 | ||
9895 | ||
9896 | ||
9897 | ||
9898 | gboolean g_date_valid (const GDate *date); | |
9899 | gboolean g_date_valid_day (GDateDay day) __attribute__((__const__)); | |
9900 | gboolean g_date_valid_month (GDateMonth month) __attribute__((__const__)); | |
9901 | gboolean g_date_valid_year (GDateYear year) __attribute__((__const__)); | |
9902 | gboolean g_date_valid_weekday (GDateWeekday weekday) __attribute__((__const__)); | |
9903 | gboolean g_date_valid_julian (guint32 julian_date) __attribute__((__const__)); | |
9904 | gboolean g_date_valid_dmy (GDateDay day, | |
9905 | GDateMonth month, | |
9906 | GDateYear year) __attribute__((__const__)); | |
9907 | ||
9908 | GDateWeekday g_date_get_weekday (const GDate *date); | |
9909 | GDateMonth g_date_get_month (const GDate *date); | |
9910 | GDateYear g_date_get_year (const GDate *date); | |
9911 | GDateDay g_date_get_day (const GDate *date); | |
9912 | guint32 g_date_get_julian (const GDate *date); | |
9913 | guint g_date_get_day_of_year (const GDate *date); | |
9914 | ||
9915 | ||
9916 | ||
9917 | ||
9918 | ||
9919 | ||
9920 | guint g_date_get_monday_week_of_year (const GDate *date); | |
9921 | guint g_date_get_sunday_week_of_year (const GDate *date); | |
9922 | guint g_date_get_iso8601_week_of_year (const GDate *date); | |
9923 | ||
9924 | ||
9925 | ||
9926 | ||
9927 | ||
9928 | void g_date_clear (GDate *date, | |
9929 | guint n_dates); | |
9930 | ||
9931 | ||
9932 | ||
9933 | ||
9934 | ||
9935 | void g_date_set_parse (GDate *date, | |
9936 | const gchar *str); | |
9937 | void g_date_set_time_t (GDate *date, | |
9938 | time_t timet); | |
9939 | void g_date_set_time_val (GDate *date, | |
9940 | GTimeVal *timeval); | |
9941 | ||
9942 | __attribute__((__deprecated__("Use '" "g_date_set_time_t" "' instead"))) | |
9943 | void g_date_set_time (GDate *date, | |
9944 | GTime time_); | |
9945 | ||
9946 | void g_date_set_month (GDate *date, | |
9947 | GDateMonth month); | |
9948 | void g_date_set_day (GDate *date, | |
9949 | GDateDay day); | |
9950 | void g_date_set_year (GDate *date, | |
9951 | GDateYear year); | |
9952 | void g_date_set_dmy (GDate *date, | |
9953 | GDateDay day, | |
9954 | GDateMonth month, | |
9955 | GDateYear y); | |
9956 | void g_date_set_julian (GDate *date, | |
9957 | guint32 julian_date); | |
9958 | gboolean g_date_is_first_of_month (const GDate *date); | |
9959 | gboolean g_date_is_last_of_month (const GDate *date); | |
9960 | ||
9961 | ||
9962 | void g_date_add_days (GDate *date, | |
9963 | guint n_days); | |
9964 | void g_date_subtract_days (GDate *date, | |
9965 | guint n_days); | |
9966 | ||
9967 | ||
9968 | void g_date_add_months (GDate *date, | |
9969 | guint n_months); | |
9970 | void g_date_subtract_months (GDate *date, | |
9971 | guint n_months); | |
9972 | ||
9973 | ||
9974 | void g_date_add_years (GDate *date, | |
9975 | guint n_years); | |
9976 | void g_date_subtract_years (GDate *date, | |
9977 | guint n_years); | |
9978 | gboolean g_date_is_leap_year (GDateYear year) __attribute__((__const__)); | |
9979 | guint8 g_date_get_days_in_month (GDateMonth month, | |
9980 | GDateYear year) __attribute__((__const__)); | |
9981 | guint8 g_date_get_monday_weeks_in_year (GDateYear year) __attribute__((__const__)); | |
9982 | guint8 g_date_get_sunday_weeks_in_year (GDateYear year) __attribute__((__const__)); | |
9983 | ||
9984 | ||
9985 | ||
9986 | gint g_date_days_between (const GDate *date1, | |
9987 | const GDate *date2); | |
9988 | ||
9989 | ||
9990 | gint g_date_compare (const GDate *lhs, | |
9991 | const GDate *rhs); | |
9992 | void g_date_to_struct_tm (const GDate *date, | |
9993 | struct tm *tm); | |
9994 | ||
9995 | void g_date_clamp (GDate *date, | |
9996 | const GDate *min_date, | |
9997 | const GDate *max_date); | |
9998 | ||
9999 | ||
10000 | void g_date_order (GDate *date1, GDate *date2); | |
10001 | ||
10002 | ||
10003 | ||
10004 | ||
10005 | gsize g_date_strftime (gchar *s, | |
10006 | gsize slen, | |
10007 | const gchar *format, | |
10008 | const GDate *date); | |
10009 | # 262 "/usr/include/glib-2.0/glib/gdate.h" | |
10010 | ||
10011 | # 46 "/usr/include/glib-2.0/glib.h" 2 | |
10012 | # 1 "/usr/include/glib-2.0/glib/gdatetime.h" 1 | |
10013 | # 33 "/usr/include/glib-2.0/glib/gdatetime.h" | |
10014 | # 1 "/usr/include/glib-2.0/glib/gtimezone.h" 1 | |
10015 | # 29 "/usr/include/glib-2.0/glib/gtimezone.h" | |
10016 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
10017 | # 30 "/usr/include/glib-2.0/glib/gtimezone.h" 2 | |
10018 | ||
10019 | ||
10020 | ||
10021 | typedef struct _GTimeZone GTimeZone; | |
10022 | # 50 "/usr/include/glib-2.0/glib/gtimezone.h" | |
10023 | typedef enum | |
10024 | { | |
10025 | G_TIME_TYPE_STANDARD, | |
10026 | G_TIME_TYPE_DAYLIGHT, | |
10027 | G_TIME_TYPE_UNIVERSAL | |
10028 | } GTimeType; | |
10029 | ||
10030 | GTimeZone * g_time_zone_new (const gchar *identifier); | |
10031 | GTimeZone * g_time_zone_new_utc (void); | |
10032 | GTimeZone * g_time_zone_new_local (void); | |
10033 | ||
10034 | GTimeZone * g_time_zone_ref (GTimeZone *tz); | |
10035 | void g_time_zone_unref (GTimeZone *tz); | |
10036 | ||
10037 | gint g_time_zone_find_interval (GTimeZone *tz, | |
10038 | GTimeType type, | |
10039 | gint64 time_); | |
10040 | ||
10041 | gint g_time_zone_adjust_time (GTimeZone *tz, | |
10042 | GTimeType type, | |
10043 | gint64 *time_); | |
10044 | ||
10045 | const gchar * g_time_zone_get_abbreviation (GTimeZone *tz, | |
10046 | gint interval); | |
10047 | gint32 g_time_zone_get_offset (GTimeZone *tz, | |
10048 | gint interval); | |
10049 | gboolean g_time_zone_is_dst (GTimeZone *tz, | |
10050 | gint interval); | |
10051 | ||
10052 | ||
10053 | # 34 "/usr/include/glib-2.0/glib/gdatetime.h" 2 | |
10054 | ||
10055 | ||
10056 | # 89 "/usr/include/glib-2.0/glib/gdatetime.h" | |
10057 | typedef gint64 GTimeSpan; | |
10058 | # 99 "/usr/include/glib-2.0/glib/gdatetime.h" | |
10059 | typedef struct _GDateTime GDateTime; | |
10060 | ||
10061 | void g_date_time_unref (GDateTime *datetime); | |
10062 | GDateTime * g_date_time_ref (GDateTime *datetime); | |
10063 | ||
10064 | GDateTime * g_date_time_new_now (GTimeZone *tz); | |
10065 | GDateTime * g_date_time_new_now_local (void); | |
10066 | GDateTime * g_date_time_new_now_utc (void); | |
10067 | ||
10068 | GDateTime * g_date_time_new_from_unix_local (gint64 t); | |
10069 | GDateTime * g_date_time_new_from_unix_utc (gint64 t); | |
10070 | ||
10071 | GDateTime * g_date_time_new_from_timeval_local (const GTimeVal *tv); | |
10072 | GDateTime * g_date_time_new_from_timeval_utc (const GTimeVal *tv); | |
10073 | ||
10074 | GDateTime * g_date_time_new (GTimeZone *tz, | |
10075 | gint year, | |
10076 | gint month, | |
10077 | gint day, | |
10078 | gint hour, | |
10079 | gint minute, | |
10080 | gdouble seconds); | |
10081 | GDateTime * g_date_time_new_local (gint year, | |
10082 | gint month, | |
10083 | gint day, | |
10084 | gint hour, | |
10085 | gint minute, | |
10086 | gdouble seconds); | |
10087 | GDateTime * g_date_time_new_utc (gint year, | |
10088 | gint month, | |
10089 | gint day, | |
10090 | gint hour, | |
10091 | gint minute, | |
10092 | gdouble seconds); | |
10093 | ||
10094 | __attribute__((warn_unused_result)) | |
10095 | GDateTime * g_date_time_add (GDateTime *datetime, | |
10096 | GTimeSpan timespan); | |
10097 | ||
10098 | __attribute__((warn_unused_result)) | |
10099 | GDateTime * g_date_time_add_years (GDateTime *datetime, | |
10100 | gint years); | |
10101 | __attribute__((warn_unused_result)) | |
10102 | GDateTime * g_date_time_add_months (GDateTime *datetime, | |
10103 | gint months); | |
10104 | __attribute__((warn_unused_result)) | |
10105 | GDateTime * g_date_time_add_weeks (GDateTime *datetime, | |
10106 | gint weeks); | |
10107 | __attribute__((warn_unused_result)) | |
10108 | GDateTime * g_date_time_add_days (GDateTime *datetime, | |
10109 | gint days); | |
10110 | ||
10111 | __attribute__((warn_unused_result)) | |
10112 | GDateTime * g_date_time_add_hours (GDateTime *datetime, | |
10113 | gint hours); | |
10114 | __attribute__((warn_unused_result)) | |
10115 | GDateTime * g_date_time_add_minutes (GDateTime *datetime, | |
10116 | gint minutes); | |
10117 | __attribute__((warn_unused_result)) | |
10118 | GDateTime * g_date_time_add_seconds (GDateTime *datetime, | |
10119 | gdouble seconds); | |
10120 | ||
10121 | __attribute__((warn_unused_result)) | |
10122 | GDateTime * g_date_time_add_full (GDateTime *datetime, | |
10123 | gint years, | |
10124 | gint months, | |
10125 | gint days, | |
10126 | gint hours, | |
10127 | gint minutes, | |
10128 | gdouble seconds); | |
10129 | ||
10130 | gint g_date_time_compare (gconstpointer dt1, | |
10131 | gconstpointer dt2); | |
10132 | GTimeSpan g_date_time_difference (GDateTime *end, | |
10133 | GDateTime *begin); | |
10134 | guint g_date_time_hash (gconstpointer datetime); | |
10135 | gboolean g_date_time_equal (gconstpointer dt1, | |
10136 | gconstpointer dt2); | |
10137 | ||
10138 | void g_date_time_get_ymd (GDateTime *datetime, | |
10139 | gint *year, | |
10140 | gint *month, | |
10141 | gint *day); | |
10142 | ||
10143 | gint g_date_time_get_year (GDateTime *datetime); | |
10144 | gint g_date_time_get_month (GDateTime *datetime); | |
10145 | gint g_date_time_get_day_of_month (GDateTime *datetime); | |
10146 | ||
10147 | gint g_date_time_get_week_numbering_year (GDateTime *datetime); | |
10148 | gint g_date_time_get_week_of_year (GDateTime *datetime); | |
10149 | gint g_date_time_get_day_of_week (GDateTime *datetime); | |
10150 | ||
10151 | gint g_date_time_get_day_of_year (GDateTime *datetime); | |
10152 | ||
10153 | gint g_date_time_get_hour (GDateTime *datetime); | |
10154 | gint g_date_time_get_minute (GDateTime *datetime); | |
10155 | gint g_date_time_get_second (GDateTime *datetime); | |
10156 | gint g_date_time_get_microsecond (GDateTime *datetime); | |
10157 | gdouble g_date_time_get_seconds (GDateTime *datetime); | |
10158 | ||
10159 | gint64 g_date_time_to_unix (GDateTime *datetime); | |
10160 | gboolean g_date_time_to_timeval (GDateTime *datetime, | |
10161 | GTimeVal *tv); | |
10162 | ||
10163 | GTimeSpan g_date_time_get_utc_offset (GDateTime *datetime); | |
10164 | const gchar * g_date_time_get_timezone_abbreviation (GDateTime *datetime); | |
10165 | gboolean g_date_time_is_daylight_savings (GDateTime *datetime); | |
10166 | ||
10167 | GDateTime * g_date_time_to_timezone (GDateTime *datetime, | |
10168 | GTimeZone *tz); | |
10169 | GDateTime * g_date_time_to_local (GDateTime *datetime); | |
10170 | GDateTime * g_date_time_to_utc (GDateTime *datetime); | |
10171 | ||
10172 | gchar * g_date_time_format (GDateTime *datetime, | |
10173 | const gchar *format) __attribute__((__malloc__)); | |
10174 | ||
10175 | ||
10176 | # 47 "/usr/include/glib-2.0/glib.h" 2 | |
10177 | # 1 "/usr/include/glib-2.0/glib/gdir.h" 1 | |
10178 | # 31 "/usr/include/glib-2.0/glib/gdir.h" | |
10179 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
10180 | # 32 "/usr/include/glib-2.0/glib/gdir.h" 2 | |
10181 | ||
10182 | ||
10183 | ||
10184 | typedef struct _GDir GDir; | |
10185 | # 45 "/usr/include/glib-2.0/glib/gdir.h" | |
10186 | GDir * g_dir_open (const gchar *path, | |
10187 | guint flags, | |
10188 | GError **error); | |
10189 | const gchar * g_dir_read_name (GDir *dir); | |
10190 | void g_dir_rewind (GDir *dir); | |
10191 | void g_dir_close (GDir *dir); | |
10192 | ||
10193 | ||
10194 | # 48 "/usr/include/glib-2.0/glib.h" 2 | |
10195 | # 1 "/usr/include/glib-2.0/glib/genviron.h" 1 | |
10196 | # 34 "/usr/include/glib-2.0/glib/genviron.h" | |
10197 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
10198 | # 35 "/usr/include/glib-2.0/glib/genviron.h" 2 | |
10199 | ||
10200 | ||
10201 | # 46 "/usr/include/glib-2.0/glib/genviron.h" | |
10202 | const gchar * g_getenv (const gchar *variable); | |
10203 | gboolean g_setenv (const gchar *variable, | |
10204 | const gchar *value, | |
10205 | gboolean overwrite); | |
10206 | void g_unsetenv (const gchar *variable); | |
10207 | gchar ** g_listenv (void); | |
10208 | ||
10209 | gchar ** g_get_environ (void); | |
10210 | const gchar * g_environ_getenv (gchar **envp, | |
10211 | const gchar *variable); | |
10212 | gchar ** g_environ_setenv (gchar **envp, | |
10213 | const gchar *variable, | |
10214 | const gchar *value, | |
10215 | gboolean overwrite) __attribute__((warn_unused_result)); | |
10216 | gchar ** g_environ_unsetenv (gchar **envp, | |
10217 | const gchar *variable) __attribute__((warn_unused_result)); | |
10218 | ||
10219 | ||
10220 | # 49 "/usr/include/glib-2.0/glib.h" 2 | |
10221 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
10222 | # 50 "/usr/include/glib-2.0/glib.h" 2 | |
10223 | # 1 "/usr/include/glib-2.0/glib/gfileutils.h" 1 | |
10224 | # 28 "/usr/include/glib-2.0/glib/gfileutils.h" | |
10225 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
10226 | # 29 "/usr/include/glib-2.0/glib/gfileutils.h" 2 | |
10227 | ||
10228 | ||
10229 | ||
10230 | ||
10231 | ||
10232 | typedef enum | |
10233 | { | |
10234 | G_FILE_ERROR_EXIST, | |
10235 | G_FILE_ERROR_ISDIR, | |
10236 | G_FILE_ERROR_ACCES, | |
10237 | G_FILE_ERROR_NAMETOOLONG, | |
10238 | G_FILE_ERROR_NOENT, | |
10239 | G_FILE_ERROR_NOTDIR, | |
10240 | G_FILE_ERROR_NXIO, | |
10241 | G_FILE_ERROR_NODEV, | |
10242 | G_FILE_ERROR_ROFS, | |
10243 | G_FILE_ERROR_TXTBSY, | |
10244 | G_FILE_ERROR_FAULT, | |
10245 | G_FILE_ERROR_LOOP, | |
10246 | G_FILE_ERROR_NOSPC, | |
10247 | G_FILE_ERROR_NOMEM, | |
10248 | G_FILE_ERROR_MFILE, | |
10249 | G_FILE_ERROR_NFILE, | |
10250 | G_FILE_ERROR_BADF, | |
10251 | G_FILE_ERROR_INVAL, | |
10252 | G_FILE_ERROR_PIPE, | |
10253 | G_FILE_ERROR_AGAIN, | |
10254 | G_FILE_ERROR_INTR, | |
10255 | G_FILE_ERROR_IO, | |
10256 | G_FILE_ERROR_PERM, | |
10257 | G_FILE_ERROR_NOSYS, | |
10258 | G_FILE_ERROR_FAILED | |
10259 | } GFileError; | |
10260 | ||
10261 | ||
10262 | ||
10263 | ||
10264 | ||
10265 | typedef enum | |
10266 | { | |
10267 | G_FILE_TEST_IS_REGULAR = 1 << 0, | |
10268 | G_FILE_TEST_IS_SYMLINK = 1 << 1, | |
10269 | G_FILE_TEST_IS_DIR = 1 << 2, | |
10270 | G_FILE_TEST_IS_EXECUTABLE = 1 << 3, | |
10271 | G_FILE_TEST_EXISTS = 1 << 4 | |
10272 | } GFileTest; | |
10273 | ||
10274 | GQuark g_file_error_quark (void); | |
10275 | ||
10276 | GFileError g_file_error_from_errno (gint err_no); | |
10277 | # 89 "/usr/include/glib-2.0/glib/gfileutils.h" | |
10278 | gboolean g_file_test (const gchar *filename, | |
10279 | GFileTest test); | |
10280 | gboolean g_file_get_contents (const gchar *filename, | |
10281 | gchar **contents, | |
10282 | gsize *length, | |
10283 | GError **error); | |
10284 | gboolean g_file_set_contents (const gchar *filename, | |
10285 | const gchar *contents, | |
10286 | gssize length, | |
10287 | GError **error); | |
10288 | gchar *g_file_read_link (const gchar *filename, | |
10289 | GError **error); | |
10290 | ||
10291 | ||
10292 | ||
10293 | gchar *g_mkdtemp (gchar *tmpl); | |
10294 | ||
10295 | gchar *g_mkdtemp_full (gchar *tmpl, | |
10296 | gint mode); | |
10297 | ||
10298 | ||
10299 | gint g_mkstemp (gchar *tmpl); | |
10300 | gint g_mkstemp_full (gchar *tmpl, | |
10301 | gint flags, | |
10302 | gint mode); | |
10303 | ||
10304 | ||
10305 | gint g_file_open_tmp (const gchar *tmpl, | |
10306 | gchar **name_used, | |
10307 | GError **error); | |
10308 | ||
10309 | gchar *g_dir_make_tmp (const gchar *tmpl, | |
10310 | GError **error); | |
10311 | ||
10312 | gchar *g_build_path (const gchar *separator, | |
10313 | const gchar *first_element, | |
10314 | ...) __attribute__((__malloc__)) __attribute__((__sentinel__)); | |
10315 | gchar *g_build_pathv (const gchar *separator, | |
10316 | gchar **args) __attribute__((__malloc__)); | |
10317 | ||
10318 | gchar *g_build_filename (const gchar *first_element, | |
10319 | ...) __attribute__((__malloc__)) __attribute__((__sentinel__)); | |
10320 | gchar *g_build_filenamev (gchar **args) __attribute__((__malloc__)); | |
10321 | ||
10322 | gint g_mkdir_with_parents (const gchar *pathname, | |
10323 | gint mode); | |
10324 | # 158 "/usr/include/glib-2.0/glib/gfileutils.h" | |
10325 | gboolean g_path_is_absolute (const gchar *file_name); | |
10326 | const gchar *g_path_skip_root (const gchar *file_name); | |
10327 | ||
10328 | __attribute__((__deprecated__("Use '" "g_path_get_basename" "' instead"))) | |
10329 | const gchar *g_basename (const gchar *file_name); | |
10330 | # 173 "/usr/include/glib-2.0/glib/gfileutils.h" | |
10331 | gchar *g_get_current_dir (void); | |
10332 | gchar *g_path_get_basename (const gchar *file_name) __attribute__((__malloc__)); | |
10333 | gchar *g_path_get_dirname (const gchar *file_name) __attribute__((__malloc__)); | |
10334 | ||
10335 | ||
10336 | # 51 "/usr/include/glib-2.0/glib.h" 2 | |
10337 | # 1 "/usr/include/glib-2.0/glib/ggettext.h" 1 | |
10338 | # 34 "/usr/include/glib-2.0/glib/ggettext.h" | |
10339 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
10340 | # 35 "/usr/include/glib-2.0/glib/ggettext.h" 2 | |
10341 | ||
10342 | ||
10343 | ||
10344 | const gchar *g_strip_context (const gchar *msgid, | |
10345 | const gchar *msgval) __attribute__((__format_arg__ (1))); | |
10346 | ||
10347 | const gchar *g_dgettext (const gchar *domain, | |
10348 | const gchar *msgid) __attribute__((__format_arg__ (2))); | |
10349 | const gchar *g_dcgettext (const gchar *domain, | |
10350 | const gchar *msgid, | |
10351 | gint category) __attribute__((__format_arg__ (2))); | |
10352 | const gchar *g_dngettext (const gchar *domain, | |
10353 | const gchar *msgid, | |
10354 | const gchar *msgid_plural, | |
10355 | gulong n) __attribute__((__format_arg__ (3))); | |
10356 | const gchar *g_dpgettext (const gchar *domain, | |
10357 | const gchar *msgctxtid, | |
10358 | gsize msgidoffset) __attribute__((__format_arg__ (2))); | |
10359 | const gchar *g_dpgettext2 (const gchar *domain, | |
10360 | const gchar *context, | |
10361 | const gchar *msgid) __attribute__((__format_arg__ (3))); | |
10362 | ||
10363 | ||
10364 | # 52 "/usr/include/glib-2.0/glib.h" 2 | |
10365 | # 1 "/usr/include/glib-2.0/glib/ghash.h" 1 | |
10366 | # 34 "/usr/include/glib-2.0/glib/ghash.h" | |
10367 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
10368 | # 35 "/usr/include/glib-2.0/glib/ghash.h" 2 | |
10369 | # 1 "/usr/include/glib-2.0/glib/glist.h" 1 | |
10370 | # 34 "/usr/include/glib-2.0/glib/glist.h" | |
10371 | # 1 "/usr/include/glib-2.0/glib/gmem.h" 1 | |
10372 | # 34 "/usr/include/glib-2.0/glib/gmem.h" | |
10373 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
10374 | # 35 "/usr/include/glib-2.0/glib/gmem.h" 2 | |
10375 | ||
10376 | ||
10377 | # 51 "/usr/include/glib-2.0/glib/gmem.h" | |
10378 | typedef struct _GMemVTable GMemVTable; | |
10379 | # 70 "/usr/include/glib-2.0/glib/gmem.h" | |
10380 | void g_free (gpointer mem); | |
10381 | ||
10382 | gpointer g_malloc (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); | |
10383 | gpointer g_malloc0 (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); | |
10384 | gpointer g_realloc (gpointer mem, | |
10385 | gsize n_bytes) __attribute__((warn_unused_result)); | |
10386 | gpointer g_try_malloc (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); | |
10387 | gpointer g_try_malloc0 (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); | |
10388 | gpointer g_try_realloc (gpointer mem, | |
10389 | gsize n_bytes) __attribute__((warn_unused_result)); | |
10390 | ||
10391 | gpointer g_malloc_n (gsize n_blocks, | |
10392 | gsize n_block_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1,2))); | |
10393 | gpointer g_malloc0_n (gsize n_blocks, | |
10394 | gsize n_block_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1,2))); | |
10395 | gpointer g_realloc_n (gpointer mem, | |
10396 | gsize n_blocks, | |
10397 | gsize n_block_bytes) __attribute__((warn_unused_result)); | |
10398 | gpointer g_try_malloc_n (gsize n_blocks, | |
10399 | gsize n_block_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1,2))); | |
10400 | gpointer g_try_malloc0_n (gsize n_blocks, | |
10401 | gsize n_block_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1,2))); | |
10402 | gpointer g_try_realloc_n (gpointer mem, | |
10403 | gsize n_blocks, | |
10404 | gsize n_block_bytes) __attribute__((warn_unused_result)); | |
10405 | # 240 "/usr/include/glib-2.0/glib/gmem.h" | |
10406 | struct _GMemVTable { | |
10407 | gpointer (*malloc) (gsize n_bytes); | |
10408 | gpointer (*realloc) (gpointer mem, | |
10409 | gsize n_bytes); | |
10410 | void (*free) (gpointer mem); | |
10411 | ||
10412 | gpointer (*calloc) (gsize n_blocks, | |
10413 | gsize n_block_bytes); | |
10414 | gpointer (*try_malloc) (gsize n_bytes); | |
10415 | gpointer (*try_realloc) (gpointer mem, | |
10416 | gsize n_bytes); | |
10417 | }; | |
10418 | void g_mem_set_vtable (GMemVTable *vtable); | |
10419 | gboolean g_mem_is_system_malloc (void); | |
10420 | ||
10421 | extern gboolean g_mem_gc_friendly; | |
10422 | ||
10423 | ||
10424 | ||
10425 | extern GMemVTable *glib_mem_profiler_table; | |
10426 | void g_mem_profile (void); | |
10427 | ||
10428 | ||
10429 | # 35 "/usr/include/glib-2.0/glib/glist.h" 2 | |
10430 | ||
10431 | ||
10432 | ||
10433 | typedef struct _GList GList; | |
10434 | ||
10435 | struct _GList | |
10436 | { | |
10437 | gpointer data; | |
10438 | GList *next; | |
10439 | GList *prev; | |
10440 | }; | |
10441 | ||
10442 | ||
10443 | ||
10444 | GList* g_list_alloc (void) __attribute__((warn_unused_result)); | |
10445 | void g_list_free (GList *list); | |
10446 | void g_list_free_1 (GList *list); | |
10447 | ||
10448 | void g_list_free_full (GList *list, | |
10449 | GDestroyNotify free_func); | |
10450 | GList* g_list_append (GList *list, | |
10451 | gpointer data) __attribute__((warn_unused_result)); | |
10452 | GList* g_list_prepend (GList *list, | |
10453 | gpointer data) __attribute__((warn_unused_result)); | |
10454 | GList* g_list_insert (GList *list, | |
10455 | gpointer data, | |
10456 | gint position) __attribute__((warn_unused_result)); | |
10457 | GList* g_list_insert_sorted (GList *list, | |
10458 | gpointer data, | |
10459 | GCompareFunc func) __attribute__((warn_unused_result)); | |
10460 | GList* g_list_insert_sorted_with_data (GList *list, | |
10461 | gpointer data, | |
10462 | GCompareDataFunc func, | |
10463 | gpointer user_data) __attribute__((warn_unused_result)); | |
10464 | GList* g_list_insert_before (GList *list, | |
10465 | GList *sibling, | |
10466 | gpointer data) __attribute__((warn_unused_result)); | |
10467 | GList* g_list_concat (GList *list1, | |
10468 | GList *list2) __attribute__((warn_unused_result)); | |
10469 | GList* g_list_remove (GList *list, | |
10470 | gconstpointer data) __attribute__((warn_unused_result)); | |
10471 | GList* g_list_remove_all (GList *list, | |
10472 | gconstpointer data) __attribute__((warn_unused_result)); | |
10473 | GList* g_list_remove_link (GList *list, | |
10474 | GList *llink) __attribute__((warn_unused_result)); | |
10475 | GList* g_list_delete_link (GList *list, | |
10476 | GList *link_) __attribute__((warn_unused_result)); | |
10477 | GList* g_list_reverse (GList *list) __attribute__((warn_unused_result)); | |
10478 | GList* g_list_copy (GList *list) __attribute__((warn_unused_result)); | |
10479 | GList* g_list_nth (GList *list, | |
10480 | guint n); | |
10481 | GList* g_list_nth_prev (GList *list, | |
10482 | guint n); | |
10483 | GList* g_list_find (GList *list, | |
10484 | gconstpointer data); | |
10485 | GList* g_list_find_custom (GList *list, | |
10486 | gconstpointer data, | |
10487 | GCompareFunc func); | |
10488 | gint g_list_position (GList *list, | |
10489 | GList *llink); | |
10490 | gint g_list_index (GList *list, | |
10491 | gconstpointer data); | |
10492 | GList* g_list_last (GList *list); | |
10493 | GList* g_list_first (GList *list); | |
10494 | guint g_list_length (GList *list); | |
10495 | void g_list_foreach (GList *list, | |
10496 | GFunc func, | |
10497 | gpointer user_data); | |
10498 | GList* g_list_sort (GList *list, | |
10499 | GCompareFunc compare_func) __attribute__((warn_unused_result)); | |
10500 | GList* g_list_sort_with_data (GList *list, | |
10501 | GCompareDataFunc compare_func, | |
10502 | gpointer user_data) __attribute__((warn_unused_result)); | |
10503 | gpointer g_list_nth_data (GList *list, | |
10504 | guint n); | |
10505 | ||
10506 | ||
10507 | ||
10508 | ||
10509 | ||
10510 | ||
10511 | # 36 "/usr/include/glib-2.0/glib/ghash.h" 2 | |
10512 | ||
10513 | ||
10514 | ||
10515 | typedef struct _GHashTable GHashTable; | |
10516 | ||
10517 | typedef gboolean (*GHRFunc) (gpointer key, | |
10518 | gpointer value, | |
10519 | gpointer user_data); | |
10520 | ||
10521 | typedef struct _GHashTableIter GHashTableIter; | |
10522 | ||
10523 | struct _GHashTableIter | |
10524 | { | |
10525 | ||
10526 | gpointer dummy1; | |
10527 | gpointer dummy2; | |
10528 | gpointer dummy3; | |
10529 | int dummy4; | |
10530 | gboolean dummy5; | |
10531 | gpointer dummy6; | |
10532 | }; | |
10533 | ||
10534 | GHashTable* g_hash_table_new (GHashFunc hash_func, | |
10535 | GEqualFunc key_equal_func); | |
10536 | GHashTable* g_hash_table_new_full (GHashFunc hash_func, | |
10537 | GEqualFunc key_equal_func, | |
10538 | GDestroyNotify key_destroy_func, | |
10539 | GDestroyNotify value_destroy_func); | |
10540 | void g_hash_table_destroy (GHashTable *hash_table); | |
10541 | void g_hash_table_insert (GHashTable *hash_table, | |
10542 | gpointer key, | |
10543 | gpointer value); | |
10544 | void g_hash_table_replace (GHashTable *hash_table, | |
10545 | gpointer key, | |
10546 | gpointer value); | |
10547 | void g_hash_table_add (GHashTable *hash_table, | |
10548 | gpointer key); | |
10549 | gboolean g_hash_table_remove (GHashTable *hash_table, | |
10550 | gconstpointer key); | |
10551 | void g_hash_table_remove_all (GHashTable *hash_table); | |
10552 | gboolean g_hash_table_steal (GHashTable *hash_table, | |
10553 | gconstpointer key); | |
10554 | void g_hash_table_steal_all (GHashTable *hash_table); | |
10555 | gpointer g_hash_table_lookup (GHashTable *hash_table, | |
10556 | gconstpointer key); | |
10557 | gboolean g_hash_table_contains (GHashTable *hash_table, | |
10558 | gconstpointer key); | |
10559 | gboolean g_hash_table_lookup_extended (GHashTable *hash_table, | |
10560 | gconstpointer lookup_key, | |
10561 | gpointer *orig_key, | |
10562 | gpointer *value); | |
10563 | void g_hash_table_foreach (GHashTable *hash_table, | |
10564 | GHFunc func, | |
10565 | gpointer user_data); | |
10566 | gpointer g_hash_table_find (GHashTable *hash_table, | |
10567 | GHRFunc predicate, | |
10568 | gpointer user_data); | |
10569 | guint g_hash_table_foreach_remove (GHashTable *hash_table, | |
10570 | GHRFunc func, | |
10571 | gpointer user_data); | |
10572 | guint g_hash_table_foreach_steal (GHashTable *hash_table, | |
10573 | GHRFunc func, | |
10574 | gpointer user_data); | |
10575 | guint g_hash_table_size (GHashTable *hash_table); | |
10576 | GList * g_hash_table_get_keys (GHashTable *hash_table); | |
10577 | GList * g_hash_table_get_values (GHashTable *hash_table); | |
10578 | ||
10579 | void g_hash_table_iter_init (GHashTableIter *iter, | |
10580 | GHashTable *hash_table); | |
10581 | gboolean g_hash_table_iter_next (GHashTableIter *iter, | |
10582 | gpointer *key, | |
10583 | gpointer *value); | |
10584 | GHashTable* g_hash_table_iter_get_hash_table (GHashTableIter *iter); | |
10585 | void g_hash_table_iter_remove (GHashTableIter *iter); | |
10586 | ||
10587 | void g_hash_table_iter_replace (GHashTableIter *iter, | |
10588 | gpointer value); | |
10589 | void g_hash_table_iter_steal (GHashTableIter *iter); | |
10590 | ||
10591 | GHashTable* g_hash_table_ref (GHashTable *hash_table); | |
10592 | void g_hash_table_unref (GHashTable *hash_table); | |
10593 | # 125 "/usr/include/glib-2.0/glib/ghash.h" | |
10594 | gboolean g_str_equal (gconstpointer v1, | |
10595 | gconstpointer v2); | |
10596 | guint g_str_hash (gconstpointer v); | |
10597 | ||
10598 | gboolean g_int_equal (gconstpointer v1, | |
10599 | gconstpointer v2); | |
10600 | guint g_int_hash (gconstpointer v); | |
10601 | ||
10602 | gboolean g_int64_equal (gconstpointer v1, | |
10603 | gconstpointer v2); | |
10604 | guint g_int64_hash (gconstpointer v); | |
10605 | ||
10606 | gboolean g_double_equal (gconstpointer v1, | |
10607 | gconstpointer v2); | |
10608 | guint g_double_hash (gconstpointer v); | |
10609 | ||
10610 | guint g_direct_hash (gconstpointer v) __attribute__((__const__)); | |
10611 | gboolean g_direct_equal (gconstpointer v1, | |
10612 | gconstpointer v2) __attribute__((__const__)); | |
10613 | ||
10614 | ||
10615 | # 53 "/usr/include/glib-2.0/glib.h" 2 | |
10616 | # 1 "/usr/include/glib-2.0/glib/ghmac.h" 1 | |
10617 | # 28 "/usr/include/glib-2.0/glib/ghmac.h" | |
10618 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
10619 | # 29 "/usr/include/glib-2.0/glib/ghmac.h" 2 | |
10620 | # 1 "/usr/include/glib-2.0/glib/gchecksum.h" 1 | |
10621 | # 30 "/usr/include/glib-2.0/glib/ghmac.h" 2 | |
10622 | ||
10623 | ||
10624 | # 42 "/usr/include/glib-2.0/glib/ghmac.h" | |
10625 | typedef struct _GHmac GHmac; | |
10626 | ||
10627 | ||
10628 | GHmac * g_hmac_new (GChecksumType digest_type, | |
10629 | const guchar *key, | |
10630 | gsize key_len); | |
10631 | ||
10632 | GHmac * g_hmac_copy (const GHmac *hmac); | |
10633 | ||
10634 | GHmac * g_hmac_ref (GHmac *hmac); | |
10635 | ||
10636 | void g_hmac_unref (GHmac *hmac); | |
10637 | ||
10638 | void g_hmac_update (GHmac *hmac, | |
10639 | const guchar *data, | |
10640 | gssize length); | |
10641 | ||
10642 | const gchar * g_hmac_get_string (GHmac *hmac); | |
10643 | ||
10644 | void g_hmac_get_digest (GHmac *hmac, | |
10645 | guint8 *buffer, | |
10646 | gsize *digest_len); | |
10647 | ||
10648 | ||
10649 | gchar *g_compute_hmac_for_data (GChecksumType digest_type, | |
10650 | const guchar *key, | |
10651 | gsize key_len, | |
10652 | const guchar *data, | |
10653 | gsize length); | |
10654 | ||
10655 | gchar *g_compute_hmac_for_string (GChecksumType digest_type, | |
10656 | const guchar *key, | |
10657 | gsize key_len, | |
10658 | const gchar *str, | |
10659 | gssize length); | |
10660 | ||
10661 | ||
10662 | # 54 "/usr/include/glib-2.0/glib.h" 2 | |
10663 | # 1 "/usr/include/glib-2.0/glib/ghook.h" 1 | |
10664 | # 34 "/usr/include/glib-2.0/glib/ghook.h" | |
10665 | # 1 "/usr/include/glib-2.0/glib/gmem.h" 1 | |
10666 | # 35 "/usr/include/glib-2.0/glib/ghook.h" 2 | |
10667 | ||
10668 | ||
10669 | ||
10670 | ||
10671 | ||
10672 | typedef struct _GHook GHook; | |
10673 | typedef struct _GHookList GHookList; | |
10674 | ||
10675 | typedef gint (*GHookCompareFunc) (GHook *new_hook, | |
10676 | GHook *sibling); | |
10677 | typedef gboolean (*GHookFindFunc) (GHook *hook, | |
10678 | gpointer data); | |
10679 | typedef void (*GHookMarshaller) (GHook *hook, | |
10680 | gpointer marshal_data); | |
10681 | typedef gboolean (*GHookCheckMarshaller) (GHook *hook, | |
10682 | gpointer marshal_data); | |
10683 | typedef void (*GHookFunc) (gpointer data); | |
10684 | typedef gboolean (*GHookCheckFunc) (gpointer data); | |
10685 | typedef void (*GHookFinalizeFunc) (GHookList *hook_list, | |
10686 | GHook *hook); | |
10687 | typedef enum | |
10688 | { | |
10689 | G_HOOK_FLAG_ACTIVE = 1 << 0, | |
10690 | G_HOOK_FLAG_IN_CALL = 1 << 1, | |
10691 | G_HOOK_FLAG_MASK = 0x0f | |
10692 | } GHookFlagMask; | |
10693 | ||
10694 | ||
10695 | ||
10696 | ||
10697 | struct _GHookList | |
10698 | { | |
10699 | gulong seq_id; | |
10700 | guint hook_size : 16; | |
10701 | guint is_setup : 1; | |
10702 | GHook *hooks; | |
10703 | gpointer dummy3; | |
10704 | GHookFinalizeFunc finalize_hook; | |
10705 | gpointer dummy[2]; | |
10706 | }; | |
10707 | struct _GHook | |
10708 | { | |
10709 | gpointer data; | |
10710 | GHook *next; | |
10711 | GHook *prev; | |
10712 | guint ref_count; | |
10713 | gulong hook_id; | |
10714 | guint flags; | |
10715 | gpointer func; | |
10716 | GDestroyNotify destroy; | |
10717 | }; | |
10718 | # 106 "/usr/include/glib-2.0/glib/ghook.h" | |
10719 | void g_hook_list_init (GHookList *hook_list, | |
10720 | guint hook_size); | |
10721 | void g_hook_list_clear (GHookList *hook_list); | |
10722 | GHook* g_hook_alloc (GHookList *hook_list); | |
10723 | void g_hook_free (GHookList *hook_list, | |
10724 | GHook *hook); | |
10725 | GHook * g_hook_ref (GHookList *hook_list, | |
10726 | GHook *hook); | |
10727 | void g_hook_unref (GHookList *hook_list, | |
10728 | GHook *hook); | |
10729 | gboolean g_hook_destroy (GHookList *hook_list, | |
10730 | gulong hook_id); | |
10731 | void g_hook_destroy_link (GHookList *hook_list, | |
10732 | GHook *hook); | |
10733 | void g_hook_prepend (GHookList *hook_list, | |
10734 | GHook *hook); | |
10735 | void g_hook_insert_before (GHookList *hook_list, | |
10736 | GHook *sibling, | |
10737 | GHook *hook); | |
10738 | void g_hook_insert_sorted (GHookList *hook_list, | |
10739 | GHook *hook, | |
10740 | GHookCompareFunc func); | |
10741 | GHook* g_hook_get (GHookList *hook_list, | |
10742 | gulong hook_id); | |
10743 | GHook* g_hook_find (GHookList *hook_list, | |
10744 | gboolean need_valids, | |
10745 | GHookFindFunc func, | |
10746 | gpointer data); | |
10747 | GHook* g_hook_find_data (GHookList *hook_list, | |
10748 | gboolean need_valids, | |
10749 | gpointer data); | |
10750 | GHook* g_hook_find_func (GHookList *hook_list, | |
10751 | gboolean need_valids, | |
10752 | gpointer func); | |
10753 | GHook* g_hook_find_func_data (GHookList *hook_list, | |
10754 | gboolean need_valids, | |
10755 | gpointer func, | |
10756 | gpointer data); | |
10757 | ||
10758 | GHook* g_hook_first_valid (GHookList *hook_list, | |
10759 | gboolean may_be_in_call); | |
10760 | ||
10761 | ||
10762 | ||
10763 | GHook* g_hook_next_valid (GHookList *hook_list, | |
10764 | GHook *hook, | |
10765 | gboolean may_be_in_call); | |
10766 | ||
10767 | gint g_hook_compare_ids (GHook *new_hook, | |
10768 | GHook *sibling); | |
10769 | ||
10770 | ||
10771 | ||
10772 | ||
10773 | ||
10774 | void g_hook_list_invoke (GHookList *hook_list, | |
10775 | gboolean may_recurse); | |
10776 | ||
10777 | ||
10778 | ||
10779 | void g_hook_list_invoke_check (GHookList *hook_list, | |
10780 | gboolean may_recurse); | |
10781 | ||
10782 | ||
10783 | void g_hook_list_marshal (GHookList *hook_list, | |
10784 | gboolean may_recurse, | |
10785 | GHookMarshaller marshaller, | |
10786 | gpointer marshal_data); | |
10787 | void g_hook_list_marshal_check (GHookList *hook_list, | |
10788 | gboolean may_recurse, | |
10789 | GHookCheckMarshaller marshaller, | |
10790 | gpointer marshal_data); | |
10791 | ||
10792 | ||
10793 | # 55 "/usr/include/glib-2.0/glib.h" 2 | |
10794 | # 1 "/usr/include/glib-2.0/glib/ghostutils.h" 1 | |
10795 | # 27 "/usr/include/glib-2.0/glib/ghostutils.h" | |
10796 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
10797 | # 28 "/usr/include/glib-2.0/glib/ghostutils.h" 2 | |
10798 | ||
10799 | ||
10800 | ||
10801 | gboolean g_hostname_is_non_ascii (const gchar *hostname); | |
10802 | gboolean g_hostname_is_ascii_encoded (const gchar *hostname); | |
10803 | gboolean g_hostname_is_ip_address (const gchar *hostname); | |
10804 | ||
10805 | gchar *g_hostname_to_ascii (const gchar *hostname); | |
10806 | gchar *g_hostname_to_unicode (const gchar *hostname); | |
10807 | ||
10808 | ||
10809 | # 56 "/usr/include/glib-2.0/glib.h" 2 | |
10810 | # 1 "/usr/include/glib-2.0/glib/giochannel.h" 1 | |
10811 | # 34 "/usr/include/glib-2.0/glib/giochannel.h" | |
10812 | # 1 "/usr/include/glib-2.0/glib/gconvert.h" 1 | |
10813 | # 35 "/usr/include/glib-2.0/glib/giochannel.h" 2 | |
10814 | # 1 "/usr/include/glib-2.0/glib/gmain.h" 1 | |
10815 | # 27 "/usr/include/glib-2.0/glib/gmain.h" | |
10816 | # 1 "/usr/include/glib-2.0/glib/gpoll.h" 1 | |
10817 | # 27 "/usr/include/glib-2.0/glib/gpoll.h" | |
10818 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
10819 | # 28 "/usr/include/glib-2.0/glib/gpoll.h" 2 | |
10820 | ||
10821 | ||
10822 | # 61 "/usr/include/glib-2.0/glib/gpoll.h" | |
10823 | typedef struct _GPollFD GPollFD; | |
10824 | # 76 "/usr/include/glib-2.0/glib/gpoll.h" | |
10825 | typedef gint (*GPollFunc) (GPollFD *ufds, | |
10826 | guint nfsd, | |
10827 | gint timeout_); | |
10828 | # 93 "/usr/include/glib-2.0/glib/gpoll.h" | |
10829 | struct _GPollFD | |
10830 | { | |
10831 | ||
10832 | ||
10833 | ||
10834 | gint fd; | |
10835 | ||
10836 | gushort events; | |
10837 | gushort revents; | |
10838 | }; | |
10839 | # 114 "/usr/include/glib-2.0/glib/gpoll.h" | |
10840 | gint g_poll (GPollFD *fds, | |
10841 | guint nfds, | |
10842 | gint timeout); | |
10843 | ||
10844 | ||
10845 | # 28 "/usr/include/glib-2.0/glib/gmain.h" 2 | |
10846 | # 1 "/usr/include/glib-2.0/glib/gslist.h" 1 | |
10847 | # 34 "/usr/include/glib-2.0/glib/gslist.h" | |
10848 | # 1 "/usr/include/glib-2.0/glib/gmem.h" 1 | |
10849 | # 35 "/usr/include/glib-2.0/glib/gslist.h" 2 | |
10850 | ||
10851 | ||
10852 | ||
10853 | typedef struct _GSList GSList; | |
10854 | ||
10855 | struct _GSList | |
10856 | { | |
10857 | gpointer data; | |
10858 | GSList *next; | |
10859 | }; | |
10860 | ||
10861 | ||
10862 | ||
10863 | GSList* g_slist_alloc (void) __attribute__((warn_unused_result)); | |
10864 | void g_slist_free (GSList *list); | |
10865 | void g_slist_free_1 (GSList *list); | |
10866 | ||
10867 | void g_slist_free_full (GSList *list, | |
10868 | GDestroyNotify free_func); | |
10869 | GSList* g_slist_append (GSList *list, | |
10870 | gpointer data) __attribute__((warn_unused_result)); | |
10871 | GSList* g_slist_prepend (GSList *list, | |
10872 | gpointer data) __attribute__((warn_unused_result)); | |
10873 | GSList* g_slist_insert (GSList *list, | |
10874 | gpointer data, | |
10875 | gint position) __attribute__((warn_unused_result)); | |
10876 | GSList* g_slist_insert_sorted (GSList *list, | |
10877 | gpointer data, | |
10878 | GCompareFunc func) __attribute__((warn_unused_result)); | |
10879 | GSList* g_slist_insert_sorted_with_data (GSList *list, | |
10880 | gpointer data, | |
10881 | GCompareDataFunc func, | |
10882 | gpointer user_data) __attribute__((warn_unused_result)); | |
10883 | GSList* g_slist_insert_before (GSList *slist, | |
10884 | GSList *sibling, | |
10885 | gpointer data) __attribute__((warn_unused_result)); | |
10886 | GSList* g_slist_concat (GSList *list1, | |
10887 | GSList *list2) __attribute__((warn_unused_result)); | |
10888 | GSList* g_slist_remove (GSList *list, | |
10889 | gconstpointer data) __attribute__((warn_unused_result)); | |
10890 | GSList* g_slist_remove_all (GSList *list, | |
10891 | gconstpointer data) __attribute__((warn_unused_result)); | |
10892 | GSList* g_slist_remove_link (GSList *list, | |
10893 | GSList *link_) __attribute__((warn_unused_result)); | |
10894 | GSList* g_slist_delete_link (GSList *list, | |
10895 | GSList *link_) __attribute__((warn_unused_result)); | |
10896 | GSList* g_slist_reverse (GSList *list) __attribute__((warn_unused_result)); | |
10897 | GSList* g_slist_copy (GSList *list) __attribute__((warn_unused_result)); | |
10898 | GSList* g_slist_nth (GSList *list, | |
10899 | guint n); | |
10900 | GSList* g_slist_find (GSList *list, | |
10901 | gconstpointer data); | |
10902 | GSList* g_slist_find_custom (GSList *list, | |
10903 | gconstpointer data, | |
10904 | GCompareFunc func); | |
10905 | gint g_slist_position (GSList *list, | |
10906 | GSList *llink); | |
10907 | gint g_slist_index (GSList *list, | |
10908 | gconstpointer data); | |
10909 | GSList* g_slist_last (GSList *list); | |
10910 | guint g_slist_length (GSList *list); | |
10911 | void g_slist_foreach (GSList *list, | |
10912 | GFunc func, | |
10913 | gpointer user_data); | |
10914 | GSList* g_slist_sort (GSList *list, | |
10915 | GCompareFunc compare_func) __attribute__((warn_unused_result)); | |
10916 | GSList* g_slist_sort_with_data (GSList *list, | |
10917 | GCompareDataFunc compare_func, | |
10918 | gpointer user_data) __attribute__((warn_unused_result)); | |
10919 | gpointer g_slist_nth_data (GSList *list, | |
10920 | guint n); | |
10921 | ||
10922 | ||
10923 | ||
10924 | ||
10925 | # 29 "/usr/include/glib-2.0/glib/gmain.h" 2 | |
10926 | # 1 "/usr/include/glib-2.0/glib/gthread.h" 1 | |
10927 | # 30 "/usr/include/glib-2.0/glib/gmain.h" 2 | |
10928 | ||
10929 | ||
10930 | ||
10931 | ||
10932 | ||
10933 | ||
10934 | ||
10935 | ||
10936 | ||
10937 | typedef struct _GMainContext GMainContext; | |
10938 | ||
10939 | ||
10940 | ||
10941 | ||
10942 | ||
10943 | ||
10944 | ||
10945 | typedef struct _GMainLoop GMainLoop; | |
10946 | ||
10947 | ||
10948 | ||
10949 | ||
10950 | ||
10951 | ||
10952 | ||
10953 | typedef struct _GSource GSource; | |
10954 | typedef struct _GSourcePrivate GSourcePrivate; | |
10955 | # 68 "/usr/include/glib-2.0/glib/gmain.h" | |
10956 | typedef struct _GSourceCallbackFuncs GSourceCallbackFuncs; | |
10957 | # 113 "/usr/include/glib-2.0/glib/gmain.h" | |
10958 | typedef struct _GSourceFuncs GSourceFuncs; | |
10959 | # 137 "/usr/include/glib-2.0/glib/gmain.h" | |
10960 | typedef gboolean (*GSourceFunc) (gpointer user_data); | |
10961 | # 148 "/usr/include/glib-2.0/glib/gmain.h" | |
10962 | typedef void (*GChildWatchFunc) (GPid pid, | |
10963 | gint status, | |
10964 | gpointer user_data); | |
10965 | struct _GSource | |
10966 | { | |
10967 | ||
10968 | gpointer callback_data; | |
10969 | GSourceCallbackFuncs *callback_funcs; | |
10970 | ||
10971 | GSourceFuncs *source_funcs; | |
10972 | guint ref_count; | |
10973 | ||
10974 | GMainContext *context; | |
10975 | ||
10976 | gint priority; | |
10977 | guint flags; | |
10978 | guint source_id; | |
10979 | ||
10980 | GSList *poll_fds; | |
10981 | ||
10982 | GSource *prev; | |
10983 | GSource *next; | |
10984 | ||
10985 | char *name; | |
10986 | ||
10987 | GSourcePrivate *priv; | |
10988 | }; | |
10989 | ||
10990 | struct _GSourceCallbackFuncs | |
10991 | { | |
10992 | void (*ref) (gpointer cb_data); | |
10993 | void (*unref) (gpointer cb_data); | |
10994 | void (*get) (gpointer cb_data, | |
10995 | GSource *source, | |
10996 | GSourceFunc *func, | |
10997 | gpointer *data); | |
10998 | }; | |
10999 | ||
11000 | ||
11001 | ||
11002 | ||
11003 | ||
11004 | ||
11005 | ||
11006 | typedef void (*GSourceDummyMarshal) (void); | |
11007 | ||
11008 | struct _GSourceFuncs | |
11009 | { | |
11010 | gboolean (*prepare) (GSource *source, | |
11011 | gint *timeout_); | |
11012 | gboolean (*check) (GSource *source); | |
11013 | gboolean (*dispatch) (GSource *source, | |
11014 | GSourceFunc callback, | |
11015 | gpointer user_data); | |
11016 | void (*finalize) (GSource *source); | |
11017 | ||
11018 | ||
11019 | ||
11020 | GSourceFunc closure_callback; | |
11021 | GSourceDummyMarshal closure_marshal; | |
11022 | }; | |
11023 | # 285 "/usr/include/glib-2.0/glib/gmain.h" | |
11024 | GMainContext *g_main_context_new (void); | |
11025 | GMainContext *g_main_context_ref (GMainContext *context); | |
11026 | void g_main_context_unref (GMainContext *context); | |
11027 | GMainContext *g_main_context_default (void); | |
11028 | ||
11029 | gboolean g_main_context_iteration (GMainContext *context, | |
11030 | gboolean may_block); | |
11031 | gboolean g_main_context_pending (GMainContext *context); | |
11032 | ||
11033 | ||
11034 | ||
11035 | GSource *g_main_context_find_source_by_id (GMainContext *context, | |
11036 | guint source_id); | |
11037 | GSource *g_main_context_find_source_by_user_data (GMainContext *context, | |
11038 | gpointer user_data); | |
11039 | GSource *g_main_context_find_source_by_funcs_user_data (GMainContext *context, | |
11040 | GSourceFuncs *funcs, | |
11041 | gpointer user_data); | |
11042 | ||
11043 | ||
11044 | ||
11045 | void g_main_context_wakeup (GMainContext *context); | |
11046 | gboolean g_main_context_acquire (GMainContext *context); | |
11047 | void g_main_context_release (GMainContext *context); | |
11048 | gboolean g_main_context_is_owner (GMainContext *context); | |
11049 | gboolean g_main_context_wait (GMainContext *context, | |
11050 | GCond *cond, | |
11051 | GMutex *mutex); | |
11052 | ||
11053 | gboolean g_main_context_prepare (GMainContext *context, | |
11054 | gint *priority); | |
11055 | gint g_main_context_query (GMainContext *context, | |
11056 | gint max_priority, | |
11057 | gint *timeout_, | |
11058 | GPollFD *fds, | |
11059 | gint n_fds); | |
11060 | gint g_main_context_check (GMainContext *context, | |
11061 | gint max_priority, | |
11062 | GPollFD *fds, | |
11063 | gint n_fds); | |
11064 | void g_main_context_dispatch (GMainContext *context); | |
11065 | ||
11066 | void g_main_context_set_poll_func (GMainContext *context, | |
11067 | GPollFunc func); | |
11068 | GPollFunc g_main_context_get_poll_func (GMainContext *context); | |
11069 | ||
11070 | ||
11071 | ||
11072 | void g_main_context_add_poll (GMainContext *context, | |
11073 | GPollFD *fd, | |
11074 | gint priority); | |
11075 | void g_main_context_remove_poll (GMainContext *context, | |
11076 | GPollFD *fd); | |
11077 | ||
11078 | gint g_main_depth (void); | |
11079 | GSource *g_main_current_source (void); | |
11080 | ||
11081 | ||
11082 | ||
11083 | void g_main_context_push_thread_default (GMainContext *context); | |
11084 | void g_main_context_pop_thread_default (GMainContext *context); | |
11085 | GMainContext *g_main_context_get_thread_default (void); | |
11086 | GMainContext *g_main_context_ref_thread_default (void); | |
11087 | ||
11088 | ||
11089 | ||
11090 | GMainLoop *g_main_loop_new (GMainContext *context, | |
11091 | gboolean is_running); | |
11092 | void g_main_loop_run (GMainLoop *loop); | |
11093 | void g_main_loop_quit (GMainLoop *loop); | |
11094 | GMainLoop *g_main_loop_ref (GMainLoop *loop); | |
11095 | void g_main_loop_unref (GMainLoop *loop); | |
11096 | gboolean g_main_loop_is_running (GMainLoop *loop); | |
11097 | GMainContext *g_main_loop_get_context (GMainLoop *loop); | |
11098 | ||
11099 | ||
11100 | ||
11101 | GSource *g_source_new (GSourceFuncs *source_funcs, | |
11102 | guint struct_size); | |
11103 | GSource *g_source_ref (GSource *source); | |
11104 | void g_source_unref (GSource *source); | |
11105 | ||
11106 | guint g_source_attach (GSource *source, | |
11107 | GMainContext *context); | |
11108 | void g_source_destroy (GSource *source); | |
11109 | ||
11110 | void g_source_set_priority (GSource *source, | |
11111 | gint priority); | |
11112 | gint g_source_get_priority (GSource *source); | |
11113 | void g_source_set_can_recurse (GSource *source, | |
11114 | gboolean can_recurse); | |
11115 | gboolean g_source_get_can_recurse (GSource *source); | |
11116 | guint g_source_get_id (GSource *source); | |
11117 | ||
11118 | GMainContext *g_source_get_context (GSource *source); | |
11119 | ||
11120 | void g_source_set_callback (GSource *source, | |
11121 | GSourceFunc func, | |
11122 | gpointer data, | |
11123 | GDestroyNotify notify); | |
11124 | ||
11125 | void g_source_set_funcs (GSource *source, | |
11126 | GSourceFuncs *funcs); | |
11127 | gboolean g_source_is_destroyed (GSource *source); | |
11128 | ||
11129 | void g_source_set_name (GSource *source, | |
11130 | const char *name); | |
11131 | const char * g_source_get_name (GSource *source); | |
11132 | void g_source_set_name_by_id (guint tag, | |
11133 | const char *name); | |
11134 | ||
11135 | ||
11136 | ||
11137 | void g_source_set_callback_indirect (GSource *source, | |
11138 | gpointer callback_data, | |
11139 | GSourceCallbackFuncs *callback_funcs); | |
11140 | ||
11141 | void g_source_add_poll (GSource *source, | |
11142 | GPollFD *fd); | |
11143 | void g_source_remove_poll (GSource *source, | |
11144 | GPollFD *fd); | |
11145 | ||
11146 | void g_source_add_child_source (GSource *source, | |
11147 | GSource *child_source); | |
11148 | void g_source_remove_child_source (GSource *source, | |
11149 | GSource *child_source); | |
11150 | ||
11151 | __attribute__((__deprecated__("Use '" "g_source_get_time" "' instead"))) | |
11152 | void g_source_get_current_time (GSource *source, | |
11153 | GTimeVal *timeval); | |
11154 | ||
11155 | gint64 g_source_get_time (GSource *source); | |
11156 | ||
11157 | ||
11158 | ||
11159 | ||
11160 | ||
11161 | ||
11162 | ||
11163 | GSource *g_idle_source_new (void); | |
11164 | GSource *g_child_watch_source_new (GPid pid); | |
11165 | GSource *g_timeout_source_new (guint interval); | |
11166 | GSource *g_timeout_source_new_seconds (guint interval); | |
11167 | ||
11168 | ||
11169 | ||
11170 | void g_get_current_time (GTimeVal *result); | |
11171 | gint64 g_get_monotonic_time (void); | |
11172 | gint64 g_get_real_time (void); | |
11173 | ||
11174 | ||
11175 | ||
11176 | gboolean g_source_remove (guint tag); | |
11177 | gboolean g_source_remove_by_user_data (gpointer user_data); | |
11178 | gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, | |
11179 | gpointer user_data); | |
11180 | ||
11181 | ||
11182 | guint g_timeout_add_full (gint priority, | |
11183 | guint interval, | |
11184 | GSourceFunc function, | |
11185 | gpointer data, | |
11186 | GDestroyNotify notify); | |
11187 | guint g_timeout_add (guint interval, | |
11188 | GSourceFunc function, | |
11189 | gpointer data); | |
11190 | guint g_timeout_add_seconds_full (gint priority, | |
11191 | guint interval, | |
11192 | GSourceFunc function, | |
11193 | gpointer data, | |
11194 | GDestroyNotify notify); | |
11195 | guint g_timeout_add_seconds (guint interval, | |
11196 | GSourceFunc function, | |
11197 | gpointer data); | |
11198 | guint g_child_watch_add_full (gint priority, | |
11199 | GPid pid, | |
11200 | GChildWatchFunc function, | |
11201 | gpointer data, | |
11202 | GDestroyNotify notify); | |
11203 | guint g_child_watch_add (GPid pid, | |
11204 | GChildWatchFunc function, | |
11205 | gpointer data); | |
11206 | guint g_idle_add (GSourceFunc function, | |
11207 | gpointer data); | |
11208 | guint g_idle_add_full (gint priority, | |
11209 | GSourceFunc function, | |
11210 | gpointer data, | |
11211 | GDestroyNotify notify); | |
11212 | gboolean g_idle_remove_by_data (gpointer data); | |
11213 | ||
11214 | void g_main_context_invoke_full (GMainContext *context, | |
11215 | gint priority, | |
11216 | GSourceFunc function, | |
11217 | gpointer data, | |
11218 | GDestroyNotify notify); | |
11219 | void g_main_context_invoke (GMainContext *context, | |
11220 | GSourceFunc function, | |
11221 | gpointer data); | |
11222 | ||
11223 | ||
11224 | extern GSourceFuncs g_timeout_funcs; | |
11225 | extern GSourceFuncs g_child_watch_funcs; | |
11226 | extern GSourceFuncs g_idle_funcs; | |
11227 | ||
11228 | ||
11229 | # 36 "/usr/include/glib-2.0/glib/giochannel.h" 2 | |
11230 | # 1 "/usr/include/glib-2.0/glib/gstring.h" 1 | |
11231 | # 34 "/usr/include/glib-2.0/glib/gstring.h" | |
11232 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
11233 | # 35 "/usr/include/glib-2.0/glib/gstring.h" 2 | |
11234 | # 1 "/usr/include/glib-2.0/glib/gunicode.h" 1 | |
11235 | # 29 "/usr/include/glib-2.0/glib/gunicode.h" | |
11236 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
11237 | # 30 "/usr/include/glib-2.0/glib/gunicode.h" 2 | |
11238 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
11239 | # 31 "/usr/include/glib-2.0/glib/gunicode.h" 2 | |
11240 | ||
11241 | ||
11242 | # 61 "/usr/include/glib-2.0/glib/gunicode.h" | |
11243 | typedef guint32 gunichar; | |
11244 | # 79 "/usr/include/glib-2.0/glib/gunicode.h" | |
11245 | typedef guint16 gunichar2; | |
11246 | # 118 "/usr/include/glib-2.0/glib/gunicode.h" | |
11247 | typedef enum | |
11248 | { | |
11249 | G_UNICODE_CONTROL, | |
11250 | G_UNICODE_FORMAT, | |
11251 | G_UNICODE_UNASSIGNED, | |
11252 | G_UNICODE_PRIVATE_USE, | |
11253 | G_UNICODE_SURROGATE, | |
11254 | G_UNICODE_LOWERCASE_LETTER, | |
11255 | G_UNICODE_MODIFIER_LETTER, | |
11256 | G_UNICODE_OTHER_LETTER, | |
11257 | G_UNICODE_TITLECASE_LETTER, | |
11258 | G_UNICODE_UPPERCASE_LETTER, | |
11259 | G_UNICODE_SPACING_MARK, | |
11260 | G_UNICODE_ENCLOSING_MARK, | |
11261 | G_UNICODE_NON_SPACING_MARK, | |
11262 | G_UNICODE_DECIMAL_NUMBER, | |
11263 | G_UNICODE_LETTER_NUMBER, | |
11264 | G_UNICODE_OTHER_NUMBER, | |
11265 | G_UNICODE_CONNECT_PUNCTUATION, | |
11266 | G_UNICODE_DASH_PUNCTUATION, | |
11267 | G_UNICODE_CLOSE_PUNCTUATION, | |
11268 | G_UNICODE_FINAL_PUNCTUATION, | |
11269 | G_UNICODE_INITIAL_PUNCTUATION, | |
11270 | G_UNICODE_OTHER_PUNCTUATION, | |
11271 | G_UNICODE_OPEN_PUNCTUATION, | |
11272 | G_UNICODE_CURRENCY_SYMBOL, | |
11273 | G_UNICODE_MODIFIER_SYMBOL, | |
11274 | G_UNICODE_MATH_SYMBOL, | |
11275 | G_UNICODE_OTHER_SYMBOL, | |
11276 | G_UNICODE_LINE_SEPARATOR, | |
11277 | G_UNICODE_PARAGRAPH_SEPARATOR, | |
11278 | G_UNICODE_SPACE_SEPARATOR | |
11279 | } GUnicodeType; | |
11280 | # 214 "/usr/include/glib-2.0/glib/gunicode.h" | |
11281 | typedef enum | |
11282 | { | |
11283 | G_UNICODE_BREAK_MANDATORY, | |
11284 | G_UNICODE_BREAK_CARRIAGE_RETURN, | |
11285 | G_UNICODE_BREAK_LINE_FEED, | |
11286 | G_UNICODE_BREAK_COMBINING_MARK, | |
11287 | G_UNICODE_BREAK_SURROGATE, | |
11288 | G_UNICODE_BREAK_ZERO_WIDTH_SPACE, | |
11289 | G_UNICODE_BREAK_INSEPARABLE, | |
11290 | G_UNICODE_BREAK_NON_BREAKING_GLUE, | |
11291 | G_UNICODE_BREAK_CONTINGENT, | |
11292 | G_UNICODE_BREAK_SPACE, | |
11293 | G_UNICODE_BREAK_AFTER, | |
11294 | G_UNICODE_BREAK_BEFORE, | |
11295 | G_UNICODE_BREAK_BEFORE_AND_AFTER, | |
11296 | G_UNICODE_BREAK_HYPHEN, | |
11297 | G_UNICODE_BREAK_NON_STARTER, | |
11298 | G_UNICODE_BREAK_OPEN_PUNCTUATION, | |
11299 | G_UNICODE_BREAK_CLOSE_PUNCTUATION, | |
11300 | G_UNICODE_BREAK_QUOTATION, | |
11301 | G_UNICODE_BREAK_EXCLAMATION, | |
11302 | G_UNICODE_BREAK_IDEOGRAPHIC, | |
11303 | G_UNICODE_BREAK_NUMERIC, | |
11304 | G_UNICODE_BREAK_INFIX_SEPARATOR, | |
11305 | G_UNICODE_BREAK_SYMBOL, | |
11306 | G_UNICODE_BREAK_ALPHABETIC, | |
11307 | G_UNICODE_BREAK_PREFIX, | |
11308 | G_UNICODE_BREAK_POSTFIX, | |
11309 | G_UNICODE_BREAK_COMPLEX_CONTEXT, | |
11310 | G_UNICODE_BREAK_AMBIGUOUS, | |
11311 | G_UNICODE_BREAK_UNKNOWN, | |
11312 | G_UNICODE_BREAK_NEXT_LINE, | |
11313 | G_UNICODE_BREAK_WORD_JOINER, | |
11314 | G_UNICODE_BREAK_HANGUL_L_JAMO, | |
11315 | G_UNICODE_BREAK_HANGUL_V_JAMO, | |
11316 | G_UNICODE_BREAK_HANGUL_T_JAMO, | |
11317 | G_UNICODE_BREAK_HANGUL_LV_SYLLABLE, | |
11318 | G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE, | |
11319 | G_UNICODE_BREAK_CLOSE_PARANTHESIS, | |
11320 | G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER, | |
11321 | G_UNICODE_BREAK_HEBREW_LETTER | |
11322 | } GUnicodeBreakType; | |
11323 | # 387 "/usr/include/glib-2.0/glib/gunicode.h" | |
11324 | typedef enum | |
11325 | { | |
11326 | G_UNICODE_SCRIPT_INVALID_CODE = -1, | |
11327 | G_UNICODE_SCRIPT_COMMON = 0, | |
11328 | G_UNICODE_SCRIPT_INHERITED, | |
11329 | G_UNICODE_SCRIPT_ARABIC, | |
11330 | G_UNICODE_SCRIPT_ARMENIAN, | |
11331 | G_UNICODE_SCRIPT_BENGALI, | |
11332 | G_UNICODE_SCRIPT_BOPOMOFO, | |
11333 | G_UNICODE_SCRIPT_CHEROKEE, | |
11334 | G_UNICODE_SCRIPT_COPTIC, | |
11335 | G_UNICODE_SCRIPT_CYRILLIC, | |
11336 | G_UNICODE_SCRIPT_DESERET, | |
11337 | G_UNICODE_SCRIPT_DEVANAGARI, | |
11338 | G_UNICODE_SCRIPT_ETHIOPIC, | |
11339 | G_UNICODE_SCRIPT_GEORGIAN, | |
11340 | G_UNICODE_SCRIPT_GOTHIC, | |
11341 | G_UNICODE_SCRIPT_GREEK, | |
11342 | G_UNICODE_SCRIPT_GUJARATI, | |
11343 | G_UNICODE_SCRIPT_GURMUKHI, | |
11344 | G_UNICODE_SCRIPT_HAN, | |
11345 | G_UNICODE_SCRIPT_HANGUL, | |
11346 | G_UNICODE_SCRIPT_HEBREW, | |
11347 | G_UNICODE_SCRIPT_HIRAGANA, | |
11348 | G_UNICODE_SCRIPT_KANNADA, | |
11349 | G_UNICODE_SCRIPT_KATAKANA, | |
11350 | G_UNICODE_SCRIPT_KHMER, | |
11351 | G_UNICODE_SCRIPT_LAO, | |
11352 | G_UNICODE_SCRIPT_LATIN, | |
11353 | G_UNICODE_SCRIPT_MALAYALAM, | |
11354 | G_UNICODE_SCRIPT_MONGOLIAN, | |
11355 | G_UNICODE_SCRIPT_MYANMAR, | |
11356 | G_UNICODE_SCRIPT_OGHAM, | |
11357 | G_UNICODE_SCRIPT_OLD_ITALIC, | |
11358 | G_UNICODE_SCRIPT_ORIYA, | |
11359 | G_UNICODE_SCRIPT_RUNIC, | |
11360 | G_UNICODE_SCRIPT_SINHALA, | |
11361 | G_UNICODE_SCRIPT_SYRIAC, | |
11362 | G_UNICODE_SCRIPT_TAMIL, | |
11363 | G_UNICODE_SCRIPT_TELUGU, | |
11364 | G_UNICODE_SCRIPT_THAANA, | |
11365 | G_UNICODE_SCRIPT_THAI, | |
11366 | G_UNICODE_SCRIPT_TIBETAN, | |
11367 | G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL, | |
11368 | G_UNICODE_SCRIPT_YI, | |
11369 | G_UNICODE_SCRIPT_TAGALOG, | |
11370 | G_UNICODE_SCRIPT_HANUNOO, | |
11371 | G_UNICODE_SCRIPT_BUHID, | |
11372 | G_UNICODE_SCRIPT_TAGBANWA, | |
11373 | ||
11374 | ||
11375 | G_UNICODE_SCRIPT_BRAILLE, | |
11376 | G_UNICODE_SCRIPT_CYPRIOT, | |
11377 | G_UNICODE_SCRIPT_LIMBU, | |
11378 | G_UNICODE_SCRIPT_OSMANYA, | |
11379 | G_UNICODE_SCRIPT_SHAVIAN, | |
11380 | G_UNICODE_SCRIPT_LINEAR_B, | |
11381 | G_UNICODE_SCRIPT_TAI_LE, | |
11382 | G_UNICODE_SCRIPT_UGARITIC, | |
11383 | ||
11384 | ||
11385 | G_UNICODE_SCRIPT_NEW_TAI_LUE, | |
11386 | G_UNICODE_SCRIPT_BUGINESE, | |
11387 | G_UNICODE_SCRIPT_GLAGOLITIC, | |
11388 | G_UNICODE_SCRIPT_TIFINAGH, | |
11389 | G_UNICODE_SCRIPT_SYLOTI_NAGRI, | |
11390 | G_UNICODE_SCRIPT_OLD_PERSIAN, | |
11391 | G_UNICODE_SCRIPT_KHAROSHTHI, | |
11392 | ||
11393 | ||
11394 | G_UNICODE_SCRIPT_UNKNOWN, | |
11395 | G_UNICODE_SCRIPT_BALINESE, | |
11396 | G_UNICODE_SCRIPT_CUNEIFORM, | |
11397 | G_UNICODE_SCRIPT_PHOENICIAN, | |
11398 | G_UNICODE_SCRIPT_PHAGS_PA, | |
11399 | G_UNICODE_SCRIPT_NKO, | |
11400 | ||
11401 | ||
11402 | G_UNICODE_SCRIPT_KAYAH_LI, | |
11403 | G_UNICODE_SCRIPT_LEPCHA, | |
11404 | G_UNICODE_SCRIPT_REJANG, | |
11405 | G_UNICODE_SCRIPT_SUNDANESE, | |
11406 | G_UNICODE_SCRIPT_SAURASHTRA, | |
11407 | G_UNICODE_SCRIPT_CHAM, | |
11408 | G_UNICODE_SCRIPT_OL_CHIKI, | |
11409 | G_UNICODE_SCRIPT_VAI, | |
11410 | G_UNICODE_SCRIPT_CARIAN, | |
11411 | G_UNICODE_SCRIPT_LYCIAN, | |
11412 | G_UNICODE_SCRIPT_LYDIAN, | |
11413 | ||
11414 | ||
11415 | G_UNICODE_SCRIPT_AVESTAN, | |
11416 | G_UNICODE_SCRIPT_BAMUM, | |
11417 | G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS, | |
11418 | G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC, | |
11419 | G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI, | |
11420 | G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN, | |
11421 | G_UNICODE_SCRIPT_JAVANESE, | |
11422 | G_UNICODE_SCRIPT_KAITHI, | |
11423 | G_UNICODE_SCRIPT_LISU, | |
11424 | G_UNICODE_SCRIPT_MEETEI_MAYEK, | |
11425 | G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN, | |
11426 | G_UNICODE_SCRIPT_OLD_TURKIC, | |
11427 | G_UNICODE_SCRIPT_SAMARITAN, | |
11428 | G_UNICODE_SCRIPT_TAI_THAM, | |
11429 | G_UNICODE_SCRIPT_TAI_VIET, | |
11430 | ||
11431 | ||
11432 | G_UNICODE_SCRIPT_BATAK, | |
11433 | G_UNICODE_SCRIPT_BRAHMI, | |
11434 | G_UNICODE_SCRIPT_MANDAIC, | |
11435 | ||
11436 | ||
11437 | G_UNICODE_SCRIPT_CHAKMA, | |
11438 | G_UNICODE_SCRIPT_MEROITIC_CURSIVE, | |
11439 | G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, | |
11440 | G_UNICODE_SCRIPT_MIAO, | |
11441 | G_UNICODE_SCRIPT_SHARADA, | |
11442 | G_UNICODE_SCRIPT_SORA_SOMPENG, | |
11443 | G_UNICODE_SCRIPT_TAKRI | |
11444 | } GUnicodeScript; | |
11445 | ||
11446 | guint32 g_unicode_script_to_iso15924 (GUnicodeScript script); | |
11447 | GUnicodeScript g_unicode_script_from_iso15924 (guint32 iso15924); | |
11448 | ||
11449 | ||
11450 | ||
11451 | gboolean g_unichar_isalnum (gunichar c) __attribute__((__const__)); | |
11452 | gboolean g_unichar_isalpha (gunichar c) __attribute__((__const__)); | |
11453 | gboolean g_unichar_iscntrl (gunichar c) __attribute__((__const__)); | |
11454 | gboolean g_unichar_isdigit (gunichar c) __attribute__((__const__)); | |
11455 | gboolean g_unichar_isgraph (gunichar c) __attribute__((__const__)); | |
11456 | gboolean g_unichar_islower (gunichar c) __attribute__((__const__)); | |
11457 | gboolean g_unichar_isprint (gunichar c) __attribute__((__const__)); | |
11458 | gboolean g_unichar_ispunct (gunichar c) __attribute__((__const__)); | |
11459 | gboolean g_unichar_isspace (gunichar c) __attribute__((__const__)); | |
11460 | gboolean g_unichar_isupper (gunichar c) __attribute__((__const__)); | |
11461 | gboolean g_unichar_isxdigit (gunichar c) __attribute__((__const__)); | |
11462 | gboolean g_unichar_istitle (gunichar c) __attribute__((__const__)); | |
11463 | gboolean g_unichar_isdefined (gunichar c) __attribute__((__const__)); | |
11464 | gboolean g_unichar_iswide (gunichar c) __attribute__((__const__)); | |
11465 | gboolean g_unichar_iswide_cjk(gunichar c) __attribute__((__const__)); | |
11466 | gboolean g_unichar_iszerowidth(gunichar c) __attribute__((__const__)); | |
11467 | gboolean g_unichar_ismark (gunichar c) __attribute__((__const__)); | |
11468 | ||
11469 | ||
11470 | ||
11471 | gunichar g_unichar_toupper (gunichar c) __attribute__((__const__)); | |
11472 | gunichar g_unichar_tolower (gunichar c) __attribute__((__const__)); | |
11473 | gunichar g_unichar_totitle (gunichar c) __attribute__((__const__)); | |
11474 | ||
11475 | ||
11476 | ||
11477 | gint g_unichar_digit_value (gunichar c) __attribute__((__const__)); | |
11478 | ||
11479 | gint g_unichar_xdigit_value (gunichar c) __attribute__((__const__)); | |
11480 | ||
11481 | ||
11482 | GUnicodeType g_unichar_type (gunichar c) __attribute__((__const__)); | |
11483 | ||
11484 | ||
11485 | GUnicodeBreakType g_unichar_break_type (gunichar c) __attribute__((__const__)); | |
11486 | ||
11487 | ||
11488 | gint g_unichar_combining_class (gunichar uc) __attribute__((__const__)); | |
11489 | ||
11490 | gboolean g_unichar_get_mirror_char (gunichar ch, | |
11491 | gunichar *mirrored_ch); | |
11492 | ||
11493 | GUnicodeScript g_unichar_get_script (gunichar ch) __attribute__((__const__)); | |
11494 | ||
11495 | ||
11496 | gboolean g_unichar_validate (gunichar ch) __attribute__((__const__)); | |
11497 | ||
11498 | ||
11499 | gboolean g_unichar_compose (gunichar a, | |
11500 | gunichar b, | |
11501 | gunichar *ch); | |
11502 | gboolean g_unichar_decompose (gunichar ch, | |
11503 | gunichar *a, | |
11504 | gunichar *b); | |
11505 | ||
11506 | gsize g_unichar_fully_decompose (gunichar ch, | |
11507 | gboolean compat, | |
11508 | gunichar *result, | |
11509 | gsize result_len); | |
11510 | # 589 "/usr/include/glib-2.0/glib/gunicode.h" | |
11511 | void g_unicode_canonical_ordering (gunichar *string, | |
11512 | gsize len); | |
11513 | ||
11514 | ||
11515 | __attribute__((__deprecated__)) | |
11516 | gunichar *g_unicode_canonical_decomposition (gunichar ch, | |
11517 | gsize *result_len) __attribute__((__malloc__)); | |
11518 | ||
11519 | ||
11520 | ||
11521 | extern const gchar * const g_utf8_skip; | |
11522 | # 614 "/usr/include/glib-2.0/glib/gunicode.h" | |
11523 | gunichar g_utf8_get_char (const gchar *p) __attribute__((__pure__)); | |
11524 | gunichar g_utf8_get_char_validated (const gchar *p, | |
11525 | gssize max_len) __attribute__((__pure__)); | |
11526 | ||
11527 | gchar* g_utf8_offset_to_pointer (const gchar *str, | |
11528 | glong offset) __attribute__((__pure__)); | |
11529 | glong g_utf8_pointer_to_offset (const gchar *str, | |
11530 | const gchar *pos) __attribute__((__pure__)); | |
11531 | gchar* g_utf8_prev_char (const gchar *p) __attribute__((__pure__)); | |
11532 | gchar* g_utf8_find_next_char (const gchar *p, | |
11533 | const gchar *end) __attribute__((__pure__)); | |
11534 | gchar* g_utf8_find_prev_char (const gchar *str, | |
11535 | const gchar *p) __attribute__((__pure__)); | |
11536 | ||
11537 | glong g_utf8_strlen (const gchar *p, | |
11538 | gssize max) __attribute__((__pure__)); | |
11539 | ||
11540 | ||
11541 | gchar *g_utf8_substring (const gchar *str, | |
11542 | glong start_pos, | |
11543 | glong end_pos) __attribute__((__malloc__)); | |
11544 | ||
11545 | gchar *g_utf8_strncpy (gchar *dest, | |
11546 | const gchar *src, | |
11547 | gsize n); | |
11548 | ||
11549 | ||
11550 | ||
11551 | gchar* g_utf8_strchr (const gchar *p, | |
11552 | gssize len, | |
11553 | gunichar c); | |
11554 | gchar* g_utf8_strrchr (const gchar *p, | |
11555 | gssize len, | |
11556 | gunichar c); | |
11557 | gchar* g_utf8_strreverse (const gchar *str, | |
11558 | gssize len); | |
11559 | ||
11560 | gunichar2 *g_utf8_to_utf16 (const gchar *str, | |
11561 | glong len, | |
11562 | glong *items_read, | |
11563 | glong *items_written, | |
11564 | GError **error) __attribute__((__malloc__)); | |
11565 | gunichar * g_utf8_to_ucs4 (const gchar *str, | |
11566 | glong len, | |
11567 | glong *items_read, | |
11568 | glong *items_written, | |
11569 | GError **error) __attribute__((__malloc__)); | |
11570 | gunichar * g_utf8_to_ucs4_fast (const gchar *str, | |
11571 | glong len, | |
11572 | glong *items_written) __attribute__((__malloc__)); | |
11573 | gunichar * g_utf16_to_ucs4 (const gunichar2 *str, | |
11574 | glong len, | |
11575 | glong *items_read, | |
11576 | glong *items_written, | |
11577 | GError **error) __attribute__((__malloc__)); | |
11578 | gchar* g_utf16_to_utf8 (const gunichar2 *str, | |
11579 | glong len, | |
11580 | glong *items_read, | |
11581 | glong *items_written, | |
11582 | GError **error) __attribute__((__malloc__)); | |
11583 | gunichar2 *g_ucs4_to_utf16 (const gunichar *str, | |
11584 | glong len, | |
11585 | glong *items_read, | |
11586 | glong *items_written, | |
11587 | GError **error) __attribute__((__malloc__)); | |
11588 | gchar* g_ucs4_to_utf8 (const gunichar *str, | |
11589 | glong len, | |
11590 | glong *items_read, | |
11591 | glong *items_written, | |
11592 | GError **error) __attribute__((__malloc__)); | |
11593 | ||
11594 | gint g_unichar_to_utf8 (gunichar c, | |
11595 | gchar *outbuf); | |
11596 | ||
11597 | gboolean g_utf8_validate (const gchar *str, | |
11598 | gssize max_len, | |
11599 | const gchar **end); | |
11600 | ||
11601 | gchar *g_utf8_strup (const gchar *str, | |
11602 | gssize len) __attribute__((__malloc__)); | |
11603 | gchar *g_utf8_strdown (const gchar *str, | |
11604 | gssize len) __attribute__((__malloc__)); | |
11605 | gchar *g_utf8_casefold (const gchar *str, | |
11606 | gssize len) __attribute__((__malloc__)); | |
11607 | # 723 "/usr/include/glib-2.0/glib/gunicode.h" | |
11608 | typedef enum { | |
11609 | G_NORMALIZE_DEFAULT, | |
11610 | G_NORMALIZE_NFD = G_NORMALIZE_DEFAULT, | |
11611 | G_NORMALIZE_DEFAULT_COMPOSE, | |
11612 | G_NORMALIZE_NFC = G_NORMALIZE_DEFAULT_COMPOSE, | |
11613 | G_NORMALIZE_ALL, | |
11614 | G_NORMALIZE_NFKD = G_NORMALIZE_ALL, | |
11615 | G_NORMALIZE_ALL_COMPOSE, | |
11616 | G_NORMALIZE_NFKC = G_NORMALIZE_ALL_COMPOSE | |
11617 | } GNormalizeMode; | |
11618 | ||
11619 | gchar *g_utf8_normalize (const gchar *str, | |
11620 | gssize len, | |
11621 | GNormalizeMode mode) __attribute__((__malloc__)); | |
11622 | ||
11623 | gint g_utf8_collate (const gchar *str1, | |
11624 | const gchar *str2) __attribute__((__pure__)); | |
11625 | gchar *g_utf8_collate_key (const gchar *str, | |
11626 | gssize len) __attribute__((__malloc__)); | |
11627 | gchar *g_utf8_collate_key_for_filename (const gchar *str, | |
11628 | gssize len) __attribute__((__malloc__)); | |
11629 | ||
11630 | ||
11631 | ||
11632 | ||
11633 | gchar *_g_utf8_make_valid (const gchar *name); | |
11634 | ||
11635 | ||
11636 | # 36 "/usr/include/glib-2.0/glib/gstring.h" 2 | |
11637 | # 1 "/usr/include/glib-2.0/glib/gutils.h" 1 | |
11638 | # 34 "/usr/include/glib-2.0/glib/gutils.h" | |
11639 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
11640 | # 35 "/usr/include/glib-2.0/glib/gutils.h" 2 | |
11641 | ||
11642 | ||
11643 | ||
11644 | # 96 "/usr/include/glib-2.0/glib/gutils.h" | |
11645 | const gchar * g_get_user_name (void); | |
11646 | const gchar * g_get_real_name (void); | |
11647 | const gchar * g_get_home_dir (void); | |
11648 | const gchar * g_get_tmp_dir (void); | |
11649 | const gchar * g_get_host_name (void); | |
11650 | gchar * g_get_prgname (void); | |
11651 | void g_set_prgname (const gchar *prgname); | |
11652 | const gchar * g_get_application_name (void); | |
11653 | void g_set_application_name (const gchar *application_name); | |
11654 | ||
11655 | void g_reload_user_special_dirs_cache (void); | |
11656 | const gchar * g_get_user_data_dir (void); | |
11657 | const gchar * g_get_user_config_dir (void); | |
11658 | const gchar * g_get_user_cache_dir (void); | |
11659 | const gchar * const * g_get_system_data_dirs (void); | |
11660 | # 130 "/usr/include/glib-2.0/glib/gutils.h" | |
11661 | const gchar * const * g_get_system_config_dirs (void); | |
11662 | ||
11663 | const gchar * g_get_user_runtime_dir (void); | |
11664 | # 156 "/usr/include/glib-2.0/glib/gutils.h" | |
11665 | typedef enum { | |
11666 | G_USER_DIRECTORY_DESKTOP, | |
11667 | G_USER_DIRECTORY_DOCUMENTS, | |
11668 | G_USER_DIRECTORY_DOWNLOAD, | |
11669 | G_USER_DIRECTORY_MUSIC, | |
11670 | G_USER_DIRECTORY_PICTURES, | |
11671 | G_USER_DIRECTORY_PUBLIC_SHARE, | |
11672 | G_USER_DIRECTORY_TEMPLATES, | |
11673 | G_USER_DIRECTORY_VIDEOS, | |
11674 | ||
11675 | G_USER_N_DIRECTORIES | |
11676 | } GUserDirectory; | |
11677 | ||
11678 | const gchar * g_get_user_special_dir (GUserDirectory directory); | |
11679 | # 179 "/usr/include/glib-2.0/glib/gutils.h" | |
11680 | typedef struct _GDebugKey GDebugKey; | |
11681 | struct _GDebugKey | |
11682 | { | |
11683 | const gchar *key; | |
11684 | guint value; | |
11685 | }; | |
11686 | ||
11687 | ||
11688 | ||
11689 | guint g_parse_debug_string (const gchar *string, | |
11690 | const GDebugKey *keys, | |
11691 | guint nkeys); | |
11692 | ||
11693 | gint g_snprintf (gchar *string, | |
11694 | gulong n, | |
11695 | gchar const *format, | |
11696 | ...) __attribute__((__format__ (__printf__, 3, 4))); | |
11697 | gint g_vsnprintf (gchar *string, | |
11698 | gulong n, | |
11699 | gchar const *format, | |
11700 | va_list args); | |
11701 | ||
11702 | void g_nullify_pointer (gpointer *nullify_location); | |
11703 | ||
11704 | typedef enum | |
11705 | { | |
11706 | G_FORMAT_SIZE_DEFAULT = 0, | |
11707 | G_FORMAT_SIZE_LONG_FORMAT = 1 << 0, | |
11708 | G_FORMAT_SIZE_IEC_UNITS = 1 << 1 | |
11709 | } GFormatSizeFlags; | |
11710 | ||
11711 | ||
11712 | gchar *g_format_size_full (guint64 size, | |
11713 | GFormatSizeFlags flags); | |
11714 | ||
11715 | gchar *g_format_size (guint64 size); | |
11716 | ||
11717 | __attribute__((__deprecated__("Use '" "g_format_size" "' instead"))) | |
11718 | gchar *g_format_size_for_display (goffset size); | |
11719 | # 227 "/usr/include/glib-2.0/glib/gutils.h" | |
11720 | typedef void (*GVoidFunc) (void); | |
11721 | # 238 "/usr/include/glib-2.0/glib/gutils.h" | |
11722 | __attribute__((__deprecated__)) | |
11723 | void g_atexit (GVoidFunc func); | |
11724 | # 263 "/usr/include/glib-2.0/glib/gutils.h" | |
11725 | gchar* g_find_program_in_path (const gchar *program); | |
11726 | ||
11727 | ||
11728 | ||
11729 | static __inline __attribute__ ((unused)) gint g_bit_nth_lsf (gulong mask, | |
11730 | gint nth_bit) __attribute__((__const__)); | |
11731 | static __inline __attribute__ ((unused)) gint g_bit_nth_msf (gulong mask, | |
11732 | gint nth_bit) __attribute__((__const__)); | |
11733 | static __inline __attribute__ ((unused)) guint g_bit_storage (gulong number) __attribute__((__const__)); | |
11734 | ||
11735 | ||
11736 | ||
11737 | ||
11738 | static __inline __attribute__ ((unused)) gint | |
11739 | g_bit_nth_lsf (gulong mask, | |
11740 | gint nth_bit) | |
11741 | { | |
11742 | if ((__builtin_expect (__extension__ ({ int _g_boolean_var_; if (nth_bit < -1) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 0))) | |
11743 | nth_bit = -1; | |
11744 | while (nth_bit < ((4 * 8) - 1)) | |
11745 | { | |
11746 | nth_bit++; | |
11747 | if (mask & (1UL << nth_bit)) | |
11748 | return nth_bit; | |
11749 | } | |
11750 | return -1; | |
11751 | } | |
11752 | static __inline __attribute__ ((unused)) gint | |
11753 | g_bit_nth_msf (gulong mask, | |
11754 | gint nth_bit) | |
11755 | { | |
11756 | if (nth_bit < 0 || (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (nth_bit > 4 * 8) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 0))) | |
11757 | nth_bit = 4 * 8; | |
11758 | while (nth_bit > 0) | |
11759 | { | |
11760 | nth_bit--; | |
11761 | if (mask & (1UL << nth_bit)) | |
11762 | return nth_bit; | |
11763 | } | |
11764 | return -1; | |
11765 | } | |
11766 | static __inline __attribute__ ((unused)) guint | |
11767 | g_bit_storage (gulong number) | |
11768 | { | |
11769 | ||
11770 | return (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (number) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) ? | |
11771 | ((4 * 8U - 1) ^ (guint) __builtin_clzl(number)) + 1 : 1; | |
11772 | # 321 "/usr/include/glib-2.0/glib/gutils.h" | |
11773 | } | |
11774 | ||
11775 | ||
11776 | ||
11777 | # 37 "/usr/include/glib-2.0/glib/gstring.h" 2 | |
11778 | ||
11779 | ||
11780 | ||
11781 | typedef struct _GString GString; | |
11782 | ||
11783 | struct _GString | |
11784 | { | |
11785 | gchar *str; | |
11786 | gsize len; | |
11787 | gsize allocated_len; | |
11788 | }; | |
11789 | ||
11790 | GString* g_string_new (const gchar *init); | |
11791 | GString* g_string_new_len (const gchar *init, | |
11792 | gssize len); | |
11793 | GString* g_string_sized_new (gsize dfl_size); | |
11794 | gchar* g_string_free (GString *string, | |
11795 | gboolean free_segment); | |
11796 | gboolean g_string_equal (const GString *v, | |
11797 | const GString *v2); | |
11798 | guint g_string_hash (const GString *str); | |
11799 | GString* g_string_assign (GString *string, | |
11800 | const gchar *rval); | |
11801 | GString* g_string_truncate (GString *string, | |
11802 | gsize len); | |
11803 | GString* g_string_set_size (GString *string, | |
11804 | gsize len); | |
11805 | GString* g_string_insert_len (GString *string, | |
11806 | gssize pos, | |
11807 | const gchar *val, | |
11808 | gssize len); | |
11809 | GString* g_string_append (GString *string, | |
11810 | const gchar *val); | |
11811 | GString* g_string_append_len (GString *string, | |
11812 | const gchar *val, | |
11813 | gssize len); | |
11814 | GString* g_string_append_c (GString *string, | |
11815 | gchar c); | |
11816 | GString* g_string_append_unichar (GString *string, | |
11817 | gunichar wc); | |
11818 | GString* g_string_prepend (GString *string, | |
11819 | const gchar *val); | |
11820 | GString* g_string_prepend_c (GString *string, | |
11821 | gchar c); | |
11822 | GString* g_string_prepend_unichar (GString *string, | |
11823 | gunichar wc); | |
11824 | GString* g_string_prepend_len (GString *string, | |
11825 | const gchar *val, | |
11826 | gssize len); | |
11827 | GString* g_string_insert (GString *string, | |
11828 | gssize pos, | |
11829 | const gchar *val); | |
11830 | GString* g_string_insert_c (GString *string, | |
11831 | gssize pos, | |
11832 | gchar c); | |
11833 | GString* g_string_insert_unichar (GString *string, | |
11834 | gssize pos, | |
11835 | gunichar wc); | |
11836 | GString* g_string_overwrite (GString *string, | |
11837 | gsize pos, | |
11838 | const gchar *val); | |
11839 | GString* g_string_overwrite_len (GString *string, | |
11840 | gsize pos, | |
11841 | const gchar *val, | |
11842 | gssize len); | |
11843 | GString* g_string_erase (GString *string, | |
11844 | gssize pos, | |
11845 | gssize len); | |
11846 | GString* g_string_ascii_down (GString *string); | |
11847 | GString* g_string_ascii_up (GString *string); | |
11848 | void g_string_vprintf (GString *string, | |
11849 | const gchar *format, | |
11850 | va_list args); | |
11851 | void g_string_printf (GString *string, | |
11852 | const gchar *format, | |
11853 | ...) __attribute__((__format__ (__printf__, 2, 3))); | |
11854 | void g_string_append_vprintf (GString *string, | |
11855 | const gchar *format, | |
11856 | va_list args); | |
11857 | void g_string_append_printf (GString *string, | |
11858 | const gchar *format, | |
11859 | ...) __attribute__((__format__ (__printf__, 2, 3))); | |
11860 | GString* g_string_append_uri_escaped (GString *string, | |
11861 | const gchar *unescaped, | |
11862 | const gchar *reserved_chars_allowed, | |
11863 | gboolean allow_utf8); | |
11864 | ||
11865 | ||
11866 | ||
11867 | static inline GString* | |
11868 | g_string_append_c_inline (GString *gstring, | |
11869 | gchar c) | |
11870 | { | |
11871 | if (gstring->len + 1 < gstring->allocated_len) | |
11872 | { | |
11873 | gstring->str[gstring->len++] = c; | |
11874 | gstring->str[gstring->len] = 0; | |
11875 | } | |
11876 | else | |
11877 | g_string_insert_c (gstring, -1, c); | |
11878 | return gstring; | |
11879 | } | |
11880 | ||
11881 | ||
11882 | ||
11883 | ||
11884 | __attribute__((__deprecated__)) | |
11885 | GString *g_string_down (GString *string); | |
11886 | __attribute__((__deprecated__)) | |
11887 | GString *g_string_up (GString *string); | |
11888 | ||
11889 | ||
11890 | ||
11891 | ||
11892 | ||
11893 | ||
11894 | ||
11895 | # 37 "/usr/include/glib-2.0/glib/giochannel.h" 2 | |
11896 | ||
11897 | ||
11898 | ||
11899 | ||
11900 | ||
11901 | ||
11902 | typedef struct _GIOChannel GIOChannel; | |
11903 | typedef struct _GIOFuncs GIOFuncs; | |
11904 | ||
11905 | typedef enum | |
11906 | { | |
11907 | G_IO_ERROR_NONE, | |
11908 | G_IO_ERROR_AGAIN, | |
11909 | G_IO_ERROR_INVAL, | |
11910 | G_IO_ERROR_UNKNOWN | |
11911 | } GIOError; | |
11912 | ||
11913 | ||
11914 | ||
11915 | typedef enum | |
11916 | { | |
11917 | ||
11918 | G_IO_CHANNEL_ERROR_FBIG, | |
11919 | G_IO_CHANNEL_ERROR_INVAL, | |
11920 | G_IO_CHANNEL_ERROR_IO, | |
11921 | G_IO_CHANNEL_ERROR_ISDIR, | |
11922 | G_IO_CHANNEL_ERROR_NOSPC, | |
11923 | G_IO_CHANNEL_ERROR_NXIO, | |
11924 | G_IO_CHANNEL_ERROR_OVERFLOW, | |
11925 | G_IO_CHANNEL_ERROR_PIPE, | |
11926 | ||
11927 | G_IO_CHANNEL_ERROR_FAILED | |
11928 | } GIOChannelError; | |
11929 | ||
11930 | typedef enum | |
11931 | { | |
11932 | G_IO_STATUS_ERROR, | |
11933 | G_IO_STATUS_NORMAL, | |
11934 | G_IO_STATUS_EOF, | |
11935 | G_IO_STATUS_AGAIN | |
11936 | } GIOStatus; | |
11937 | ||
11938 | typedef enum | |
11939 | { | |
11940 | G_SEEK_CUR, | |
11941 | G_SEEK_SET, | |
11942 | G_SEEK_END | |
11943 | } GSeekType; | |
11944 | ||
11945 | typedef enum | |
11946 | { | |
11947 | G_IO_IN =1, | |
11948 | G_IO_OUT =4, | |
11949 | G_IO_PRI =2, | |
11950 | G_IO_ERR =8, | |
11951 | G_IO_HUP =16, | |
11952 | G_IO_NVAL =32 | |
11953 | } GIOCondition; | |
11954 | ||
11955 | typedef enum | |
11956 | { | |
11957 | G_IO_FLAG_APPEND = 1 << 0, | |
11958 | G_IO_FLAG_NONBLOCK = 1 << 1, | |
11959 | G_IO_FLAG_IS_READABLE = 1 << 2, | |
11960 | G_IO_FLAG_IS_WRITABLE = 1 << 3, | |
11961 | G_IO_FLAG_IS_SEEKABLE = 1 << 4, | |
11962 | G_IO_FLAG_MASK = (1 << 5) - 1, | |
11963 | G_IO_FLAG_GET_MASK = G_IO_FLAG_MASK, | |
11964 | G_IO_FLAG_SET_MASK = G_IO_FLAG_APPEND | G_IO_FLAG_NONBLOCK | |
11965 | } GIOFlags; | |
11966 | ||
11967 | ||
11968 | ||
11969 | ||
11970 | struct _GIOChannel | |
11971 | { | |
11972 | ||
11973 | gint ref_count; | |
11974 | GIOFuncs *funcs; | |
11975 | ||
11976 | gchar *encoding; | |
11977 | GIConv read_cd; | |
11978 | GIConv write_cd; | |
11979 | gchar *line_term; | |
11980 | guint line_term_len; | |
11981 | ||
11982 | gsize buf_size; | |
11983 | GString *read_buf; | |
11984 | GString *encoded_read_buf; | |
11985 | GString *write_buf; | |
11986 | gchar partial_write_buf[6]; | |
11987 | ||
11988 | ||
11989 | ||
11990 | guint use_buffer : 1; | |
11991 | guint do_encode : 1; | |
11992 | guint close_on_unref : 1; | |
11993 | guint is_readable : 1; | |
11994 | guint is_writeable : 1; | |
11995 | guint is_seekable : 1; | |
11996 | ||
11997 | gpointer reserved1; | |
11998 | gpointer reserved2; | |
11999 | }; | |
12000 | ||
12001 | typedef gboolean (*GIOFunc) (GIOChannel *source, | |
12002 | GIOCondition condition, | |
12003 | gpointer data); | |
12004 | struct _GIOFuncs | |
12005 | { | |
12006 | GIOStatus (*io_read) (GIOChannel *channel, | |
12007 | gchar *buf, | |
12008 | gsize count, | |
12009 | gsize *bytes_read, | |
12010 | GError **err); | |
12011 | GIOStatus (*io_write) (GIOChannel *channel, | |
12012 | const gchar *buf, | |
12013 | gsize count, | |
12014 | gsize *bytes_written, | |
12015 | GError **err); | |
12016 | GIOStatus (*io_seek) (GIOChannel *channel, | |
12017 | gint64 offset, | |
12018 | GSeekType type, | |
12019 | GError **err); | |
12020 | GIOStatus (*io_close) (GIOChannel *channel, | |
12021 | GError **err); | |
12022 | GSource* (*io_create_watch) (GIOChannel *channel, | |
12023 | GIOCondition condition); | |
12024 | void (*io_free) (GIOChannel *channel); | |
12025 | GIOStatus (*io_set_flags) (GIOChannel *channel, | |
12026 | GIOFlags flags, | |
12027 | GError **err); | |
12028 | GIOFlags (*io_get_flags) (GIOChannel *channel); | |
12029 | }; | |
12030 | ||
12031 | void g_io_channel_init (GIOChannel *channel); | |
12032 | GIOChannel *g_io_channel_ref (GIOChannel *channel); | |
12033 | void g_io_channel_unref (GIOChannel *channel); | |
12034 | ||
12035 | __attribute__((__deprecated__("Use '" "g_io_channel_read_for" "' instead"))) | |
12036 | GIOError g_io_channel_read (GIOChannel *channel, | |
12037 | gchar *buf, | |
12038 | gsize count, | |
12039 | gsize *bytes_read); | |
12040 | ||
12041 | __attribute__((__deprecated__("Use '" "g_io_channel_write_chars" "' instead"))) | |
12042 | GIOError g_io_channel_write (GIOChannel *channel, | |
12043 | const gchar *buf, | |
12044 | gsize count, | |
12045 | gsize *bytes_written); | |
12046 | ||
12047 | __attribute__((__deprecated__("Use '" "g_io_channel_seek_position" "' instead"))) | |
12048 | GIOError g_io_channel_seek (GIOChannel *channel, | |
12049 | gint64 offset, | |
12050 | GSeekType type); | |
12051 | ||
12052 | __attribute__((__deprecated__("Use '" "g_io_channel_shutdown" "' instead"))) | |
12053 | void g_io_channel_close (GIOChannel *channel); | |
12054 | ||
12055 | GIOStatus g_io_channel_shutdown (GIOChannel *channel, | |
12056 | gboolean flush, | |
12057 | GError **err); | |
12058 | guint g_io_add_watch_full (GIOChannel *channel, | |
12059 | gint priority, | |
12060 | GIOCondition condition, | |
12061 | GIOFunc func, | |
12062 | gpointer user_data, | |
12063 | GDestroyNotify notify); | |
12064 | GSource * g_io_create_watch (GIOChannel *channel, | |
12065 | GIOCondition condition); | |
12066 | guint g_io_add_watch (GIOChannel *channel, | |
12067 | GIOCondition condition, | |
12068 | GIOFunc func, | |
12069 | gpointer user_data); | |
12070 | ||
12071 | ||
12072 | ||
12073 | ||
12074 | void g_io_channel_set_buffer_size (GIOChannel *channel, | |
12075 | gsize size); | |
12076 | gsize g_io_channel_get_buffer_size (GIOChannel *channel); | |
12077 | GIOCondition g_io_channel_get_buffer_condition (GIOChannel *channel); | |
12078 | GIOStatus g_io_channel_set_flags (GIOChannel *channel, | |
12079 | GIOFlags flags, | |
12080 | GError **error); | |
12081 | GIOFlags g_io_channel_get_flags (GIOChannel *channel); | |
12082 | void g_io_channel_set_line_term (GIOChannel *channel, | |
12083 | const gchar *line_term, | |
12084 | gint length); | |
12085 | const gchar * g_io_channel_get_line_term (GIOChannel *channel, | |
12086 | gint *length); | |
12087 | void g_io_channel_set_buffered (GIOChannel *channel, | |
12088 | gboolean buffered); | |
12089 | gboolean g_io_channel_get_buffered (GIOChannel *channel); | |
12090 | GIOStatus g_io_channel_set_encoding (GIOChannel *channel, | |
12091 | const gchar *encoding, | |
12092 | GError **error); | |
12093 | const gchar * g_io_channel_get_encoding (GIOChannel *channel); | |
12094 | void g_io_channel_set_close_on_unref (GIOChannel *channel, | |
12095 | gboolean do_close); | |
12096 | gboolean g_io_channel_get_close_on_unref (GIOChannel *channel); | |
12097 | ||
12098 | ||
12099 | GIOStatus g_io_channel_flush (GIOChannel *channel, | |
12100 | GError **error); | |
12101 | GIOStatus g_io_channel_read_line (GIOChannel *channel, | |
12102 | gchar **str_return, | |
12103 | gsize *length, | |
12104 | gsize *terminator_pos, | |
12105 | GError **error); | |
12106 | GIOStatus g_io_channel_read_line_string (GIOChannel *channel, | |
12107 | GString *buffer, | |
12108 | gsize *terminator_pos, | |
12109 | GError **error); | |
12110 | GIOStatus g_io_channel_read_to_end (GIOChannel *channel, | |
12111 | gchar **str_return, | |
12112 | gsize *length, | |
12113 | GError **error); | |
12114 | GIOStatus g_io_channel_read_chars (GIOChannel *channel, | |
12115 | gchar *buf, | |
12116 | gsize count, | |
12117 | gsize *bytes_read, | |
12118 | GError **error); | |
12119 | GIOStatus g_io_channel_read_unichar (GIOChannel *channel, | |
12120 | gunichar *thechar, | |
12121 | GError **error); | |
12122 | GIOStatus g_io_channel_write_chars (GIOChannel *channel, | |
12123 | const gchar *buf, | |
12124 | gssize count, | |
12125 | gsize *bytes_written, | |
12126 | GError **error); | |
12127 | GIOStatus g_io_channel_write_unichar (GIOChannel *channel, | |
12128 | gunichar thechar, | |
12129 | GError **error); | |
12130 | GIOStatus g_io_channel_seek_position (GIOChannel *channel, | |
12131 | gint64 offset, | |
12132 | GSeekType type, | |
12133 | GError **error); | |
12134 | ||
12135 | ||
12136 | ||
12137 | ||
12138 | GIOChannel* g_io_channel_new_file (const gchar *filename, | |
12139 | const gchar *mode, | |
12140 | GError **error); | |
12141 | ||
12142 | ||
12143 | ||
12144 | GQuark g_io_channel_error_quark (void); | |
12145 | GIOChannelError g_io_channel_error_from_errno (gint en); | |
12146 | # 306 "/usr/include/glib-2.0/glib/giochannel.h" | |
12147 | GIOChannel* g_io_channel_unix_new (int fd); | |
12148 | gint g_io_channel_unix_get_fd (GIOChannel *channel); | |
12149 | ||
12150 | ||
12151 | ||
12152 | extern GSourceFuncs g_io_watch_funcs; | |
12153 | # 372 "/usr/include/glib-2.0/glib/giochannel.h" | |
12154 | ||
12155 | # 57 "/usr/include/glib-2.0/glib.h" 2 | |
12156 | # 1 "/usr/include/glib-2.0/glib/gkeyfile.h" 1 | |
12157 | # 30 "/usr/include/glib-2.0/glib/gkeyfile.h" | |
12158 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
12159 | # 31 "/usr/include/glib-2.0/glib/gkeyfile.h" 2 | |
12160 | ||
12161 | ||
12162 | ||
12163 | typedef enum | |
12164 | { | |
12165 | G_KEY_FILE_ERROR_UNKNOWN_ENCODING, | |
12166 | G_KEY_FILE_ERROR_PARSE, | |
12167 | G_KEY_FILE_ERROR_NOT_FOUND, | |
12168 | G_KEY_FILE_ERROR_KEY_NOT_FOUND, | |
12169 | G_KEY_FILE_ERROR_GROUP_NOT_FOUND, | |
12170 | G_KEY_FILE_ERROR_INVALID_VALUE | |
12171 | } GKeyFileError; | |
12172 | ||
12173 | ||
12174 | ||
12175 | GQuark g_key_file_error_quark (void); | |
12176 | ||
12177 | typedef struct _GKeyFile GKeyFile; | |
12178 | ||
12179 | typedef enum | |
12180 | { | |
12181 | G_KEY_FILE_NONE = 0, | |
12182 | G_KEY_FILE_KEEP_COMMENTS = 1 << 0, | |
12183 | G_KEY_FILE_KEEP_TRANSLATIONS = 1 << 1 | |
12184 | } GKeyFileFlags; | |
12185 | ||
12186 | GKeyFile *g_key_file_new (void); | |
12187 | GKeyFile *g_key_file_ref (GKeyFile *key_file); | |
12188 | void g_key_file_unref (GKeyFile *key_file); | |
12189 | void g_key_file_free (GKeyFile *key_file); | |
12190 | void g_key_file_set_list_separator (GKeyFile *key_file, | |
12191 | gchar separator); | |
12192 | gboolean g_key_file_load_from_file (GKeyFile *key_file, | |
12193 | const gchar *file, | |
12194 | GKeyFileFlags flags, | |
12195 | GError **error); | |
12196 | gboolean g_key_file_load_from_data (GKeyFile *key_file, | |
12197 | const gchar *data, | |
12198 | gsize length, | |
12199 | GKeyFileFlags flags, | |
12200 | GError **error); | |
12201 | gboolean g_key_file_load_from_dirs (GKeyFile *key_file, | |
12202 | const gchar *file, | |
12203 | const gchar **search_dirs, | |
12204 | gchar **full_path, | |
12205 | GKeyFileFlags flags, | |
12206 | GError **error); | |
12207 | gboolean g_key_file_load_from_data_dirs (GKeyFile *key_file, | |
12208 | const gchar *file, | |
12209 | gchar **full_path, | |
12210 | GKeyFileFlags flags, | |
12211 | GError **error); | |
12212 | gchar *g_key_file_to_data (GKeyFile *key_file, | |
12213 | gsize *length, | |
12214 | GError **error) __attribute__((__malloc__)); | |
12215 | gchar *g_key_file_get_start_group (GKeyFile *key_file) __attribute__((__malloc__)); | |
12216 | gchar **g_key_file_get_groups (GKeyFile *key_file, | |
12217 | gsize *length) __attribute__((__malloc__)); | |
12218 | gchar **g_key_file_get_keys (GKeyFile *key_file, | |
12219 | const gchar *group_name, | |
12220 | gsize *length, | |
12221 | GError **error) __attribute__((__malloc__)); | |
12222 | gboolean g_key_file_has_group (GKeyFile *key_file, | |
12223 | const gchar *group_name); | |
12224 | gboolean g_key_file_has_key (GKeyFile *key_file, | |
12225 | const gchar *group_name, | |
12226 | const gchar *key, | |
12227 | GError **error); | |
12228 | gchar *g_key_file_get_value (GKeyFile *key_file, | |
12229 | const gchar *group_name, | |
12230 | const gchar *key, | |
12231 | GError **error) __attribute__((__malloc__)); | |
12232 | void g_key_file_set_value (GKeyFile *key_file, | |
12233 | const gchar *group_name, | |
12234 | const gchar *key, | |
12235 | const gchar *value); | |
12236 | gchar *g_key_file_get_string (GKeyFile *key_file, | |
12237 | const gchar *group_name, | |
12238 | const gchar *key, | |
12239 | GError **error) __attribute__((__malloc__)); | |
12240 | void g_key_file_set_string (GKeyFile *key_file, | |
12241 | const gchar *group_name, | |
12242 | const gchar *key, | |
12243 | const gchar *string); | |
12244 | gchar *g_key_file_get_locale_string (GKeyFile *key_file, | |
12245 | const gchar *group_name, | |
12246 | const gchar *key, | |
12247 | const gchar *locale, | |
12248 | GError **error) __attribute__((__malloc__)); | |
12249 | void g_key_file_set_locale_string (GKeyFile *key_file, | |
12250 | const gchar *group_name, | |
12251 | const gchar *key, | |
12252 | const gchar *locale, | |
12253 | const gchar *string); | |
12254 | gboolean g_key_file_get_boolean (GKeyFile *key_file, | |
12255 | const gchar *group_name, | |
12256 | const gchar *key, | |
12257 | GError **error); | |
12258 | void g_key_file_set_boolean (GKeyFile *key_file, | |
12259 | const gchar *group_name, | |
12260 | const gchar *key, | |
12261 | gboolean value); | |
12262 | gint g_key_file_get_integer (GKeyFile *key_file, | |
12263 | const gchar *group_name, | |
12264 | const gchar *key, | |
12265 | GError **error); | |
12266 | void g_key_file_set_integer (GKeyFile *key_file, | |
12267 | const gchar *group_name, | |
12268 | const gchar *key, | |
12269 | gint value); | |
12270 | gint64 g_key_file_get_int64 (GKeyFile *key_file, | |
12271 | const gchar *group_name, | |
12272 | const gchar *key, | |
12273 | GError **error); | |
12274 | void g_key_file_set_int64 (GKeyFile *key_file, | |
12275 | const gchar *group_name, | |
12276 | const gchar *key, | |
12277 | gint64 value); | |
12278 | guint64 g_key_file_get_uint64 (GKeyFile *key_file, | |
12279 | const gchar *group_name, | |
12280 | const gchar *key, | |
12281 | GError **error); | |
12282 | void g_key_file_set_uint64 (GKeyFile *key_file, | |
12283 | const gchar *group_name, | |
12284 | const gchar *key, | |
12285 | guint64 value); | |
12286 | gdouble g_key_file_get_double (GKeyFile *key_file, | |
12287 | const gchar *group_name, | |
12288 | const gchar *key, | |
12289 | GError **error); | |
12290 | void g_key_file_set_double (GKeyFile *key_file, | |
12291 | const gchar *group_name, | |
12292 | const gchar *key, | |
12293 | gdouble value); | |
12294 | gchar **g_key_file_get_string_list (GKeyFile *key_file, | |
12295 | const gchar *group_name, | |
12296 | const gchar *key, | |
12297 | gsize *length, | |
12298 | GError **error) __attribute__((__malloc__)); | |
12299 | void g_key_file_set_string_list (GKeyFile *key_file, | |
12300 | const gchar *group_name, | |
12301 | const gchar *key, | |
12302 | const gchar * const list[], | |
12303 | gsize length); | |
12304 | gchar **g_key_file_get_locale_string_list (GKeyFile *key_file, | |
12305 | const gchar *group_name, | |
12306 | const gchar *key, | |
12307 | const gchar *locale, | |
12308 | gsize *length, | |
12309 | GError **error) __attribute__((__malloc__)); | |
12310 | void g_key_file_set_locale_string_list (GKeyFile *key_file, | |
12311 | const gchar *group_name, | |
12312 | const gchar *key, | |
12313 | const gchar *locale, | |
12314 | const gchar * const list[], | |
12315 | gsize length); | |
12316 | gboolean *g_key_file_get_boolean_list (GKeyFile *key_file, | |
12317 | const gchar *group_name, | |
12318 | const gchar *key, | |
12319 | gsize *length, | |
12320 | GError **error) __attribute__((__malloc__)); | |
12321 | void g_key_file_set_boolean_list (GKeyFile *key_file, | |
12322 | const gchar *group_name, | |
12323 | const gchar *key, | |
12324 | gboolean list[], | |
12325 | gsize length); | |
12326 | gint *g_key_file_get_integer_list (GKeyFile *key_file, | |
12327 | const gchar *group_name, | |
12328 | const gchar *key, | |
12329 | gsize *length, | |
12330 | GError **error) __attribute__((__malloc__)); | |
12331 | void g_key_file_set_double_list (GKeyFile *key_file, | |
12332 | const gchar *group_name, | |
12333 | const gchar *key, | |
12334 | gdouble list[], | |
12335 | gsize length); | |
12336 | gdouble *g_key_file_get_double_list (GKeyFile *key_file, | |
12337 | const gchar *group_name, | |
12338 | const gchar *key, | |
12339 | gsize *length, | |
12340 | GError **error) __attribute__((__malloc__)); | |
12341 | void g_key_file_set_integer_list (GKeyFile *key_file, | |
12342 | const gchar *group_name, | |
12343 | const gchar *key, | |
12344 | gint list[], | |
12345 | gsize length); | |
12346 | gboolean g_key_file_set_comment (GKeyFile *key_file, | |
12347 | const gchar *group_name, | |
12348 | const gchar *key, | |
12349 | const gchar *comment, | |
12350 | GError **error); | |
12351 | gchar *g_key_file_get_comment (GKeyFile *key_file, | |
12352 | const gchar *group_name, | |
12353 | const gchar *key, | |
12354 | GError **error) __attribute__((__malloc__)); | |
12355 | ||
12356 | gboolean g_key_file_remove_comment (GKeyFile *key_file, | |
12357 | const gchar *group_name, | |
12358 | const gchar *key, | |
12359 | GError **error); | |
12360 | gboolean g_key_file_remove_key (GKeyFile *key_file, | |
12361 | const gchar *group_name, | |
12362 | const gchar *key, | |
12363 | GError **error); | |
12364 | gboolean g_key_file_remove_group (GKeyFile *key_file, | |
12365 | const gchar *group_name, | |
12366 | GError **error); | |
12367 | # 266 "/usr/include/glib-2.0/glib/gkeyfile.h" | |
12368 | ||
12369 | # 58 "/usr/include/glib-2.0/glib.h" 2 | |
12370 | # 1 "/usr/include/glib-2.0/glib/glist.h" 1 | |
12371 | # 59 "/usr/include/glib-2.0/glib.h" 2 | |
12372 | # 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 | |
12373 | # 60 "/usr/include/glib-2.0/glib.h" 2 | |
12374 | # 1 "/usr/include/glib-2.0/glib/gmain.h" 1 | |
12375 | # 61 "/usr/include/glib-2.0/glib.h" 2 | |
12376 | # 1 "/usr/include/glib-2.0/glib/gmappedfile.h" 1 | |
12377 | # 29 "/usr/include/glib-2.0/glib/gmappedfile.h" | |
12378 | # 1 "/usr/include/glib-2.0/glib/gbytes.h" 1 | |
12379 | # 30 "/usr/include/glib-2.0/glib/gmappedfile.h" 2 | |
12380 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
12381 | # 31 "/usr/include/glib-2.0/glib/gmappedfile.h" 2 | |
12382 | ||
12383 | ||
12384 | ||
12385 | typedef struct _GMappedFile GMappedFile; | |
12386 | ||
12387 | GMappedFile *g_mapped_file_new (const gchar *filename, | |
12388 | gboolean writable, | |
12389 | GError **error) __attribute__((__malloc__)); | |
12390 | GMappedFile *g_mapped_file_new_from_fd (gint fd, | |
12391 | gboolean writable, | |
12392 | GError **error) __attribute__((__malloc__)); | |
12393 | gsize g_mapped_file_get_length (GMappedFile *file); | |
12394 | gchar *g_mapped_file_get_contents (GMappedFile *file); | |
12395 | GMappedFile *g_mapped_file_ref (GMappedFile *file); | |
12396 | void g_mapped_file_unref (GMappedFile *file); | |
12397 | ||
12398 | __attribute__((__deprecated__("Use '" "g_mapped_file_unref" "' instead"))) | |
12399 | void g_mapped_file_free (GMappedFile *file); | |
12400 | ||
12401 | ||
12402 | # 62 "/usr/include/glib-2.0/glib.h" 2 | |
12403 | # 1 "/usr/include/glib-2.0/glib/gmarkup.h" 1 | |
12404 | # 30 "/usr/include/glib-2.0/glib/gmarkup.h" | |
12405 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
12406 | # 31 "/usr/include/glib-2.0/glib/gmarkup.h" 2 | |
12407 | # 1 "/usr/include/glib-2.0/glib/gslist.h" 1 | |
12408 | # 32 "/usr/include/glib-2.0/glib/gmarkup.h" 2 | |
12409 | ||
12410 | ||
12411 | # 51 "/usr/include/glib-2.0/glib/gmarkup.h" | |
12412 | typedef enum | |
12413 | { | |
12414 | G_MARKUP_ERROR_BAD_UTF8, | |
12415 | G_MARKUP_ERROR_EMPTY, | |
12416 | G_MARKUP_ERROR_PARSE, | |
12417 | ||
12418 | ||
12419 | ||
12420 | G_MARKUP_ERROR_UNKNOWN_ELEMENT, | |
12421 | G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, | |
12422 | G_MARKUP_ERROR_INVALID_CONTENT, | |
12423 | G_MARKUP_ERROR_MISSING_ATTRIBUTE | |
12424 | } GMarkupError; | |
12425 | # 74 "/usr/include/glib-2.0/glib/gmarkup.h" | |
12426 | GQuark g_markup_error_quark (void); | |
12427 | # 92 "/usr/include/glib-2.0/glib/gmarkup.h" | |
12428 | typedef enum | |
12429 | { | |
12430 | G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0, | |
12431 | G_MARKUP_TREAT_CDATA_AS_TEXT = 1 << 1, | |
12432 | G_MARKUP_PREFIX_ERROR_POSITION = 1 << 2 | |
12433 | } GMarkupParseFlags; | |
12434 | # 108 "/usr/include/glib-2.0/glib/gmarkup.h" | |
12435 | typedef struct _GMarkupParseContext GMarkupParseContext; | |
12436 | typedef struct _GMarkupParser GMarkupParser; | |
12437 | # 138 "/usr/include/glib-2.0/glib/gmarkup.h" | |
12438 | struct _GMarkupParser | |
12439 | { | |
12440 | ||
12441 | void (*start_element) (GMarkupParseContext *context, | |
12442 | const gchar *element_name, | |
12443 | const gchar **attribute_names, | |
12444 | const gchar **attribute_values, | |
12445 | gpointer user_data, | |
12446 | GError **error); | |
12447 | ||
12448 | ||
12449 | void (*end_element) (GMarkupParseContext *context, | |
12450 | const gchar *element_name, | |
12451 | gpointer user_data, | |
12452 | GError **error); | |
12453 | ||
12454 | ||
12455 | ||
12456 | void (*text) (GMarkupParseContext *context, | |
12457 | const gchar *text, | |
12458 | gsize text_len, | |
12459 | gpointer user_data, | |
12460 | GError **error); | |
12461 | ||
12462 | ||
12463 | ||
12464 | ||
12465 | ||
12466 | ||
12467 | void (*passthrough) (GMarkupParseContext *context, | |
12468 | const gchar *passthrough_text, | |
12469 | gsize text_len, | |
12470 | gpointer user_data, | |
12471 | GError **error); | |
12472 | ||
12473 | ||
12474 | ||
12475 | ||
12476 | void (*error) (GMarkupParseContext *context, | |
12477 | GError *error, | |
12478 | gpointer user_data); | |
12479 | }; | |
12480 | ||
12481 | GMarkupParseContext *g_markup_parse_context_new (const GMarkupParser *parser, | |
12482 | GMarkupParseFlags flags, | |
12483 | gpointer user_data, | |
12484 | GDestroyNotify user_data_dnotify); | |
12485 | void g_markup_parse_context_free (GMarkupParseContext *context); | |
12486 | gboolean g_markup_parse_context_parse (GMarkupParseContext *context, | |
12487 | const gchar *text, | |
12488 | gssize text_len, | |
12489 | GError **error); | |
12490 | void g_markup_parse_context_push (GMarkupParseContext *context, | |
12491 | const GMarkupParser *parser, | |
12492 | gpointer user_data); | |
12493 | gpointer g_markup_parse_context_pop (GMarkupParseContext *context); | |
12494 | ||
12495 | gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context, | |
12496 | GError **error); | |
12497 | const gchar * g_markup_parse_context_get_element (GMarkupParseContext *context); | |
12498 | const GSList * g_markup_parse_context_get_element_stack (GMarkupParseContext *context); | |
12499 | ||
12500 | ||
12501 | void g_markup_parse_context_get_position (GMarkupParseContext *context, | |
12502 | gint *line_number, | |
12503 | gint *char_number); | |
12504 | gpointer g_markup_parse_context_get_user_data (GMarkupParseContext *context); | |
12505 | ||
12506 | ||
12507 | gchar* g_markup_escape_text (const gchar *text, | |
12508 | gssize length); | |
12509 | ||
12510 | gchar *g_markup_printf_escaped (const char *format, | |
12511 | ...) __attribute__((__format__ (__printf__, 1, 2))); | |
12512 | gchar *g_markup_vprintf_escaped (const char *format, | |
12513 | va_list args); | |
12514 | ||
12515 | typedef enum | |
12516 | { | |
12517 | G_MARKUP_COLLECT_INVALID, | |
12518 | G_MARKUP_COLLECT_STRING, | |
12519 | G_MARKUP_COLLECT_STRDUP, | |
12520 | G_MARKUP_COLLECT_BOOLEAN, | |
12521 | G_MARKUP_COLLECT_TRISTATE, | |
12522 | ||
12523 | G_MARKUP_COLLECT_OPTIONAL = (1 << 16) | |
12524 | } GMarkupCollectType; | |
12525 | ||
12526 | ||
12527 | ||
12528 | gboolean g_markup_collect_attributes (const gchar *element_name, | |
12529 | const gchar **attribute_names, | |
12530 | const gchar **attribute_values, | |
12531 | GError **error, | |
12532 | GMarkupCollectType first_type, | |
12533 | const gchar *first_attr, | |
12534 | ...); | |
12535 | ||
12536 | ||
12537 | # 63 "/usr/include/glib-2.0/glib.h" 2 | |
12538 | # 1 "/usr/include/glib-2.0/glib/gmem.h" 1 | |
12539 | # 64 "/usr/include/glib-2.0/glib.h" 2 | |
12540 | # 1 "/usr/include/glib-2.0/glib/gmessages.h" 1 | |
12541 | # 35 "/usr/include/glib-2.0/glib/gmessages.h" | |
12542 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
12543 | # 36 "/usr/include/glib-2.0/glib/gmessages.h" 2 | |
12544 | # 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 | |
12545 | # 37 "/usr/include/glib-2.0/glib/gmessages.h" 2 | |
12546 | ||
12547 | ||
12548 | ||
12549 | ||
12550 | ||
12551 | # 42 "/usr/include/glib-2.0/glib/gmessages.h" 3 | |
12552 | ||
12553 | ||
12554 | ||
12555 | ||
12556 | ||
12557 | ||
12558 | gsize g_printf_string_upper_bound (const gchar* format, | |
12559 | va_list args); | |
12560 | # 58 "/usr/include/glib-2.0/glib/gmessages.h" 3 | |
12561 | typedef enum | |
12562 | { | |
12563 | ||
12564 | G_LOG_FLAG_RECURSION = 1 << 0, | |
12565 | G_LOG_FLAG_FATAL = 1 << 1, | |
12566 | ||
12567 | ||
12568 | G_LOG_LEVEL_ERROR = 1 << 2, | |
12569 | G_LOG_LEVEL_CRITICAL = 1 << 3, | |
12570 | G_LOG_LEVEL_WARNING = 1 << 4, | |
12571 | G_LOG_LEVEL_MESSAGE = 1 << 5, | |
12572 | G_LOG_LEVEL_INFO = 1 << 6, | |
12573 | G_LOG_LEVEL_DEBUG = 1 << 7, | |
12574 | ||
12575 | G_LOG_LEVEL_MASK = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL) | |
12576 | } GLogLevelFlags; | |
12577 | ||
12578 | ||
12579 | ||
12580 | ||
12581 | typedef void (*GLogFunc) (const gchar *log_domain, | |
12582 | GLogLevelFlags log_level, | |
12583 | const gchar *message, | |
12584 | gpointer user_data); | |
12585 | ||
12586 | ||
12587 | ||
12588 | guint g_log_set_handler (const gchar *log_domain, | |
12589 | GLogLevelFlags log_levels, | |
12590 | GLogFunc log_func, | |
12591 | gpointer user_data); | |
12592 | void g_log_remove_handler (const gchar *log_domain, | |
12593 | guint handler_id); | |
12594 | void g_log_default_handler (const gchar *log_domain, | |
12595 | GLogLevelFlags log_level, | |
12596 | const gchar *message, | |
12597 | gpointer unused_data); | |
12598 | GLogFunc g_log_set_default_handler (GLogFunc log_func, | |
12599 | gpointer user_data); | |
12600 | void g_log (const gchar *log_domain, | |
12601 | GLogLevelFlags log_level, | |
12602 | const gchar *format, | |
12603 | ...) __attribute__((__format__ (__printf__, 3, 4))); | |
12604 | void g_logv (const gchar *log_domain, | |
12605 | GLogLevelFlags log_level, | |
12606 | const gchar *format, | |
12607 | va_list args); | |
12608 | GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, | |
12609 | GLogLevelFlags fatal_mask); | |
12610 | GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); | |
12611 | ||
12612 | ||
12613 | __attribute__((visibility("hidden"))) void _g_log_fallback_handler (const gchar *log_domain, | |
12614 | GLogLevelFlags log_level, | |
12615 | const gchar *message, | |
12616 | gpointer unused_data); | |
12617 | ||
12618 | ||
12619 | void g_return_if_fail_warning (const char *log_domain, | |
12620 | const char *pretty_function, | |
12621 | const char *expression); | |
12622 | void g_warn_message (const char *domain, | |
12623 | const char *file, | |
12624 | int line, | |
12625 | const char *func, | |
12626 | const char *warnexpr); | |
12627 | __attribute__((__deprecated__)) | |
12628 | void g_assert_warning (const char *log_domain, | |
12629 | const char *file, | |
12630 | const int line, | |
12631 | const char *pretty_function, | |
12632 | const char *expression) __attribute__((__noreturn__)); | |
12633 | # 235 "/usr/include/glib-2.0/glib/gmessages.h" 3 | |
12634 | typedef void (*GPrintFunc) (const gchar *string); | |
12635 | void g_print (const gchar *format, | |
12636 | ...) __attribute__((__format__ (__printf__, 1, 2))); | |
12637 | GPrintFunc g_set_print_handler (GPrintFunc func); | |
12638 | void g_printerr (const gchar *format, | |
12639 | ...) __attribute__((__format__ (__printf__, 1, 2))); | |
12640 | GPrintFunc g_set_printerr_handler (GPrintFunc func); | |
12641 | # 402 "/usr/include/glib-2.0/glib/gmessages.h" 3 | |
12642 | ||
12643 | # 65 "/usr/include/glib-2.0/glib.h" 2 | |
12644 | # 1 "/usr/include/glib-2.0/glib/gnode.h" 1 | |
12645 | # 34 "/usr/include/glib-2.0/glib/gnode.h" | |
12646 | # 1 "/usr/include/glib-2.0/glib/gmem.h" 1 | |
12647 | # 35 "/usr/include/glib-2.0/glib/gnode.h" 2 | |
12648 | ||
12649 | ||
12650 | ||
12651 | typedef struct _GNode GNode; | |
12652 | ||
12653 | ||
12654 | typedef enum | |
12655 | { | |
12656 | G_TRAVERSE_LEAVES = 1 << 0, | |
12657 | G_TRAVERSE_NON_LEAVES = 1 << 1, | |
12658 | G_TRAVERSE_ALL = G_TRAVERSE_LEAVES | G_TRAVERSE_NON_LEAVES, | |
12659 | G_TRAVERSE_MASK = 0x03, | |
12660 | G_TRAVERSE_LEAFS = G_TRAVERSE_LEAVES, | |
12661 | G_TRAVERSE_NON_LEAFS = G_TRAVERSE_NON_LEAVES | |
12662 | } GTraverseFlags; | |
12663 | ||
12664 | ||
12665 | typedef enum | |
12666 | { | |
12667 | G_IN_ORDER, | |
12668 | G_PRE_ORDER, | |
12669 | G_POST_ORDER, | |
12670 | G_LEVEL_ORDER | |
12671 | } GTraverseType; | |
12672 | ||
12673 | typedef gboolean (*GNodeTraverseFunc) (GNode *node, | |
12674 | gpointer data); | |
12675 | typedef void (*GNodeForeachFunc) (GNode *node, | |
12676 | gpointer data); | |
12677 | # 77 "/usr/include/glib-2.0/glib/gnode.h" | |
12678 | typedef gpointer (*GCopyFunc) (gconstpointer src, | |
12679 | gpointer data); | |
12680 | ||
12681 | ||
12682 | ||
12683 | struct _GNode | |
12684 | { | |
12685 | gpointer data; | |
12686 | GNode *next; | |
12687 | GNode *prev; | |
12688 | GNode *parent; | |
12689 | GNode *children; | |
12690 | }; | |
12691 | # 115 "/usr/include/glib-2.0/glib/gnode.h" | |
12692 | GNode* g_node_new (gpointer data); | |
12693 | void g_node_destroy (GNode *root); | |
12694 | void g_node_unlink (GNode *node); | |
12695 | GNode* g_node_copy_deep (GNode *node, | |
12696 | GCopyFunc copy_func, | |
12697 | gpointer data); | |
12698 | GNode* g_node_copy (GNode *node); | |
12699 | GNode* g_node_insert (GNode *parent, | |
12700 | gint position, | |
12701 | GNode *node); | |
12702 | GNode* g_node_insert_before (GNode *parent, | |
12703 | GNode *sibling, | |
12704 | GNode *node); | |
12705 | GNode* g_node_insert_after (GNode *parent, | |
12706 | GNode *sibling, | |
12707 | GNode *node); | |
12708 | GNode* g_node_prepend (GNode *parent, | |
12709 | GNode *node); | |
12710 | guint g_node_n_nodes (GNode *root, | |
12711 | GTraverseFlags flags); | |
12712 | GNode* g_node_get_root (GNode *node); | |
12713 | gboolean g_node_is_ancestor (GNode *node, | |
12714 | GNode *descendant); | |
12715 | guint g_node_depth (GNode *node); | |
12716 | GNode* g_node_find (GNode *root, | |
12717 | GTraverseType order, | |
12718 | GTraverseFlags flags, | |
12719 | gpointer data); | |
12720 | # 226 "/usr/include/glib-2.0/glib/gnode.h" | |
12721 | void g_node_traverse (GNode *root, | |
12722 | GTraverseType order, | |
12723 | GTraverseFlags flags, | |
12724 | gint max_depth, | |
12725 | GNodeTraverseFunc func, | |
12726 | gpointer data); | |
12727 | ||
12728 | ||
12729 | ||
12730 | ||
12731 | ||
12732 | ||
12733 | guint g_node_max_height (GNode *root); | |
12734 | ||
12735 | void g_node_children_foreach (GNode *node, | |
12736 | GTraverseFlags flags, | |
12737 | GNodeForeachFunc func, | |
12738 | gpointer data); | |
12739 | void g_node_reverse_children (GNode *node); | |
12740 | guint g_node_n_children (GNode *node); | |
12741 | GNode* g_node_nth_child (GNode *node, | |
12742 | guint n); | |
12743 | GNode* g_node_last_child (GNode *node); | |
12744 | GNode* g_node_find_child (GNode *node, | |
12745 | GTraverseFlags flags, | |
12746 | gpointer data); | |
12747 | gint g_node_child_position (GNode *node, | |
12748 | GNode *child); | |
12749 | gint g_node_child_index (GNode *node, | |
12750 | gpointer data); | |
12751 | ||
12752 | GNode* g_node_first_sibling (GNode *node); | |
12753 | GNode* g_node_last_sibling (GNode *node); | |
12754 | # 296 "/usr/include/glib-2.0/glib/gnode.h" | |
12755 | ||
12756 | # 66 "/usr/include/glib-2.0/glib.h" 2 | |
12757 | # 1 "/usr/include/glib-2.0/glib/goption.h" 1 | |
12758 | # 28 "/usr/include/glib-2.0/glib/goption.h" | |
12759 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
12760 | # 29 "/usr/include/glib-2.0/glib/goption.h" 2 | |
12761 | # 1 "/usr/include/glib-2.0/glib/gquark.h" 1 | |
12762 | # 30 "/usr/include/glib-2.0/glib/goption.h" 2 | |
12763 | ||
12764 | ||
12765 | # 40 "/usr/include/glib-2.0/glib/goption.h" | |
12766 | typedef struct _GOptionContext GOptionContext; | |
12767 | # 53 "/usr/include/glib-2.0/glib/goption.h" | |
12768 | typedef struct _GOptionGroup GOptionGroup; | |
12769 | typedef struct _GOptionEntry GOptionEntry; | |
12770 | # 82 "/usr/include/glib-2.0/glib/goption.h" | |
12771 | typedef enum | |
12772 | { | |
12773 | G_OPTION_FLAG_HIDDEN = 1 << 0, | |
12774 | G_OPTION_FLAG_IN_MAIN = 1 << 1, | |
12775 | G_OPTION_FLAG_REVERSE = 1 << 2, | |
12776 | G_OPTION_FLAG_NO_ARG = 1 << 3, | |
12777 | G_OPTION_FLAG_FILENAME = 1 << 4, | |
12778 | G_OPTION_FLAG_OPTIONAL_ARG = 1 << 5, | |
12779 | G_OPTION_FLAG_NOALIAS = 1 << 6 | |
12780 | } GOptionFlags; | |
12781 | # 118 "/usr/include/glib-2.0/glib/goption.h" | |
12782 | typedef enum | |
12783 | { | |
12784 | G_OPTION_ARG_NONE, | |
12785 | G_OPTION_ARG_STRING, | |
12786 | G_OPTION_ARG_INT, | |
12787 | G_OPTION_ARG_CALLBACK, | |
12788 | G_OPTION_ARG_FILENAME, | |
12789 | G_OPTION_ARG_STRING_ARRAY, | |
12790 | G_OPTION_ARG_FILENAME_ARRAY, | |
12791 | G_OPTION_ARG_DOUBLE, | |
12792 | G_OPTION_ARG_INT64 | |
12793 | } GOptionArg; | |
12794 | # 148 "/usr/include/glib-2.0/glib/goption.h" | |
12795 | typedef gboolean (*GOptionArgFunc) (const gchar *option_name, | |
12796 | const gchar *value, | |
12797 | gpointer data, | |
12798 | GError **error); | |
12799 | # 166 "/usr/include/glib-2.0/glib/goption.h" | |
12800 | typedef gboolean (*GOptionParseFunc) (GOptionContext *context, | |
12801 | GOptionGroup *group, | |
12802 | gpointer data, | |
12803 | GError **error); | |
12804 | # 181 "/usr/include/glib-2.0/glib/goption.h" | |
12805 | typedef void (*GOptionErrorFunc) (GOptionContext *context, | |
12806 | GOptionGroup *group, | |
12807 | gpointer data, | |
12808 | GError **error); | |
12809 | # 205 "/usr/include/glib-2.0/glib/goption.h" | |
12810 | typedef enum | |
12811 | { | |
12812 | G_OPTION_ERROR_UNKNOWN_OPTION, | |
12813 | G_OPTION_ERROR_BAD_VALUE, | |
12814 | G_OPTION_ERROR_FAILED | |
12815 | } GOptionError; | |
12816 | ||
12817 | GQuark g_option_error_quark (void); | |
12818 | # 279 "/usr/include/glib-2.0/glib/goption.h" | |
12819 | struct _GOptionEntry | |
12820 | { | |
12821 | const gchar *long_name; | |
12822 | gchar short_name; | |
12823 | gint flags; | |
12824 | ||
12825 | GOptionArg arg; | |
12826 | gpointer arg_data; | |
12827 | ||
12828 | const gchar *description; | |
12829 | const gchar *arg_description; | |
12830 | }; | |
12831 | # 310 "/usr/include/glib-2.0/glib/goption.h" | |
12832 | GOptionContext *g_option_context_new (const gchar *parameter_string); | |
12833 | void g_option_context_set_summary (GOptionContext *context, | |
12834 | const gchar *summary); | |
12835 | const gchar * g_option_context_get_summary (GOptionContext *context); | |
12836 | void g_option_context_set_description (GOptionContext *context, | |
12837 | const gchar *description); | |
12838 | const gchar * g_option_context_get_description (GOptionContext *context); | |
12839 | void g_option_context_free (GOptionContext *context); | |
12840 | void g_option_context_set_help_enabled (GOptionContext *context, | |
12841 | gboolean help_enabled); | |
12842 | gboolean g_option_context_get_help_enabled (GOptionContext *context); | |
12843 | void g_option_context_set_ignore_unknown_options (GOptionContext *context, | |
12844 | gboolean ignore_unknown); | |
12845 | gboolean g_option_context_get_ignore_unknown_options (GOptionContext *context); | |
12846 | ||
12847 | void g_option_context_add_main_entries (GOptionContext *context, | |
12848 | const GOptionEntry *entries, | |
12849 | const gchar *translation_domain); | |
12850 | gboolean g_option_context_parse (GOptionContext *context, | |
12851 | gint *argc, | |
12852 | gchar ***argv, | |
12853 | GError **error); | |
12854 | void g_option_context_set_translate_func (GOptionContext *context, | |
12855 | GTranslateFunc func, | |
12856 | gpointer data, | |
12857 | GDestroyNotify destroy_notify); | |
12858 | void g_option_context_set_translation_domain (GOptionContext *context, | |
12859 | const gchar *domain); | |
12860 | ||
12861 | void g_option_context_add_group (GOptionContext *context, | |
12862 | GOptionGroup *group); | |
12863 | void g_option_context_set_main_group (GOptionContext *context, | |
12864 | GOptionGroup *group); | |
12865 | GOptionGroup *g_option_context_get_main_group (GOptionContext *context); | |
12866 | gchar *g_option_context_get_help (GOptionContext *context, | |
12867 | gboolean main_help, | |
12868 | GOptionGroup *group); | |
12869 | ||
12870 | GOptionGroup *g_option_group_new (const gchar *name, | |
12871 | const gchar *description, | |
12872 | const gchar *help_description, | |
12873 | gpointer user_data, | |
12874 | GDestroyNotify destroy); | |
12875 | void g_option_group_set_parse_hooks (GOptionGroup *group, | |
12876 | GOptionParseFunc pre_parse_func, | |
12877 | GOptionParseFunc post_parse_func); | |
12878 | void g_option_group_set_error_hook (GOptionGroup *group, | |
12879 | GOptionErrorFunc error_func); | |
12880 | void g_option_group_free (GOptionGroup *group); | |
12881 | void g_option_group_add_entries (GOptionGroup *group, | |
12882 | const GOptionEntry *entries); | |
12883 | void g_option_group_set_translate_func (GOptionGroup *group, | |
12884 | GTranslateFunc func, | |
12885 | gpointer data, | |
12886 | GDestroyNotify destroy_notify); | |
12887 | void g_option_group_set_translation_domain (GOptionGroup *group, | |
12888 | const gchar *domain); | |
12889 | ||
12890 | ||
12891 | # 67 "/usr/include/glib-2.0/glib.h" 2 | |
12892 | # 1 "/usr/include/glib-2.0/glib/gpattern.h" 1 | |
12893 | # 27 "/usr/include/glib-2.0/glib/gpattern.h" | |
12894 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
12895 | # 28 "/usr/include/glib-2.0/glib/gpattern.h" 2 | |
12896 | ||
12897 | ||
12898 | ||
12899 | ||
12900 | typedef struct _GPatternSpec GPatternSpec; | |
12901 | ||
12902 | GPatternSpec* g_pattern_spec_new (const gchar *pattern); | |
12903 | void g_pattern_spec_free (GPatternSpec *pspec); | |
12904 | gboolean g_pattern_spec_equal (GPatternSpec *pspec1, | |
12905 | GPatternSpec *pspec2); | |
12906 | gboolean g_pattern_match (GPatternSpec *pspec, | |
12907 | guint string_length, | |
12908 | const gchar *string, | |
12909 | const gchar *string_reversed); | |
12910 | gboolean g_pattern_match_string (GPatternSpec *pspec, | |
12911 | const gchar *string); | |
12912 | gboolean g_pattern_match_simple (const gchar *pattern, | |
12913 | const gchar *string); | |
12914 | ||
12915 | ||
12916 | # 68 "/usr/include/glib-2.0/glib.h" 2 | |
12917 | # 1 "/usr/include/glib-2.0/glib/gpoll.h" 1 | |
12918 | # 69 "/usr/include/glib-2.0/glib.h" 2 | |
12919 | # 1 "/usr/include/glib-2.0/glib/gprimes.h" 1 | |
12920 | # 34 "/usr/include/glib-2.0/glib/gprimes.h" | |
12921 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
12922 | # 35 "/usr/include/glib-2.0/glib/gprimes.h" 2 | |
12923 | ||
12924 | ||
12925 | # 47 "/usr/include/glib-2.0/glib/gprimes.h" | |
12926 | guint g_spaced_primes_closest (guint num) __attribute__((__const__)); | |
12927 | ||
12928 | ||
12929 | # 70 "/usr/include/glib-2.0/glib.h" 2 | |
12930 | # 1 "/usr/include/glib-2.0/glib/gqsort.h" 1 | |
12931 | # 34 "/usr/include/glib-2.0/glib/gqsort.h" | |
12932 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
12933 | # 35 "/usr/include/glib-2.0/glib/gqsort.h" 2 | |
12934 | ||
12935 | ||
12936 | ||
12937 | void g_qsort_with_data (gconstpointer pbase, | |
12938 | gint total_elems, | |
12939 | gsize size, | |
12940 | GCompareDataFunc compare_func, | |
12941 | gpointer user_data); | |
12942 | ||
12943 | ||
12944 | # 71 "/usr/include/glib-2.0/glib.h" 2 | |
12945 | # 1 "/usr/include/glib-2.0/glib/gquark.h" 1 | |
12946 | # 72 "/usr/include/glib-2.0/glib.h" 2 | |
12947 | # 1 "/usr/include/glib-2.0/glib/gqueue.h" 1 | |
12948 | # 34 "/usr/include/glib-2.0/glib/gqueue.h" | |
12949 | # 1 "/usr/include/glib-2.0/glib/glist.h" 1 | |
12950 | # 35 "/usr/include/glib-2.0/glib/gqueue.h" 2 | |
12951 | ||
12952 | ||
12953 | ||
12954 | typedef struct _GQueue GQueue; | |
12955 | # 49 "/usr/include/glib-2.0/glib/gqueue.h" | |
12956 | struct _GQueue | |
12957 | { | |
12958 | GList *head; | |
12959 | GList *tail; | |
12960 | guint length; | |
12961 | }; | |
12962 | # 74 "/usr/include/glib-2.0/glib/gqueue.h" | |
12963 | GQueue* g_queue_new (void); | |
12964 | void g_queue_free (GQueue *queue); | |
12965 | void g_queue_free_full (GQueue *queue, | |
12966 | GDestroyNotify free_func); | |
12967 | void g_queue_init (GQueue *queue); | |
12968 | void g_queue_clear (GQueue *queue); | |
12969 | gboolean g_queue_is_empty (GQueue *queue); | |
12970 | guint g_queue_get_length (GQueue *queue); | |
12971 | void g_queue_reverse (GQueue *queue); | |
12972 | GQueue * g_queue_copy (GQueue *queue); | |
12973 | void g_queue_foreach (GQueue *queue, | |
12974 | GFunc func, | |
12975 | gpointer user_data); | |
12976 | GList * g_queue_find (GQueue *queue, | |
12977 | gconstpointer data); | |
12978 | GList * g_queue_find_custom (GQueue *queue, | |
12979 | gconstpointer data, | |
12980 | GCompareFunc func); | |
12981 | void g_queue_sort (GQueue *queue, | |
12982 | GCompareDataFunc compare_func, | |
12983 | gpointer user_data); | |
12984 | ||
12985 | void g_queue_push_head (GQueue *queue, | |
12986 | gpointer data); | |
12987 | void g_queue_push_tail (GQueue *queue, | |
12988 | gpointer data); | |
12989 | void g_queue_push_nth (GQueue *queue, | |
12990 | gpointer data, | |
12991 | gint n); | |
12992 | gpointer g_queue_pop_head (GQueue *queue); | |
12993 | gpointer g_queue_pop_tail (GQueue *queue); | |
12994 | gpointer g_queue_pop_nth (GQueue *queue, | |
12995 | guint n); | |
12996 | gpointer g_queue_peek_head (GQueue *queue); | |
12997 | gpointer g_queue_peek_tail (GQueue *queue); | |
12998 | gpointer g_queue_peek_nth (GQueue *queue, | |
12999 | guint n); | |
13000 | gint g_queue_index (GQueue *queue, | |
13001 | gconstpointer data); | |
13002 | gboolean g_queue_remove (GQueue *queue, | |
13003 | gconstpointer data); | |
13004 | guint g_queue_remove_all (GQueue *queue, | |
13005 | gconstpointer data); | |
13006 | void g_queue_insert_before (GQueue *queue, | |
13007 | GList *sibling, | |
13008 | gpointer data); | |
13009 | void g_queue_insert_after (GQueue *queue, | |
13010 | GList *sibling, | |
13011 | gpointer data); | |
13012 | void g_queue_insert_sorted (GQueue *queue, | |
13013 | gpointer data, | |
13014 | GCompareDataFunc func, | |
13015 | gpointer user_data); | |
13016 | ||
13017 | void g_queue_push_head_link (GQueue *queue, | |
13018 | GList *link_); | |
13019 | void g_queue_push_tail_link (GQueue *queue, | |
13020 | GList *link_); | |
13021 | void g_queue_push_nth_link (GQueue *queue, | |
13022 | gint n, | |
13023 | GList *link_); | |
13024 | GList* g_queue_pop_head_link (GQueue *queue); | |
13025 | GList* g_queue_pop_tail_link (GQueue *queue); | |
13026 | GList* g_queue_pop_nth_link (GQueue *queue, | |
13027 | guint n); | |
13028 | GList* g_queue_peek_head_link (GQueue *queue); | |
13029 | GList* g_queue_peek_tail_link (GQueue *queue); | |
13030 | GList* g_queue_peek_nth_link (GQueue *queue, | |
13031 | guint n); | |
13032 | gint g_queue_link_index (GQueue *queue, | |
13033 | GList *link_); | |
13034 | void g_queue_unlink (GQueue *queue, | |
13035 | GList *link_); | |
13036 | void g_queue_delete_link (GQueue *queue, | |
13037 | GList *link_); | |
13038 | ||
13039 | ||
13040 | # 73 "/usr/include/glib-2.0/glib.h" 2 | |
13041 | # 1 "/usr/include/glib-2.0/glib/grand.h" 1 | |
13042 | # 34 "/usr/include/glib-2.0/glib/grand.h" | |
13043 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
13044 | # 35 "/usr/include/glib-2.0/glib/grand.h" 2 | |
13045 | ||
13046 | ||
13047 | ||
13048 | typedef struct _GRand GRand; | |
13049 | # 49 "/usr/include/glib-2.0/glib/grand.h" | |
13050 | GRand* g_rand_new_with_seed (guint32 seed); | |
13051 | GRand* g_rand_new_with_seed_array (const guint32 *seed, | |
13052 | guint seed_length); | |
13053 | GRand* g_rand_new (void); | |
13054 | void g_rand_free (GRand *rand_); | |
13055 | GRand* g_rand_copy (GRand *rand_); | |
13056 | void g_rand_set_seed (GRand *rand_, | |
13057 | guint32 seed); | |
13058 | void g_rand_set_seed_array (GRand *rand_, | |
13059 | const guint32 *seed, | |
13060 | guint seed_length); | |
13061 | ||
13062 | ||
13063 | ||
13064 | guint32 g_rand_int (GRand *rand_); | |
13065 | gint32 g_rand_int_range (GRand *rand_, | |
13066 | gint32 begin, | |
13067 | gint32 end); | |
13068 | gdouble g_rand_double (GRand *rand_); | |
13069 | gdouble g_rand_double_range (GRand *rand_, | |
13070 | gdouble begin, | |
13071 | gdouble end); | |
13072 | void g_random_set_seed (guint32 seed); | |
13073 | ||
13074 | ||
13075 | ||
13076 | guint32 g_random_int (void); | |
13077 | gint32 g_random_int_range (gint32 begin, | |
13078 | gint32 end); | |
13079 | gdouble g_random_double (void); | |
13080 | gdouble g_random_double_range (gdouble begin, | |
13081 | gdouble end); | |
13082 | ||
13083 | ||
13084 | ||
13085 | # 74 "/usr/include/glib-2.0/glib.h" 2 | |
13086 | # 1 "/usr/include/glib-2.0/glib/gregex.h" 1 | |
13087 | # 29 "/usr/include/glib-2.0/glib/gregex.h" | |
13088 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
13089 | # 30 "/usr/include/glib-2.0/glib/gregex.h" 2 | |
13090 | # 1 "/usr/include/glib-2.0/glib/gstring.h" 1 | |
13091 | # 31 "/usr/include/glib-2.0/glib/gregex.h" 2 | |
13092 | ||
13093 | ||
13094 | # 117 "/usr/include/glib-2.0/glib/gregex.h" | |
13095 | typedef enum | |
13096 | { | |
13097 | G_REGEX_ERROR_COMPILE, | |
13098 | G_REGEX_ERROR_OPTIMIZE, | |
13099 | G_REGEX_ERROR_REPLACE, | |
13100 | G_REGEX_ERROR_MATCH, | |
13101 | G_REGEX_ERROR_INTERNAL, | |
13102 | ||
13103 | ||
13104 | G_REGEX_ERROR_STRAY_BACKSLASH = 101, | |
13105 | G_REGEX_ERROR_MISSING_CONTROL_CHAR = 102, | |
13106 | G_REGEX_ERROR_UNRECOGNIZED_ESCAPE = 103, | |
13107 | G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER = 104, | |
13108 | G_REGEX_ERROR_QUANTIFIER_TOO_BIG = 105, | |
13109 | G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS = 106, | |
13110 | G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS = 107, | |
13111 | G_REGEX_ERROR_RANGE_OUT_OF_ORDER = 108, | |
13112 | G_REGEX_ERROR_NOTHING_TO_REPEAT = 109, | |
13113 | G_REGEX_ERROR_UNRECOGNIZED_CHARACTER = 112, | |
13114 | G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113, | |
13115 | G_REGEX_ERROR_UNMATCHED_PARENTHESIS = 114, | |
13116 | G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE = 115, | |
13117 | G_REGEX_ERROR_UNTERMINATED_COMMENT = 118, | |
13118 | G_REGEX_ERROR_EXPRESSION_TOO_LARGE = 120, | |
13119 | G_REGEX_ERROR_MEMORY_ERROR = 121, | |
13120 | G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND = 125, | |
13121 | G_REGEX_ERROR_MALFORMED_CONDITION = 126, | |
13122 | G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES = 127, | |
13123 | G_REGEX_ERROR_ASSERTION_EXPECTED = 128, | |
13124 | G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME = 130, | |
13125 | G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131, | |
13126 | G_REGEX_ERROR_HEX_CODE_TOO_LARGE = 134, | |
13127 | G_REGEX_ERROR_INVALID_CONDITION = 135, | |
13128 | G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136, | |
13129 | G_REGEX_ERROR_INFINITE_LOOP = 140, | |
13130 | G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR = 142, | |
13131 | G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME = 143, | |
13132 | G_REGEX_ERROR_MALFORMED_PROPERTY = 146, | |
13133 | G_REGEX_ERROR_UNKNOWN_PROPERTY = 147, | |
13134 | G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG = 148, | |
13135 | G_REGEX_ERROR_TOO_MANY_SUBPATTERNS = 149, | |
13136 | G_REGEX_ERROR_INVALID_OCTAL_VALUE = 151, | |
13137 | G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE = 154, | |
13138 | G_REGEX_ERROR_DEFINE_REPETION = 155, | |
13139 | G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS = 156, | |
13140 | G_REGEX_ERROR_MISSING_BACK_REFERENCE = 157 | |
13141 | } GRegexError; | |
13142 | # 176 "/usr/include/glib-2.0/glib/gregex.h" | |
13143 | GQuark g_regex_error_quark (void); | |
13144 | # 243 "/usr/include/glib-2.0/glib/gregex.h" | |
13145 | typedef enum | |
13146 | { | |
13147 | G_REGEX_CASELESS = 1 << 0, | |
13148 | G_REGEX_MULTILINE = 1 << 1, | |
13149 | G_REGEX_DOTALL = 1 << 2, | |
13150 | G_REGEX_EXTENDED = 1 << 3, | |
13151 | G_REGEX_ANCHORED = 1 << 4, | |
13152 | G_REGEX_DOLLAR_ENDONLY = 1 << 5, | |
13153 | G_REGEX_UNGREEDY = 1 << 9, | |
13154 | G_REGEX_RAW = 1 << 11, | |
13155 | G_REGEX_NO_AUTO_CAPTURE = 1 << 12, | |
13156 | G_REGEX_OPTIMIZE = 1 << 13, | |
13157 | G_REGEX_DUPNAMES = 1 << 19, | |
13158 | G_REGEX_NEWLINE_CR = 1 << 20, | |
13159 | G_REGEX_NEWLINE_LF = 1 << 21, | |
13160 | G_REGEX_NEWLINE_CRLF = G_REGEX_NEWLINE_CR | G_REGEX_NEWLINE_LF | |
13161 | } GRegexCompileFlags; | |
13162 | # 306 "/usr/include/glib-2.0/glib/gregex.h" | |
13163 | typedef enum | |
13164 | { | |
13165 | G_REGEX_MATCH_ANCHORED = 1 << 4, | |
13166 | G_REGEX_MATCH_NOTBOL = 1 << 7, | |
13167 | G_REGEX_MATCH_NOTEOL = 1 << 8, | |
13168 | G_REGEX_MATCH_NOTEMPTY = 1 << 10, | |
13169 | G_REGEX_MATCH_PARTIAL = 1 << 15, | |
13170 | G_REGEX_MATCH_NEWLINE_CR = 1 << 20, | |
13171 | G_REGEX_MATCH_NEWLINE_LF = 1 << 21, | |
13172 | G_REGEX_MATCH_NEWLINE_CRLF = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_LF, | |
13173 | G_REGEX_MATCH_NEWLINE_ANY = 1 << 22 | |
13174 | } GRegexMatchFlags; | |
13175 | # 327 "/usr/include/glib-2.0/glib/gregex.h" | |
13176 | typedef struct _GRegex GRegex; | |
13177 | ||
13178 | ||
13179 | typedef struct _GMatchInfo GMatchInfo; | |
13180 | # 349 "/usr/include/glib-2.0/glib/gregex.h" | |
13181 | typedef gboolean (*GRegexEvalCallback) (const GMatchInfo *match_info, | |
13182 | GString *result, | |
13183 | gpointer user_data); | |
13184 | ||
13185 | ||
13186 | GRegex *g_regex_new (const gchar *pattern, | |
13187 | GRegexCompileFlags compile_options, | |
13188 | GRegexMatchFlags match_options, | |
13189 | GError **error); | |
13190 | GRegex *g_regex_ref (GRegex *regex); | |
13191 | void g_regex_unref (GRegex *regex); | |
13192 | const gchar *g_regex_get_pattern (const GRegex *regex); | |
13193 | gint g_regex_get_max_backref (const GRegex *regex); | |
13194 | gint g_regex_get_capture_count (const GRegex *regex); | |
13195 | gint g_regex_get_string_number (const GRegex *regex, | |
13196 | const gchar *name); | |
13197 | gchar *g_regex_escape_string (const gchar *string, | |
13198 | gint length); | |
13199 | gchar *g_regex_escape_nul (const gchar *string, | |
13200 | gint length); | |
13201 | ||
13202 | GRegexCompileFlags g_regex_get_compile_flags (const GRegex *regex); | |
13203 | GRegexMatchFlags g_regex_get_match_flags (const GRegex *regex); | |
13204 | ||
13205 | ||
13206 | gboolean g_regex_match_simple (const gchar *pattern, | |
13207 | const gchar *string, | |
13208 | GRegexCompileFlags compile_options, | |
13209 | GRegexMatchFlags match_options); | |
13210 | gboolean g_regex_match (const GRegex *regex, | |
13211 | const gchar *string, | |
13212 | GRegexMatchFlags match_options, | |
13213 | GMatchInfo **match_info); | |
13214 | gboolean g_regex_match_full (const GRegex *regex, | |
13215 | const gchar *string, | |
13216 | gssize string_len, | |
13217 | gint start_position, | |
13218 | GRegexMatchFlags match_options, | |
13219 | GMatchInfo **match_info, | |
13220 | GError **error); | |
13221 | gboolean g_regex_match_all (const GRegex *regex, | |
13222 | const gchar *string, | |
13223 | GRegexMatchFlags match_options, | |
13224 | GMatchInfo **match_info); | |
13225 | gboolean g_regex_match_all_full (const GRegex *regex, | |
13226 | const gchar *string, | |
13227 | gssize string_len, | |
13228 | gint start_position, | |
13229 | GRegexMatchFlags match_options, | |
13230 | GMatchInfo **match_info, | |
13231 | GError **error); | |
13232 | ||
13233 | ||
13234 | gchar **g_regex_split_simple (const gchar *pattern, | |
13235 | const gchar *string, | |
13236 | GRegexCompileFlags compile_options, | |
13237 | GRegexMatchFlags match_options); | |
13238 | gchar **g_regex_split (const GRegex *regex, | |
13239 | const gchar *string, | |
13240 | GRegexMatchFlags match_options); | |
13241 | gchar **g_regex_split_full (const GRegex *regex, | |
13242 | const gchar *string, | |
13243 | gssize string_len, | |
13244 | gint start_position, | |
13245 | GRegexMatchFlags match_options, | |
13246 | gint max_tokens, | |
13247 | GError **error); | |
13248 | ||
13249 | ||
13250 | gchar *g_regex_replace (const GRegex *regex, | |
13251 | const gchar *string, | |
13252 | gssize string_len, | |
13253 | gint start_position, | |
13254 | const gchar *replacement, | |
13255 | GRegexMatchFlags match_options, | |
13256 | GError **error); | |
13257 | gchar *g_regex_replace_literal (const GRegex *regex, | |
13258 | const gchar *string, | |
13259 | gssize string_len, | |
13260 | gint start_position, | |
13261 | const gchar *replacement, | |
13262 | GRegexMatchFlags match_options, | |
13263 | GError **error); | |
13264 | gchar *g_regex_replace_eval (const GRegex *regex, | |
13265 | const gchar *string, | |
13266 | gssize string_len, | |
13267 | gint start_position, | |
13268 | GRegexMatchFlags match_options, | |
13269 | GRegexEvalCallback eval, | |
13270 | gpointer user_data, | |
13271 | GError **error); | |
13272 | gboolean g_regex_check_replacement (const gchar *replacement, | |
13273 | gboolean *has_references, | |
13274 | GError **error); | |
13275 | ||
13276 | ||
13277 | GRegex *g_match_info_get_regex (const GMatchInfo *match_info); | |
13278 | const gchar *g_match_info_get_string (const GMatchInfo *match_info); | |
13279 | ||
13280 | GMatchInfo *g_match_info_ref (GMatchInfo *match_info); | |
13281 | void g_match_info_unref (GMatchInfo *match_info); | |
13282 | void g_match_info_free (GMatchInfo *match_info); | |
13283 | gboolean g_match_info_next (GMatchInfo *match_info, | |
13284 | GError **error); | |
13285 | gboolean g_match_info_matches (const GMatchInfo *match_info); | |
13286 | gint g_match_info_get_match_count (const GMatchInfo *match_info); | |
13287 | gboolean g_match_info_is_partial_match (const GMatchInfo *match_info); | |
13288 | gchar *g_match_info_expand_references(const GMatchInfo *match_info, | |
13289 | const gchar *string_to_expand, | |
13290 | GError **error); | |
13291 | gchar *g_match_info_fetch (const GMatchInfo *match_info, | |
13292 | gint match_num); | |
13293 | gboolean g_match_info_fetch_pos (const GMatchInfo *match_info, | |
13294 | gint match_num, | |
13295 | gint *start_pos, | |
13296 | gint *end_pos); | |
13297 | gchar *g_match_info_fetch_named (const GMatchInfo *match_info, | |
13298 | const gchar *name); | |
13299 | gboolean g_match_info_fetch_named_pos (const GMatchInfo *match_info, | |
13300 | const gchar *name, | |
13301 | gint *start_pos, | |
13302 | gint *end_pos); | |
13303 | gchar **g_match_info_fetch_all (const GMatchInfo *match_info); | |
13304 | ||
13305 | ||
13306 | # 75 "/usr/include/glib-2.0/glib.h" 2 | |
13307 | # 1 "/usr/include/glib-2.0/glib/gscanner.h" 1 | |
13308 | # 34 "/usr/include/glib-2.0/glib/gscanner.h" | |
13309 | # 1 "/usr/include/glib-2.0/glib/gdataset.h" 1 | |
13310 | # 35 "/usr/include/glib-2.0/glib/gscanner.h" 2 | |
13311 | # 1 "/usr/include/glib-2.0/glib/ghash.h" 1 | |
13312 | # 36 "/usr/include/glib-2.0/glib/gscanner.h" 2 | |
13313 | ||
13314 | ||
13315 | ||
13316 | typedef struct _GScanner GScanner; | |
13317 | typedef struct _GScannerConfig GScannerConfig; | |
13318 | typedef union _GTokenValue GTokenValue; | |
13319 | ||
13320 | typedef void (*GScannerMsgFunc) (GScanner *scanner, | |
13321 | gchar *message, | |
13322 | gboolean error); | |
13323 | # 64 "/usr/include/glib-2.0/glib/gscanner.h" | |
13324 | typedef enum | |
13325 | { | |
13326 | G_ERR_UNKNOWN, | |
13327 | G_ERR_UNEXP_EOF, | |
13328 | G_ERR_UNEXP_EOF_IN_STRING, | |
13329 | G_ERR_UNEXP_EOF_IN_COMMENT, | |
13330 | G_ERR_NON_DIGIT_IN_CONST, | |
13331 | G_ERR_DIGIT_RADIX, | |
13332 | G_ERR_FLOAT_RADIX, | |
13333 | G_ERR_FLOAT_MALFORMED | |
13334 | } GErrorType; | |
13335 | ||
13336 | ||
13337 | typedef enum | |
13338 | { | |
13339 | G_TOKEN_EOF = 0, | |
13340 | ||
13341 | G_TOKEN_LEFT_PAREN = '(', | |
13342 | G_TOKEN_RIGHT_PAREN = ')', | |
13343 | G_TOKEN_LEFT_CURLY = '{', | |
13344 | G_TOKEN_RIGHT_CURLY = '}', | |
13345 | G_TOKEN_LEFT_BRACE = '[', | |
13346 | G_TOKEN_RIGHT_BRACE = ']', | |
13347 | G_TOKEN_EQUAL_SIGN = '=', | |
13348 | G_TOKEN_COMMA = ',', | |
13349 | ||
13350 | G_TOKEN_NONE = 256, | |
13351 | ||
13352 | G_TOKEN_ERROR, | |
13353 | ||
13354 | G_TOKEN_CHAR, | |
13355 | G_TOKEN_BINARY, | |
13356 | G_TOKEN_OCTAL, | |
13357 | G_TOKEN_INT, | |
13358 | G_TOKEN_HEX, | |
13359 | G_TOKEN_FLOAT, | |
13360 | G_TOKEN_STRING, | |
13361 | ||
13362 | G_TOKEN_SYMBOL, | |
13363 | G_TOKEN_IDENTIFIER, | |
13364 | G_TOKEN_IDENTIFIER_NULL, | |
13365 | ||
13366 | G_TOKEN_COMMENT_SINGLE, | |
13367 | G_TOKEN_COMMENT_MULTI, | |
13368 | ||
13369 | ||
13370 | G_TOKEN_LAST | |
13371 | } GTokenType; | |
13372 | ||
13373 | union _GTokenValue | |
13374 | { | |
13375 | gpointer v_symbol; | |
13376 | gchar *v_identifier; | |
13377 | gulong v_binary; | |
13378 | gulong v_octal; | |
13379 | gulong v_int; | |
13380 | guint64 v_int64; | |
13381 | gdouble v_float; | |
13382 | gulong v_hex; | |
13383 | gchar *v_string; | |
13384 | gchar *v_comment; | |
13385 | guchar v_char; | |
13386 | guint v_error; | |
13387 | }; | |
13388 | ||
13389 | struct _GScannerConfig | |
13390 | { | |
13391 | ||
13392 | ||
13393 | gchar *cset_skip_characters; | |
13394 | gchar *cset_identifier_first; | |
13395 | gchar *cset_identifier_nth; | |
13396 | gchar *cpair_comment_single; | |
13397 | ||
13398 | ||
13399 | ||
13400 | guint case_sensitive : 1; | |
13401 | ||
13402 | ||
13403 | ||
13404 | ||
13405 | guint skip_comment_multi : 1; | |
13406 | guint skip_comment_single : 1; | |
13407 | guint scan_comment_multi : 1; | |
13408 | guint scan_identifier : 1; | |
13409 | guint scan_identifier_1char : 1; | |
13410 | guint scan_identifier_NULL : 1; | |
13411 | guint scan_symbols : 1; | |
13412 | guint scan_binary : 1; | |
13413 | guint scan_octal : 1; | |
13414 | guint scan_float : 1; | |
13415 | guint scan_hex : 1; | |
13416 | guint scan_hex_dollar : 1; | |
13417 | guint scan_string_sq : 1; | |
13418 | guint scan_string_dq : 1; | |
13419 | guint numbers_2_int : 1; | |
13420 | guint int_2_float : 1; | |
13421 | guint identifier_2_string : 1; | |
13422 | guint char_2_token : 1; | |
13423 | guint symbol_2_token : 1; | |
13424 | guint scope_0_fallback : 1; | |
13425 | guint store_int64 : 1; | |
13426 | ||
13427 | ||
13428 | guint padding_dummy; | |
13429 | }; | |
13430 | ||
13431 | struct _GScanner | |
13432 | { | |
13433 | ||
13434 | gpointer user_data; | |
13435 | guint max_parse_errors; | |
13436 | ||
13437 | ||
13438 | guint parse_errors; | |
13439 | ||
13440 | ||
13441 | const gchar *input_name; | |
13442 | ||
13443 | ||
13444 | GData *qdata; | |
13445 | ||
13446 | ||
13447 | GScannerConfig *config; | |
13448 | ||
13449 | ||
13450 | GTokenType token; | |
13451 | GTokenValue value; | |
13452 | guint line; | |
13453 | guint position; | |
13454 | ||
13455 | ||
13456 | GTokenType next_token; | |
13457 | GTokenValue next_value; | |
13458 | guint next_line; | |
13459 | guint next_position; | |
13460 | ||
13461 | ||
13462 | ||
13463 | GHashTable *symbol_table; | |
13464 | gint input_fd; | |
13465 | const gchar *text; | |
13466 | const gchar *text_end; | |
13467 | gchar *buffer; | |
13468 | guint scope_id; | |
13469 | ||
13470 | ||
13471 | ||
13472 | GScannerMsgFunc msg_handler; | |
13473 | }; | |
13474 | ||
13475 | GScanner* g_scanner_new (const GScannerConfig *config_templ); | |
13476 | void g_scanner_destroy (GScanner *scanner); | |
13477 | void g_scanner_input_file (GScanner *scanner, | |
13478 | gint input_fd); | |
13479 | void g_scanner_sync_file_offset (GScanner *scanner); | |
13480 | void g_scanner_input_text (GScanner *scanner, | |
13481 | const gchar *text, | |
13482 | guint text_len); | |
13483 | GTokenType g_scanner_get_next_token (GScanner *scanner); | |
13484 | GTokenType g_scanner_peek_next_token (GScanner *scanner); | |
13485 | GTokenType g_scanner_cur_token (GScanner *scanner); | |
13486 | GTokenValue g_scanner_cur_value (GScanner *scanner); | |
13487 | guint g_scanner_cur_line (GScanner *scanner); | |
13488 | guint g_scanner_cur_position (GScanner *scanner); | |
13489 | gboolean g_scanner_eof (GScanner *scanner); | |
13490 | guint g_scanner_set_scope (GScanner *scanner, | |
13491 | guint scope_id); | |
13492 | void g_scanner_scope_add_symbol (GScanner *scanner, | |
13493 | guint scope_id, | |
13494 | const gchar *symbol, | |
13495 | gpointer value); | |
13496 | void g_scanner_scope_remove_symbol (GScanner *scanner, | |
13497 | guint scope_id, | |
13498 | const gchar *symbol); | |
13499 | gpointer g_scanner_scope_lookup_symbol (GScanner *scanner, | |
13500 | guint scope_id, | |
13501 | const gchar *symbol); | |
13502 | void g_scanner_scope_foreach_symbol (GScanner *scanner, | |
13503 | guint scope_id, | |
13504 | GHFunc func, | |
13505 | gpointer user_data); | |
13506 | gpointer g_scanner_lookup_symbol (GScanner *scanner, | |
13507 | const gchar *symbol); | |
13508 | void g_scanner_unexp_token (GScanner *scanner, | |
13509 | GTokenType expected_token, | |
13510 | const gchar *identifier_spec, | |
13511 | const gchar *symbol_spec, | |
13512 | const gchar *symbol_name, | |
13513 | const gchar *message, | |
13514 | gint is_error); | |
13515 | void g_scanner_error (GScanner *scanner, | |
13516 | const gchar *format, | |
13517 | ...) __attribute__((__format__ (__printf__, 2, 3))); | |
13518 | void g_scanner_warn (GScanner *scanner, | |
13519 | const gchar *format, | |
13520 | ...) __attribute__((__format__ (__printf__, 2, 3))); | |
13521 | # 282 "/usr/include/glib-2.0/glib/gscanner.h" | |
13522 | ||
13523 | # 76 "/usr/include/glib-2.0/glib.h" 2 | |
13524 | # 1 "/usr/include/glib-2.0/glib/gsequence.h" 1 | |
13525 | # 28 "/usr/include/glib-2.0/glib/gsequence.h" | |
13526 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
13527 | # 29 "/usr/include/glib-2.0/glib/gsequence.h" 2 | |
13528 | ||
13529 | ||
13530 | ||
13531 | typedef struct _GSequence GSequence; | |
13532 | typedef struct _GSequenceNode GSequenceIter; | |
13533 | ||
13534 | typedef gint (* GSequenceIterCompareFunc) (GSequenceIter *a, | |
13535 | GSequenceIter *b, | |
13536 | gpointer data); | |
13537 | ||
13538 | ||
13539 | ||
13540 | GSequence * g_sequence_new (GDestroyNotify data_destroy); | |
13541 | void g_sequence_free (GSequence *seq); | |
13542 | gint g_sequence_get_length (GSequence *seq); | |
13543 | void g_sequence_foreach (GSequence *seq, | |
13544 | GFunc func, | |
13545 | gpointer user_data); | |
13546 | void g_sequence_foreach_range (GSequenceIter *begin, | |
13547 | GSequenceIter *end, | |
13548 | GFunc func, | |
13549 | gpointer user_data); | |
13550 | void g_sequence_sort (GSequence *seq, | |
13551 | GCompareDataFunc cmp_func, | |
13552 | gpointer cmp_data); | |
13553 | void g_sequence_sort_iter (GSequence *seq, | |
13554 | GSequenceIterCompareFunc cmp_func, | |
13555 | gpointer cmp_data); | |
13556 | ||
13557 | ||
13558 | ||
13559 | GSequenceIter *g_sequence_get_begin_iter (GSequence *seq); | |
13560 | GSequenceIter *g_sequence_get_end_iter (GSequence *seq); | |
13561 | GSequenceIter *g_sequence_get_iter_at_pos (GSequence *seq, | |
13562 | gint pos); | |
13563 | GSequenceIter *g_sequence_append (GSequence *seq, | |
13564 | gpointer data); | |
13565 | GSequenceIter *g_sequence_prepend (GSequence *seq, | |
13566 | gpointer data); | |
13567 | GSequenceIter *g_sequence_insert_before (GSequenceIter *iter, | |
13568 | gpointer data); | |
13569 | void g_sequence_move (GSequenceIter *src, | |
13570 | GSequenceIter *dest); | |
13571 | void g_sequence_swap (GSequenceIter *a, | |
13572 | GSequenceIter *b); | |
13573 | GSequenceIter *g_sequence_insert_sorted (GSequence *seq, | |
13574 | gpointer data, | |
13575 | GCompareDataFunc cmp_func, | |
13576 | gpointer cmp_data); | |
13577 | GSequenceIter *g_sequence_insert_sorted_iter (GSequence *seq, | |
13578 | gpointer data, | |
13579 | GSequenceIterCompareFunc iter_cmp, | |
13580 | gpointer cmp_data); | |
13581 | void g_sequence_sort_changed (GSequenceIter *iter, | |
13582 | GCompareDataFunc cmp_func, | |
13583 | gpointer cmp_data); | |
13584 | void g_sequence_sort_changed_iter (GSequenceIter *iter, | |
13585 | GSequenceIterCompareFunc iter_cmp, | |
13586 | gpointer cmp_data); | |
13587 | void g_sequence_remove (GSequenceIter *iter); | |
13588 | void g_sequence_remove_range (GSequenceIter *begin, | |
13589 | GSequenceIter *end); | |
13590 | void g_sequence_move_range (GSequenceIter *dest, | |
13591 | GSequenceIter *begin, | |
13592 | GSequenceIter *end); | |
13593 | GSequenceIter *g_sequence_search (GSequence *seq, | |
13594 | gpointer data, | |
13595 | GCompareDataFunc cmp_func, | |
13596 | gpointer cmp_data); | |
13597 | GSequenceIter *g_sequence_search_iter (GSequence *seq, | |
13598 | gpointer data, | |
13599 | GSequenceIterCompareFunc iter_cmp, | |
13600 | gpointer cmp_data); | |
13601 | GSequenceIter *g_sequence_lookup (GSequence *seq, | |
13602 | gpointer data, | |
13603 | GCompareDataFunc cmp_func, | |
13604 | gpointer cmp_data); | |
13605 | GSequenceIter *g_sequence_lookup_iter (GSequence *seq, | |
13606 | gpointer data, | |
13607 | GSequenceIterCompareFunc iter_cmp, | |
13608 | gpointer cmp_data); | |
13609 | ||
13610 | ||
13611 | ||
13612 | gpointer g_sequence_get (GSequenceIter *iter); | |
13613 | void g_sequence_set (GSequenceIter *iter, | |
13614 | gpointer data); | |
13615 | ||
13616 | ||
13617 | gboolean g_sequence_iter_is_begin (GSequenceIter *iter); | |
13618 | gboolean g_sequence_iter_is_end (GSequenceIter *iter); | |
13619 | GSequenceIter *g_sequence_iter_next (GSequenceIter *iter); | |
13620 | GSequenceIter *g_sequence_iter_prev (GSequenceIter *iter); | |
13621 | gint g_sequence_iter_get_position (GSequenceIter *iter); | |
13622 | GSequenceIter *g_sequence_iter_move (GSequenceIter *iter, | |
13623 | gint delta); | |
13624 | GSequence * g_sequence_iter_get_sequence (GSequenceIter *iter); | |
13625 | ||
13626 | ||
13627 | ||
13628 | gint g_sequence_iter_compare (GSequenceIter *a, | |
13629 | GSequenceIter *b); | |
13630 | GSequenceIter *g_sequence_range_get_midpoint (GSequenceIter *begin, | |
13631 | GSequenceIter *end); | |
13632 | ||
13633 | ||
13634 | # 77 "/usr/include/glib-2.0/glib.h" 2 | |
13635 | # 1 "/usr/include/glib-2.0/glib/gshell.h" 1 | |
13636 | # 28 "/usr/include/glib-2.0/glib/gshell.h" | |
13637 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
13638 | # 29 "/usr/include/glib-2.0/glib/gshell.h" 2 | |
13639 | ||
13640 | ||
13641 | ||
13642 | ||
13643 | ||
13644 | typedef enum | |
13645 | { | |
13646 | ||
13647 | G_SHELL_ERROR_BAD_QUOTING, | |
13648 | ||
13649 | G_SHELL_ERROR_EMPTY_STRING, | |
13650 | G_SHELL_ERROR_FAILED | |
13651 | } GShellError; | |
13652 | ||
13653 | GQuark g_shell_error_quark (void); | |
13654 | ||
13655 | gchar* g_shell_quote (const gchar *unquoted_string); | |
13656 | gchar* g_shell_unquote (const gchar *quoted_string, | |
13657 | GError **error); | |
13658 | gboolean g_shell_parse_argv (const gchar *command_line, | |
13659 | gint *argcp, | |
13660 | gchar ***argvp, | |
13661 | GError **error); | |
13662 | ||
13663 | ||
13664 | # 78 "/usr/include/glib-2.0/glib.h" 2 | |
13665 | # 1 "/usr/include/glib-2.0/glib/gslice.h" 1 | |
13666 | # 27 "/usr/include/glib-2.0/glib/gslice.h" | |
13667 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
13668 | # 28 "/usr/include/glib-2.0/glib/gslice.h" 2 | |
13669 | ||
13670 | ||
13671 | ||
13672 | ||
13673 | ||
13674 | gpointer g_slice_alloc (gsize block_size) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); | |
13675 | gpointer g_slice_alloc0 (gsize block_size) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); | |
13676 | gpointer g_slice_copy (gsize block_size, | |
13677 | gconstpointer mem_block) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); | |
13678 | void g_slice_free1 (gsize block_size, | |
13679 | gpointer mem_block); | |
13680 | void g_slice_free_chain_with_offset (gsize block_size, | |
13681 | gpointer mem_chain, | |
13682 | gsize next_offset); | |
13683 | # 72 "/usr/include/glib-2.0/glib/gslice.h" | |
13684 | typedef enum { | |
13685 | G_SLICE_CONFIG_ALWAYS_MALLOC = 1, | |
13686 | G_SLICE_CONFIG_BYPASS_MAGAZINES, | |
13687 | G_SLICE_CONFIG_WORKING_SET_MSECS, | |
13688 | G_SLICE_CONFIG_COLOR_INCREMENT, | |
13689 | G_SLICE_CONFIG_CHUNK_SIZES, | |
13690 | G_SLICE_CONFIG_CONTENTION_COUNTER | |
13691 | } GSliceConfig; | |
13692 | void g_slice_set_config (GSliceConfig ckey, gint64 value); | |
13693 | gint64 g_slice_get_config (GSliceConfig ckey); | |
13694 | gint64* g_slice_get_config_state (GSliceConfig ckey, gint64 address, guint *n_values); | |
13695 | ||
13696 | ||
13697 | # 79 "/usr/include/glib-2.0/glib.h" 2 | |
13698 | # 1 "/usr/include/glib-2.0/glib/gslist.h" 1 | |
13699 | # 80 "/usr/include/glib-2.0/glib.h" 2 | |
13700 | # 1 "/usr/include/glib-2.0/glib/gspawn.h" 1 | |
13701 | # 28 "/usr/include/glib-2.0/glib/gspawn.h" | |
13702 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
13703 | # 29 "/usr/include/glib-2.0/glib/gspawn.h" 2 | |
13704 | ||
13705 | ||
13706 | # 70 "/usr/include/glib-2.0/glib/gspawn.h" | |
13707 | typedef enum | |
13708 | { | |
13709 | G_SPAWN_ERROR_FORK, | |
13710 | G_SPAWN_ERROR_READ, | |
13711 | G_SPAWN_ERROR_CHDIR, | |
13712 | G_SPAWN_ERROR_ACCES, | |
13713 | G_SPAWN_ERROR_PERM, | |
13714 | G_SPAWN_ERROR_TOO_BIG, | |
13715 | ||
13716 | G_SPAWN_ERROR_2BIG = G_SPAWN_ERROR_TOO_BIG, | |
13717 | ||
13718 | G_SPAWN_ERROR_NOEXEC, | |
13719 | G_SPAWN_ERROR_NAMETOOLONG, | |
13720 | G_SPAWN_ERROR_NOENT, | |
13721 | G_SPAWN_ERROR_NOMEM, | |
13722 | G_SPAWN_ERROR_NOTDIR, | |
13723 | G_SPAWN_ERROR_LOOP, | |
13724 | G_SPAWN_ERROR_TXTBUSY, | |
13725 | G_SPAWN_ERROR_IO, | |
13726 | G_SPAWN_ERROR_NFILE, | |
13727 | G_SPAWN_ERROR_MFILE, | |
13728 | G_SPAWN_ERROR_INVAL, | |
13729 | G_SPAWN_ERROR_ISDIR, | |
13730 | G_SPAWN_ERROR_LIBBAD, | |
13731 | G_SPAWN_ERROR_FAILED | |
13732 | ||
13733 | ||
13734 | } GSpawnError; | |
13735 | # 135 "/usr/include/glib-2.0/glib/gspawn.h" | |
13736 | typedef void (* GSpawnChildSetupFunc) (gpointer user_data); | |
13737 | # 161 "/usr/include/glib-2.0/glib/gspawn.h" | |
13738 | typedef enum | |
13739 | { | |
13740 | G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0, | |
13741 | G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1, | |
13742 | ||
13743 | G_SPAWN_SEARCH_PATH = 1 << 2, | |
13744 | ||
13745 | G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3, | |
13746 | G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4, | |
13747 | G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5, | |
13748 | G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6 | |
13749 | } GSpawnFlags; | |
13750 | ||
13751 | GQuark g_spawn_error_quark (void); | |
13752 | # 186 "/usr/include/glib-2.0/glib/gspawn.h" | |
13753 | gboolean g_spawn_async (const gchar *working_directory, | |
13754 | gchar **argv, | |
13755 | gchar **envp, | |
13756 | GSpawnFlags flags, | |
13757 | GSpawnChildSetupFunc child_setup, | |
13758 | gpointer user_data, | |
13759 | GPid *child_pid, | |
13760 | GError **error); | |
13761 | ||
13762 | ||
13763 | ||
13764 | ||
13765 | ||
13766 | gboolean g_spawn_async_with_pipes (const gchar *working_directory, | |
13767 | gchar **argv, | |
13768 | gchar **envp, | |
13769 | GSpawnFlags flags, | |
13770 | GSpawnChildSetupFunc child_setup, | |
13771 | gpointer user_data, | |
13772 | GPid *child_pid, | |
13773 | gint *standard_input, | |
13774 | gint *standard_output, | |
13775 | gint *standard_error, | |
13776 | GError **error); | |
13777 | ||
13778 | ||
13779 | ||
13780 | ||
13781 | ||
13782 | ||
13783 | gboolean g_spawn_sync (const gchar *working_directory, | |
13784 | gchar **argv, | |
13785 | gchar **envp, | |
13786 | GSpawnFlags flags, | |
13787 | GSpawnChildSetupFunc child_setup, | |
13788 | gpointer user_data, | |
13789 | gchar **standard_output, | |
13790 | gchar **standard_error, | |
13791 | gint *exit_status, | |
13792 | GError **error); | |
13793 | ||
13794 | gboolean g_spawn_command_line_sync (const gchar *command_line, | |
13795 | gchar **standard_output, | |
13796 | gchar **standard_error, | |
13797 | gint *exit_status, | |
13798 | GError **error); | |
13799 | gboolean g_spawn_command_line_async (const gchar *command_line, | |
13800 | GError **error); | |
13801 | ||
13802 | void g_spawn_close_pid (GPid pid); | |
13803 | ||
13804 | ||
13805 | # 81 "/usr/include/glib-2.0/glib.h" 2 | |
13806 | # 1 "/usr/include/glib-2.0/glib/gstrfuncs.h" 1 | |
13807 | # 35 "/usr/include/glib-2.0/glib/gstrfuncs.h" | |
13808 | # 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 | |
13809 | # 36 "/usr/include/glib-2.0/glib/gstrfuncs.h" 2 | |
13810 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
13811 | # 37 "/usr/include/glib-2.0/glib/gstrfuncs.h" 2 | |
13812 | ||
13813 | ||
13814 | ||
13815 | ||
13816 | typedef enum { | |
13817 | G_ASCII_ALNUM = 1 << 0, | |
13818 | G_ASCII_ALPHA = 1 << 1, | |
13819 | G_ASCII_CNTRL = 1 << 2, | |
13820 | G_ASCII_DIGIT = 1 << 3, | |
13821 | G_ASCII_GRAPH = 1 << 4, | |
13822 | G_ASCII_LOWER = 1 << 5, | |
13823 | G_ASCII_PRINT = 1 << 6, | |
13824 | G_ASCII_PUNCT = 1 << 7, | |
13825 | G_ASCII_SPACE = 1 << 8, | |
13826 | G_ASCII_UPPER = 1 << 9, | |
13827 | G_ASCII_XDIGIT = 1 << 10 | |
13828 | } GAsciiType; | |
13829 | ||
13830 | extern const guint16 * const g_ascii_table; | |
13831 | # 90 "/usr/include/glib-2.0/glib/gstrfuncs.h" | |
13832 | gchar g_ascii_tolower (gchar c) __attribute__((__const__)); | |
13833 | gchar g_ascii_toupper (gchar c) __attribute__((__const__)); | |
13834 | ||
13835 | gint g_ascii_digit_value (gchar c) __attribute__((__const__)); | |
13836 | gint g_ascii_xdigit_value (gchar c) __attribute__((__const__)); | |
13837 | ||
13838 | ||
13839 | ||
13840 | ||
13841 | ||
13842 | gchar* g_strdelimit (gchar *string, | |
13843 | const gchar *delimiters, | |
13844 | gchar new_delimiter); | |
13845 | gchar* g_strcanon (gchar *string, | |
13846 | const gchar *valid_chars, | |
13847 | gchar substitutor); | |
13848 | const gchar * g_strerror (gint errnum) __attribute__((__const__)); | |
13849 | const gchar * g_strsignal (gint signum) __attribute__((__const__)); | |
13850 | gchar * g_strreverse (gchar *string); | |
13851 | gsize g_strlcpy (gchar *dest, | |
13852 | const gchar *src, | |
13853 | gsize dest_size); | |
13854 | gsize g_strlcat (gchar *dest, | |
13855 | const gchar *src, | |
13856 | gsize dest_size); | |
13857 | gchar * g_strstr_len (const gchar *haystack, | |
13858 | gssize haystack_len, | |
13859 | const gchar *needle); | |
13860 | gchar * g_strrstr (const gchar *haystack, | |
13861 | const gchar *needle); | |
13862 | gchar * g_strrstr_len (const gchar *haystack, | |
13863 | gssize haystack_len, | |
13864 | const gchar *needle); | |
13865 | ||
13866 | gboolean g_str_has_suffix (const gchar *str, | |
13867 | const gchar *suffix); | |
13868 | gboolean g_str_has_prefix (const gchar *str, | |
13869 | const gchar *prefix); | |
13870 | ||
13871 | ||
13872 | ||
13873 | gdouble g_strtod (const gchar *nptr, | |
13874 | gchar **endptr); | |
13875 | gdouble g_ascii_strtod (const gchar *nptr, | |
13876 | gchar **endptr); | |
13877 | guint64 g_ascii_strtoull (const gchar *nptr, | |
13878 | gchar **endptr, | |
13879 | guint base); | |
13880 | gint64 g_ascii_strtoll (const gchar *nptr, | |
13881 | gchar **endptr, | |
13882 | guint base); | |
13883 | ||
13884 | ||
13885 | ||
13886 | ||
13887 | gchar * g_ascii_dtostr (gchar *buffer, | |
13888 | gint buf_len, | |
13889 | gdouble d); | |
13890 | gchar * g_ascii_formatd (gchar *buffer, | |
13891 | gint buf_len, | |
13892 | const gchar *format, | |
13893 | gdouble d); | |
13894 | ||
13895 | ||
13896 | gchar* g_strchug (gchar *string); | |
13897 | ||
13898 | gchar* g_strchomp (gchar *string); | |
13899 | ||
13900 | ||
13901 | ||
13902 | gint g_ascii_strcasecmp (const gchar *s1, | |
13903 | const gchar *s2); | |
13904 | gint g_ascii_strncasecmp (const gchar *s1, | |
13905 | const gchar *s2, | |
13906 | gsize n); | |
13907 | gchar* g_ascii_strdown (const gchar *str, | |
13908 | gssize len) __attribute__((__malloc__)); | |
13909 | gchar* g_ascii_strup (const gchar *str, | |
13910 | gssize len) __attribute__((__malloc__)); | |
13911 | ||
13912 | ||
13913 | __attribute__((__deprecated__)) | |
13914 | gint g_strcasecmp (const gchar *s1, | |
13915 | const gchar *s2); | |
13916 | __attribute__((__deprecated__)) | |
13917 | gint g_strncasecmp (const gchar *s1, | |
13918 | const gchar *s2, | |
13919 | guint n); | |
13920 | __attribute__((__deprecated__)) | |
13921 | gchar* g_strdown (gchar *string); | |
13922 | __attribute__((__deprecated__)) | |
13923 | gchar* g_strup (gchar *string); | |
13924 | ||
13925 | ||
13926 | ||
13927 | ||
13928 | ||
13929 | gchar* g_strdup (const gchar *str) __attribute__((__malloc__)); | |
13930 | gchar* g_strdup_printf (const gchar *format, | |
13931 | ...) __attribute__((__format__ (__printf__, 1, 2))) __attribute__((__malloc__)); | |
13932 | gchar* g_strdup_vprintf (const gchar *format, | |
13933 | va_list args) __attribute__((__malloc__)); | |
13934 | gchar* g_strndup (const gchar *str, | |
13935 | gsize n) __attribute__((__malloc__)); | |
13936 | gchar* g_strnfill (gsize length, | |
13937 | gchar fill_char) __attribute__((__malloc__)); | |
13938 | gchar* g_strconcat (const gchar *string1, | |
13939 | ...) __attribute__((__malloc__)) __attribute__((__sentinel__)); | |
13940 | gchar* g_strjoin (const gchar *separator, | |
13941 | ...) __attribute__((__malloc__)) __attribute__((__sentinel__)); | |
13942 | ||
13943 | ||
13944 | ||
13945 | ||
13946 | ||
13947 | gchar* g_strcompress (const gchar *source) __attribute__((__malloc__)); | |
13948 | # 215 "/usr/include/glib-2.0/glib/gstrfuncs.h" | |
13949 | gchar* g_strescape (const gchar *source, | |
13950 | const gchar *exceptions) __attribute__((__malloc__)); | |
13951 | ||
13952 | gpointer g_memdup (gconstpointer mem, | |
13953 | guint byte_size) __attribute__((__malloc__)) __attribute__((__alloc_size__(2))); | |
13954 | # 230 "/usr/include/glib-2.0/glib/gstrfuncs.h" | |
13955 | gchar** g_strsplit (const gchar *string, | |
13956 | const gchar *delimiter, | |
13957 | gint max_tokens) __attribute__((__malloc__)); | |
13958 | gchar ** g_strsplit_set (const gchar *string, | |
13959 | const gchar *delimiters, | |
13960 | gint max_tokens) __attribute__((__malloc__)); | |
13961 | gchar* g_strjoinv (const gchar *separator, | |
13962 | gchar **str_array) __attribute__((__malloc__)); | |
13963 | void g_strfreev (gchar **str_array); | |
13964 | gchar** g_strdupv (gchar **str_array) __attribute__((__malloc__)); | |
13965 | guint g_strv_length (gchar **str_array); | |
13966 | ||
13967 | gchar* g_stpcpy (gchar *dest, | |
13968 | const char *src); | |
13969 | ||
13970 | ||
13971 | # 82 "/usr/include/glib-2.0/glib.h" 2 | |
13972 | # 1 "/usr/include/glib-2.0/glib/gstring.h" 1 | |
13973 | # 83 "/usr/include/glib-2.0/glib.h" 2 | |
13974 | # 1 "/usr/include/glib-2.0/glib/gstringchunk.h" 1 | |
13975 | # 34 "/usr/include/glib-2.0/glib/gstringchunk.h" | |
13976 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
13977 | # 35 "/usr/include/glib-2.0/glib/gstringchunk.h" 2 | |
13978 | ||
13979 | ||
13980 | ||
13981 | typedef struct _GStringChunk GStringChunk; | |
13982 | ||
13983 | GStringChunk* g_string_chunk_new (gsize size); | |
13984 | void g_string_chunk_free (GStringChunk *chunk); | |
13985 | void g_string_chunk_clear (GStringChunk *chunk); | |
13986 | gchar* g_string_chunk_insert (GStringChunk *chunk, | |
13987 | const gchar *string); | |
13988 | gchar* g_string_chunk_insert_len (GStringChunk *chunk, | |
13989 | const gchar *string, | |
13990 | gssize len); | |
13991 | gchar* g_string_chunk_insert_const (GStringChunk *chunk, | |
13992 | const gchar *string); | |
13993 | ||
13994 | ||
13995 | # 84 "/usr/include/glib-2.0/glib.h" 2 | |
13996 | # 1 "/usr/include/glib-2.0/glib/gtestutils.h" 1 | |
13997 | # 28 "/usr/include/glib-2.0/glib/gtestutils.h" | |
13998 | # 1 "/usr/include/glib-2.0/glib/gmessages.h" 1 | |
13999 | # 29 "/usr/include/glib-2.0/glib/gtestutils.h" 2 | |
14000 | # 1 "/usr/include/glib-2.0/glib/gstring.h" 1 | |
14001 | # 30 "/usr/include/glib-2.0/glib/gtestutils.h" 2 | |
14002 | # 1 "/usr/include/glib-2.0/glib/gerror.h" 1 | |
14003 | # 31 "/usr/include/glib-2.0/glib/gtestutils.h" 2 | |
14004 | # 1 "/usr/include/glib-2.0/glib/gslist.h" 1 | |
14005 | # 32 "/usr/include/glib-2.0/glib/gtestutils.h" 2 | |
14006 | ||
14007 | ||
14008 | ||
14009 | typedef struct GTestCase GTestCase; | |
14010 | typedef struct GTestSuite GTestSuite; | |
14011 | typedef void (*GTestFunc) (void); | |
14012 | typedef void (*GTestDataFunc) (gconstpointer user_data); | |
14013 | typedef void (*GTestFixtureFunc) (gpointer fixture, | |
14014 | gconstpointer user_data); | |
14015 | # 79 "/usr/include/glib-2.0/glib/gtestutils.h" | |
14016 | int g_strcmp0 (const char *str1, | |
14017 | const char *str2); | |
14018 | ||
14019 | ||
14020 | void g_test_minimized_result (double minimized_quantity, | |
14021 | const char *format, | |
14022 | ...) __attribute__((__format__ (__printf__, 2, 3))); | |
14023 | void g_test_maximized_result (double maximized_quantity, | |
14024 | const char *format, | |
14025 | ...) __attribute__((__format__ (__printf__, 2, 3))); | |
14026 | ||
14027 | ||
14028 | void g_test_init (int *argc, | |
14029 | char ***argv, | |
14030 | ...); | |
14031 | # 103 "/usr/include/glib-2.0/glib/gtestutils.h" | |
14032 | int g_test_run (void); | |
14033 | ||
14034 | void g_test_add_func (const char *testpath, | |
14035 | GTestFunc test_func); | |
14036 | ||
14037 | void g_test_add_data_func (const char *testpath, | |
14038 | gconstpointer test_data, | |
14039 | GTestDataFunc test_func); | |
14040 | ||
14041 | void g_test_fail (void); | |
14042 | # 128 "/usr/include/glib-2.0/glib/gtestutils.h" | |
14043 | void g_test_message (const char *format, | |
14044 | ...) __attribute__((__format__ (__printf__, 1, 2))); | |
14045 | void g_test_bug_base (const char *uri_pattern); | |
14046 | void g_test_bug (const char *bug_uri_snippet); | |
14047 | ||
14048 | void g_test_timer_start (void); | |
14049 | double g_test_timer_elapsed (void); | |
14050 | double g_test_timer_last (void); | |
14051 | ||
14052 | ||
14053 | void g_test_queue_free (gpointer gfree_pointer); | |
14054 | void g_test_queue_destroy (GDestroyNotify destroy_func, | |
14055 | gpointer destroy_data); | |
14056 | ||
14057 | ||
14058 | ||
14059 | typedef enum { | |
14060 | G_TEST_TRAP_SILENCE_STDOUT = 1 << 7, | |
14061 | G_TEST_TRAP_SILENCE_STDERR = 1 << 8, | |
14062 | G_TEST_TRAP_INHERIT_STDIN = 1 << 9 | |
14063 | } GTestTrapFlags; | |
14064 | gboolean g_test_trap_fork (guint64 usec_timeout, | |
14065 | GTestTrapFlags test_trap_flags); | |
14066 | gboolean g_test_trap_has_passed (void); | |
14067 | gboolean g_test_trap_reached_timeout (void); | |
14068 | # 162 "/usr/include/glib-2.0/glib/gtestutils.h" | |
14069 | gint32 g_test_rand_int (void); | |
14070 | gint32 g_test_rand_int_range (gint32 begin, | |
14071 | gint32 end); | |
14072 | double g_test_rand_double (void); | |
14073 | double g_test_rand_double_range (double range_start, | |
14074 | double range_end); | |
14075 | ||
14076 | ||
14077 | GTestCase* g_test_create_case (const char *test_name, | |
14078 | gsize data_size, | |
14079 | gconstpointer test_data, | |
14080 | GTestFixtureFunc data_setup, | |
14081 | GTestFixtureFunc data_test, | |
14082 | GTestFixtureFunc data_teardown); | |
14083 | GTestSuite* g_test_create_suite (const char *suite_name); | |
14084 | GTestSuite* g_test_get_root (void); | |
14085 | void g_test_suite_add (GTestSuite *suite, | |
14086 | GTestCase *test_case); | |
14087 | void g_test_suite_add_suite (GTestSuite *suite, | |
14088 | GTestSuite *nestedsuite); | |
14089 | int g_test_run_suite (GTestSuite *suite); | |
14090 | ||
14091 | ||
14092 | void g_test_trap_assertions (const char *domain, | |
14093 | const char *file, | |
14094 | int line, | |
14095 | const char *func, | |
14096 | guint64 assertion_flags, | |
14097 | const char *pattern); | |
14098 | void g_assertion_message (const char *domain, | |
14099 | const char *file, | |
14100 | int line, | |
14101 | const char *func, | |
14102 | const char *message) __attribute__((__noreturn__)); | |
14103 | void g_assertion_message_expr (const char *domain, | |
14104 | const char *file, | |
14105 | int line, | |
14106 | const char *func, | |
14107 | const char *expr) __attribute__((__noreturn__)); | |
14108 | void g_assertion_message_cmpstr (const char *domain, | |
14109 | const char *file, | |
14110 | int line, | |
14111 | const char *func, | |
14112 | const char *expr, | |
14113 | const char *arg1, | |
14114 | const char *cmp, | |
14115 | const char *arg2) __attribute__((__noreturn__)); | |
14116 | void g_assertion_message_cmpnum (const char *domain, | |
14117 | const char *file, | |
14118 | int line, | |
14119 | const char *func, | |
14120 | const char *expr, | |
14121 | long double arg1, | |
14122 | const char *cmp, | |
14123 | long double arg2, | |
14124 | char numtype) __attribute__((__noreturn__)); | |
14125 | void g_assertion_message_error (const char *domain, | |
14126 | const char *file, | |
14127 | int line, | |
14128 | const char *func, | |
14129 | const char *expr, | |
14130 | const GError *error, | |
14131 | GQuark error_domain, | |
14132 | int error_code) __attribute__((__noreturn__)); | |
14133 | void g_test_add_vtable (const char *testpath, | |
14134 | gsize data_size, | |
14135 | gconstpointer test_data, | |
14136 | GTestFixtureFunc data_setup, | |
14137 | GTestFixtureFunc data_test, | |
14138 | GTestFixtureFunc data_teardown); | |
14139 | typedef struct { | |
14140 | gboolean test_initialized; | |
14141 | gboolean test_quick; | |
14142 | gboolean test_perf; | |
14143 | gboolean test_verbose; | |
14144 | gboolean test_quiet; | |
14145 | gboolean test_undefined; | |
14146 | } GTestConfig; | |
14147 | extern const GTestConfig * const g_test_config_vars; | |
14148 | ||
14149 | ||
14150 | typedef enum { | |
14151 | G_TEST_LOG_NONE, | |
14152 | G_TEST_LOG_ERROR, | |
14153 | G_TEST_LOG_START_BINARY, | |
14154 | G_TEST_LOG_LIST_CASE, | |
14155 | G_TEST_LOG_SKIP_CASE, | |
14156 | G_TEST_LOG_START_CASE, | |
14157 | G_TEST_LOG_STOP_CASE, | |
14158 | G_TEST_LOG_MIN_RESULT, | |
14159 | G_TEST_LOG_MAX_RESULT, | |
14160 | G_TEST_LOG_MESSAGE | |
14161 | } GTestLogType; | |
14162 | ||
14163 | typedef struct { | |
14164 | GTestLogType log_type; | |
14165 | guint n_strings; | |
14166 | gchar **strings; | |
14167 | guint n_nums; | |
14168 | long double *nums; | |
14169 | } GTestLogMsg; | |
14170 | typedef struct { | |
14171 | ||
14172 | GString *data; | |
14173 | GSList *msgs; | |
14174 | } GTestLogBuffer; | |
14175 | ||
14176 | const char* g_test_log_type_name (GTestLogType log_type); | |
14177 | GTestLogBuffer* g_test_log_buffer_new (void); | |
14178 | void g_test_log_buffer_free (GTestLogBuffer *tbuffer); | |
14179 | void g_test_log_buffer_push (GTestLogBuffer *tbuffer, | |
14180 | guint n_bytes, | |
14181 | const guint8 *bytes); | |
14182 | GTestLogMsg* g_test_log_buffer_pop (GTestLogBuffer *tbuffer); | |
14183 | void g_test_log_msg_free (GTestLogMsg *tmsg); | |
14184 | # 291 "/usr/include/glib-2.0/glib/gtestutils.h" | |
14185 | typedef gboolean (*GTestLogFatalFunc) (const gchar *log_domain, | |
14186 | GLogLevelFlags log_level, | |
14187 | const gchar *message, | |
14188 | gpointer user_data); | |
14189 | void | |
14190 | g_test_log_set_fatal_handler (GTestLogFatalFunc log_func, | |
14191 | gpointer user_data); | |
14192 | ||
14193 | ||
14194 | # 85 "/usr/include/glib-2.0/glib.h" 2 | |
14195 | # 1 "/usr/include/glib-2.0/glib/gthread.h" 1 | |
14196 | # 86 "/usr/include/glib-2.0/glib.h" 2 | |
14197 | # 1 "/usr/include/glib-2.0/glib/gthreadpool.h" 1 | |
14198 | # 34 "/usr/include/glib-2.0/glib/gthreadpool.h" | |
14199 | # 1 "/usr/include/glib-2.0/glib/gthread.h" 1 | |
14200 | # 35 "/usr/include/glib-2.0/glib/gthreadpool.h" 2 | |
14201 | ||
14202 | ||
14203 | ||
14204 | typedef struct _GThreadPool GThreadPool; | |
14205 | ||
14206 | ||
14207 | ||
14208 | ||
14209 | struct _GThreadPool | |
14210 | { | |
14211 | GFunc func; | |
14212 | gpointer user_data; | |
14213 | gboolean exclusive; | |
14214 | }; | |
14215 | ||
14216 | GThreadPool * g_thread_pool_new (GFunc func, | |
14217 | gpointer user_data, | |
14218 | gint max_threads, | |
14219 | gboolean exclusive, | |
14220 | GError **error); | |
14221 | void g_thread_pool_free (GThreadPool *pool, | |
14222 | gboolean immediate, | |
14223 | gboolean wait_); | |
14224 | gboolean g_thread_pool_push (GThreadPool *pool, | |
14225 | gpointer data, | |
14226 | GError **error); | |
14227 | guint g_thread_pool_unprocessed (GThreadPool *pool); | |
14228 | void g_thread_pool_set_sort_function (GThreadPool *pool, | |
14229 | GCompareDataFunc func, | |
14230 | gpointer user_data); | |
14231 | gboolean g_thread_pool_set_max_threads (GThreadPool *pool, | |
14232 | gint max_threads, | |
14233 | GError **error); | |
14234 | gint g_thread_pool_get_max_threads (GThreadPool *pool); | |
14235 | guint g_thread_pool_get_num_threads (GThreadPool *pool); | |
14236 | ||
14237 | void g_thread_pool_set_max_unused_threads (gint max_threads); | |
14238 | gint g_thread_pool_get_max_unused_threads (void); | |
14239 | guint g_thread_pool_get_num_unused_threads (void); | |
14240 | void g_thread_pool_stop_unused_threads (void); | |
14241 | void g_thread_pool_set_max_idle_time (guint interval); | |
14242 | guint g_thread_pool_get_max_idle_time (void); | |
14243 | ||
14244 | ||
14245 | # 87 "/usr/include/glib-2.0/glib.h" 2 | |
14246 | # 1 "/usr/include/glib-2.0/glib/gtimer.h" 1 | |
14247 | # 34 "/usr/include/glib-2.0/glib/gtimer.h" | |
14248 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
14249 | # 35 "/usr/include/glib-2.0/glib/gtimer.h" 2 | |
14250 | ||
14251 | ||
14252 | ||
14253 | ||
14254 | ||
14255 | ||
14256 | ||
14257 | typedef struct _GTimer GTimer; | |
14258 | ||
14259 | ||
14260 | ||
14261 | GTimer* g_timer_new (void); | |
14262 | void g_timer_destroy (GTimer *timer); | |
14263 | void g_timer_start (GTimer *timer); | |
14264 | void g_timer_stop (GTimer *timer); | |
14265 | void g_timer_reset (GTimer *timer); | |
14266 | void g_timer_continue (GTimer *timer); | |
14267 | gdouble g_timer_elapsed (GTimer *timer, | |
14268 | gulong *microseconds); | |
14269 | ||
14270 | void g_usleep (gulong microseconds); | |
14271 | ||
14272 | void g_time_val_add (GTimeVal *time_, | |
14273 | glong microseconds); | |
14274 | gboolean g_time_val_from_iso8601 (const gchar *iso_date, | |
14275 | GTimeVal *time_); | |
14276 | gchar* g_time_val_to_iso8601 (GTimeVal *time_) __attribute__((__malloc__)); | |
14277 | ||
14278 | ||
14279 | # 88 "/usr/include/glib-2.0/glib.h" 2 | |
14280 | # 1 "/usr/include/glib-2.0/glib/gtimezone.h" 1 | |
14281 | # 89 "/usr/include/glib-2.0/glib.h" 2 | |
14282 | # 1 "/usr/include/glib-2.0/glib/gtrashstack.h" 1 | |
14283 | # 34 "/usr/include/glib-2.0/glib/gtrashstack.h" | |
14284 | # 1 "/usr/include/glib-2.0/glib/gutils.h" 1 | |
14285 | # 35 "/usr/include/glib-2.0/glib/gtrashstack.h" 2 | |
14286 | ||
14287 | ||
14288 | ||
14289 | typedef struct _GTrashStack GTrashStack; | |
14290 | struct _GTrashStack | |
14291 | { | |
14292 | GTrashStack *next; | |
14293 | }; | |
14294 | ||
14295 | static __inline __attribute__ ((unused)) void g_trash_stack_push (GTrashStack **stack_p, | |
14296 | gpointer data_p); | |
14297 | static __inline __attribute__ ((unused)) gpointer g_trash_stack_pop (GTrashStack **stack_p); | |
14298 | static __inline __attribute__ ((unused)) gpointer g_trash_stack_peek (GTrashStack **stack_p); | |
14299 | static __inline __attribute__ ((unused)) guint g_trash_stack_height (GTrashStack **stack_p); | |
14300 | ||
14301 | ||
14302 | ||
14303 | static __inline __attribute__ ((unused)) void | |
14304 | g_trash_stack_push (GTrashStack **stack_p, | |
14305 | gpointer data_p) | |
14306 | { | |
14307 | GTrashStack *data = (GTrashStack *) data_p; | |
14308 | ||
14309 | data->next = *stack_p; | |
14310 | *stack_p = data; | |
14311 | } | |
14312 | static __inline __attribute__ ((unused)) gpointer | |
14313 | g_trash_stack_pop (GTrashStack **stack_p) | |
14314 | { | |
14315 | GTrashStack *data; | |
14316 | ||
14317 | data = *stack_p; | |
14318 | if (data) | |
14319 | { | |
14320 | *stack_p = data->next; | |
14321 | ||
14322 | ||
14323 | ||
14324 | data->next = ((void *)0); | |
14325 | } | |
14326 | ||
14327 | return data; | |
14328 | } | |
14329 | static __inline __attribute__ ((unused)) gpointer | |
14330 | g_trash_stack_peek (GTrashStack **stack_p) | |
14331 | { | |
14332 | GTrashStack *data; | |
14333 | ||
14334 | data = *stack_p; | |
14335 | ||
14336 | return data; | |
14337 | } | |
14338 | static __inline __attribute__ ((unused)) guint | |
14339 | g_trash_stack_height (GTrashStack **stack_p) | |
14340 | { | |
14341 | GTrashStack *data; | |
14342 | guint i = 0; | |
14343 | ||
14344 | for (data = *stack_p; data; data = data->next) | |
14345 | i++; | |
14346 | ||
14347 | return i; | |
14348 | } | |
14349 | ||
14350 | ||
14351 | ||
14352 | ||
14353 | # 90 "/usr/include/glib-2.0/glib.h" 2 | |
14354 | # 1 "/usr/include/glib-2.0/glib/gtree.h" 1 | |
14355 | # 34 "/usr/include/glib-2.0/glib/gtree.h" | |
14356 | # 1 "/usr/include/glib-2.0/glib/gnode.h" 1 | |
14357 | # 35 "/usr/include/glib-2.0/glib/gtree.h" 2 | |
14358 | ||
14359 | ||
14360 | ||
14361 | typedef struct _GTree GTree; | |
14362 | ||
14363 | typedef gboolean (*GTraverseFunc) (gpointer key, | |
14364 | gpointer value, | |
14365 | gpointer data); | |
14366 | ||
14367 | ||
14368 | ||
14369 | GTree* g_tree_new (GCompareFunc key_compare_func); | |
14370 | GTree* g_tree_new_with_data (GCompareDataFunc key_compare_func, | |
14371 | gpointer key_compare_data); | |
14372 | GTree* g_tree_new_full (GCompareDataFunc key_compare_func, | |
14373 | gpointer key_compare_data, | |
14374 | GDestroyNotify key_destroy_func, | |
14375 | GDestroyNotify value_destroy_func); | |
14376 | GTree* g_tree_ref (GTree *tree); | |
14377 | void g_tree_unref (GTree *tree); | |
14378 | void g_tree_destroy (GTree *tree); | |
14379 | void g_tree_insert (GTree *tree, | |
14380 | gpointer key, | |
14381 | gpointer value); | |
14382 | void g_tree_replace (GTree *tree, | |
14383 | gpointer key, | |
14384 | gpointer value); | |
14385 | gboolean g_tree_remove (GTree *tree, | |
14386 | gconstpointer key); | |
14387 | gboolean g_tree_steal (GTree *tree, | |
14388 | gconstpointer key); | |
14389 | gpointer g_tree_lookup (GTree *tree, | |
14390 | gconstpointer key); | |
14391 | gboolean g_tree_lookup_extended (GTree *tree, | |
14392 | gconstpointer lookup_key, | |
14393 | gpointer *orig_key, | |
14394 | gpointer *value); | |
14395 | void g_tree_foreach (GTree *tree, | |
14396 | GTraverseFunc func, | |
14397 | gpointer user_data); | |
14398 | ||
14399 | __attribute__((__deprecated__)) | |
14400 | void g_tree_traverse (GTree *tree, | |
14401 | GTraverseFunc traverse_func, | |
14402 | GTraverseType traverse_type, | |
14403 | gpointer user_data); | |
14404 | ||
14405 | gpointer g_tree_search (GTree *tree, | |
14406 | GCompareFunc search_func, | |
14407 | gconstpointer user_data); | |
14408 | gint g_tree_height (GTree *tree); | |
14409 | gint g_tree_nnodes (GTree *tree); | |
14410 | ||
14411 | ||
14412 | # 91 "/usr/include/glib-2.0/glib.h" 2 | |
14413 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
14414 | # 92 "/usr/include/glib-2.0/glib.h" 2 | |
14415 | # 1 "/usr/include/glib-2.0/glib/gunicode.h" 1 | |
14416 | # 93 "/usr/include/glib-2.0/glib.h" 2 | |
14417 | # 1 "/usr/include/glib-2.0/glib/gurifuncs.h" 1 | |
14418 | # 30 "/usr/include/glib-2.0/glib/gurifuncs.h" | |
14419 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
14420 | # 31 "/usr/include/glib-2.0/glib/gurifuncs.h" 2 | |
14421 | ||
14422 | ||
14423 | # 69 "/usr/include/glib-2.0/glib/gurifuncs.h" | |
14424 | char * g_uri_unescape_string (const char *escaped_string, | |
14425 | const char *illegal_characters); | |
14426 | char * g_uri_unescape_segment (const char *escaped_string, | |
14427 | const char *escaped_string_end, | |
14428 | const char *illegal_characters); | |
14429 | char * g_uri_parse_scheme (const char *uri); | |
14430 | char * g_uri_escape_string (const char *unescaped, | |
14431 | const char *reserved_chars_allowed, | |
14432 | gboolean allow_utf8); | |
14433 | ||
14434 | ||
14435 | # 94 "/usr/include/glib-2.0/glib.h" 2 | |
14436 | # 1 "/usr/include/glib-2.0/glib/gutils.h" 1 | |
14437 | # 95 "/usr/include/glib-2.0/glib.h" 2 | |
14438 | # 1 "/usr/include/glib-2.0/glib/gvarianttype.h" 1 | |
14439 | # 30 "/usr/include/glib-2.0/glib/gvarianttype.h" | |
14440 | # 1 "/usr/include/glib-2.0/glib/gmessages.h" 1 | |
14441 | # 31 "/usr/include/glib-2.0/glib/gvarianttype.h" 2 | |
14442 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
14443 | # 32 "/usr/include/glib-2.0/glib/gvarianttype.h" 2 | |
14444 | ||
14445 | ||
14446 | # 44 "/usr/include/glib-2.0/glib/gvarianttype.h" | |
14447 | typedef struct _GVariantType GVariantType; | |
14448 | # 297 "/usr/include/glib-2.0/glib/gvarianttype.h" | |
14449 | gboolean g_variant_type_string_is_valid (const gchar *type_string); | |
14450 | gboolean g_variant_type_string_scan (const gchar *string, | |
14451 | const gchar *limit, | |
14452 | const gchar **endptr); | |
14453 | ||
14454 | ||
14455 | void g_variant_type_free (GVariantType *type); | |
14456 | GVariantType * g_variant_type_copy (const GVariantType *type); | |
14457 | GVariantType * g_variant_type_new (const gchar *type_string); | |
14458 | ||
14459 | ||
14460 | gsize g_variant_type_get_string_length (const GVariantType *type); | |
14461 | const gchar * g_variant_type_peek_string (const GVariantType *type); | |
14462 | gchar * g_variant_type_dup_string (const GVariantType *type); | |
14463 | ||
14464 | ||
14465 | gboolean g_variant_type_is_definite (const GVariantType *type); | |
14466 | gboolean g_variant_type_is_container (const GVariantType *type); | |
14467 | gboolean g_variant_type_is_basic (const GVariantType *type); | |
14468 | gboolean g_variant_type_is_maybe (const GVariantType *type); | |
14469 | gboolean g_variant_type_is_array (const GVariantType *type); | |
14470 | gboolean g_variant_type_is_tuple (const GVariantType *type); | |
14471 | gboolean g_variant_type_is_dict_entry (const GVariantType *type); | |
14472 | gboolean g_variant_type_is_variant (const GVariantType *type); | |
14473 | ||
14474 | ||
14475 | guint g_variant_type_hash (gconstpointer type); | |
14476 | gboolean g_variant_type_equal (gconstpointer type1, | |
14477 | gconstpointer type2); | |
14478 | ||
14479 | ||
14480 | gboolean g_variant_type_is_subtype_of (const GVariantType *type, | |
14481 | const GVariantType *supertype); | |
14482 | ||
14483 | ||
14484 | const GVariantType * g_variant_type_element (const GVariantType *type); | |
14485 | const GVariantType * g_variant_type_first (const GVariantType *type); | |
14486 | const GVariantType * g_variant_type_next (const GVariantType *type); | |
14487 | gsize g_variant_type_n_items (const GVariantType *type); | |
14488 | const GVariantType * g_variant_type_key (const GVariantType *type); | |
14489 | const GVariantType * g_variant_type_value (const GVariantType *type); | |
14490 | ||
14491 | ||
14492 | GVariantType * g_variant_type_new_array (const GVariantType *element); | |
14493 | GVariantType * g_variant_type_new_maybe (const GVariantType *element); | |
14494 | GVariantType * g_variant_type_new_tuple (const GVariantType * const *items, | |
14495 | gint length); | |
14496 | GVariantType * g_variant_type_new_dict_entry (const GVariantType *key, | |
14497 | const GVariantType *value); | |
14498 | ||
14499 | ||
14500 | const GVariantType * g_variant_type_checked_ (const gchar *); | |
14501 | ||
14502 | ||
14503 | # 96 "/usr/include/glib-2.0/glib.h" 2 | |
14504 | # 1 "/usr/include/glib-2.0/glib/gvariant.h" 1 | |
14505 | # 30 "/usr/include/glib-2.0/glib/gvariant.h" | |
14506 | # 1 "/usr/include/glib-2.0/glib/gvarianttype.h" 1 | |
14507 | # 31 "/usr/include/glib-2.0/glib/gvariant.h" 2 | |
14508 | # 1 "/usr/include/glib-2.0/glib/gstring.h" 1 | |
14509 | # 32 "/usr/include/glib-2.0/glib/gvariant.h" 2 | |
14510 | ||
14511 | ||
14512 | ||
14513 | typedef struct _GVariant GVariant; | |
14514 | ||
14515 | typedef enum | |
14516 | { | |
14517 | G_VARIANT_CLASS_BOOLEAN = 'b', | |
14518 | G_VARIANT_CLASS_BYTE = 'y', | |
14519 | G_VARIANT_CLASS_INT16 = 'n', | |
14520 | G_VARIANT_CLASS_UINT16 = 'q', | |
14521 | G_VARIANT_CLASS_INT32 = 'i', | |
14522 | G_VARIANT_CLASS_UINT32 = 'u', | |
14523 | G_VARIANT_CLASS_INT64 = 'x', | |
14524 | G_VARIANT_CLASS_UINT64 = 't', | |
14525 | G_VARIANT_CLASS_HANDLE = 'h', | |
14526 | G_VARIANT_CLASS_DOUBLE = 'd', | |
14527 | G_VARIANT_CLASS_STRING = 's', | |
14528 | G_VARIANT_CLASS_OBJECT_PATH = 'o', | |
14529 | G_VARIANT_CLASS_SIGNATURE = 'g', | |
14530 | G_VARIANT_CLASS_VARIANT = 'v', | |
14531 | G_VARIANT_CLASS_MAYBE = 'm', | |
14532 | G_VARIANT_CLASS_ARRAY = 'a', | |
14533 | G_VARIANT_CLASS_TUPLE = '(', | |
14534 | G_VARIANT_CLASS_DICT_ENTRY = '{' | |
14535 | } GVariantClass; | |
14536 | ||
14537 | void g_variant_unref (GVariant *value); | |
14538 | GVariant * g_variant_ref (GVariant *value); | |
14539 | GVariant * g_variant_ref_sink (GVariant *value); | |
14540 | gboolean g_variant_is_floating (GVariant *value); | |
14541 | GVariant * g_variant_take_ref (GVariant *value); | |
14542 | ||
14543 | const GVariantType * g_variant_get_type (GVariant *value); | |
14544 | const gchar * g_variant_get_type_string (GVariant *value); | |
14545 | gboolean g_variant_is_of_type (GVariant *value, | |
14546 | const GVariantType *type); | |
14547 | gboolean g_variant_is_container (GVariant *value); | |
14548 | GVariantClass g_variant_classify (GVariant *value); | |
14549 | GVariant * g_variant_new_boolean (gboolean value); | |
14550 | GVariant * g_variant_new_byte (guchar value); | |
14551 | GVariant * g_variant_new_int16 (gint16 value); | |
14552 | GVariant * g_variant_new_uint16 (guint16 value); | |
14553 | GVariant * g_variant_new_int32 (gint32 value); | |
14554 | GVariant * g_variant_new_uint32 (guint32 value); | |
14555 | GVariant * g_variant_new_int64 (gint64 value); | |
14556 | GVariant * g_variant_new_uint64 (guint64 value); | |
14557 | GVariant * g_variant_new_handle (gint32 value); | |
14558 | GVariant * g_variant_new_double (gdouble value); | |
14559 | GVariant * g_variant_new_string (const gchar *string); | |
14560 | GVariant * g_variant_new_object_path (const gchar *object_path); | |
14561 | gboolean g_variant_is_object_path (const gchar *string); | |
14562 | GVariant * g_variant_new_signature (const gchar *signature); | |
14563 | gboolean g_variant_is_signature (const gchar *string); | |
14564 | GVariant * g_variant_new_variant (GVariant *value); | |
14565 | GVariant * g_variant_new_strv (const gchar * const *strv, | |
14566 | gssize length); | |
14567 | ||
14568 | GVariant * g_variant_new_objv (const gchar * const *strv, | |
14569 | gssize length); | |
14570 | GVariant * g_variant_new_bytestring (const gchar *string); | |
14571 | GVariant * g_variant_new_bytestring_array (const gchar * const *strv, | |
14572 | gssize length); | |
14573 | GVariant * g_variant_new_fixed_array (const GVariantType *element_type, | |
14574 | gconstpointer elements, | |
14575 | gsize n_elements, | |
14576 | gsize element_size); | |
14577 | gboolean g_variant_get_boolean (GVariant *value); | |
14578 | guchar g_variant_get_byte (GVariant *value); | |
14579 | gint16 g_variant_get_int16 (GVariant *value); | |
14580 | guint16 g_variant_get_uint16 (GVariant *value); | |
14581 | gint32 g_variant_get_int32 (GVariant *value); | |
14582 | guint32 g_variant_get_uint32 (GVariant *value); | |
14583 | gint64 g_variant_get_int64 (GVariant *value); | |
14584 | guint64 g_variant_get_uint64 (GVariant *value); | |
14585 | gint32 g_variant_get_handle (GVariant *value); | |
14586 | gdouble g_variant_get_double (GVariant *value); | |
14587 | GVariant * g_variant_get_variant (GVariant *value); | |
14588 | const gchar * g_variant_get_string (GVariant *value, | |
14589 | gsize *length); | |
14590 | gchar * g_variant_dup_string (GVariant *value, | |
14591 | gsize *length); | |
14592 | const gchar ** g_variant_get_strv (GVariant *value, | |
14593 | gsize *length); | |
14594 | gchar ** g_variant_dup_strv (GVariant *value, | |
14595 | gsize *length); | |
14596 | ||
14597 | const gchar ** g_variant_get_objv (GVariant *value, | |
14598 | gsize *length); | |
14599 | gchar ** g_variant_dup_objv (GVariant *value, | |
14600 | gsize *length); | |
14601 | const gchar * g_variant_get_bytestring (GVariant *value); | |
14602 | gchar * g_variant_dup_bytestring (GVariant *value, | |
14603 | gsize *length); | |
14604 | const gchar ** g_variant_get_bytestring_array (GVariant *value, | |
14605 | gsize *length); | |
14606 | gchar ** g_variant_dup_bytestring_array (GVariant *value, | |
14607 | gsize *length); | |
14608 | ||
14609 | GVariant * g_variant_new_maybe (const GVariantType *child_type, | |
14610 | GVariant *child); | |
14611 | GVariant * g_variant_new_array (const GVariantType *child_type, | |
14612 | GVariant * const *children, | |
14613 | gsize n_children); | |
14614 | GVariant * g_variant_new_tuple (GVariant * const *children, | |
14615 | gsize n_children); | |
14616 | GVariant * g_variant_new_dict_entry (GVariant *key, | |
14617 | GVariant *value); | |
14618 | ||
14619 | GVariant * g_variant_get_maybe (GVariant *value); | |
14620 | gsize g_variant_n_children (GVariant *value); | |
14621 | void g_variant_get_child (GVariant *value, | |
14622 | gsize index_, | |
14623 | const gchar *format_string, | |
14624 | ...); | |
14625 | GVariant * g_variant_get_child_value (GVariant *value, | |
14626 | gsize index_); | |
14627 | gboolean g_variant_lookup (GVariant *dictionary, | |
14628 | const gchar *key, | |
14629 | const gchar *format_string, | |
14630 | ...); | |
14631 | GVariant * g_variant_lookup_value (GVariant *dictionary, | |
14632 | const gchar *key, | |
14633 | const GVariantType *expected_type); | |
14634 | gconstpointer g_variant_get_fixed_array (GVariant *value, | |
14635 | gsize *n_elements, | |
14636 | gsize element_size); | |
14637 | ||
14638 | gsize g_variant_get_size (GVariant *value); | |
14639 | gconstpointer g_variant_get_data (GVariant *value); | |
14640 | void g_variant_store (GVariant *value, | |
14641 | gpointer data); | |
14642 | ||
14643 | gchar * g_variant_print (GVariant *value, | |
14644 | gboolean type_annotate); | |
14645 | GString * g_variant_print_string (GVariant *value, | |
14646 | GString *string, | |
14647 | gboolean type_annotate); | |
14648 | ||
14649 | guint g_variant_hash (gconstpointer value); | |
14650 | gboolean g_variant_equal (gconstpointer one, | |
14651 | gconstpointer two); | |
14652 | ||
14653 | GVariant * g_variant_get_normal_form (GVariant *value); | |
14654 | gboolean g_variant_is_normal_form (GVariant *value); | |
14655 | GVariant * g_variant_byteswap (GVariant *value); | |
14656 | GVariant * g_variant_new_from_data (const GVariantType *type, | |
14657 | gconstpointer data, | |
14658 | gsize size, | |
14659 | gboolean trusted, | |
14660 | GDestroyNotify notify, | |
14661 | gpointer user_data); | |
14662 | ||
14663 | typedef struct _GVariantIter GVariantIter; | |
14664 | struct _GVariantIter { | |
14665 | ||
14666 | gsize x[16]; | |
14667 | }; | |
14668 | ||
14669 | GVariantIter * g_variant_iter_new (GVariant *value); | |
14670 | gsize g_variant_iter_init (GVariantIter *iter, | |
14671 | GVariant *value); | |
14672 | GVariantIter * g_variant_iter_copy (GVariantIter *iter); | |
14673 | gsize g_variant_iter_n_children (GVariantIter *iter); | |
14674 | void g_variant_iter_free (GVariantIter *iter); | |
14675 | GVariant * g_variant_iter_next_value (GVariantIter *iter); | |
14676 | gboolean g_variant_iter_next (GVariantIter *iter, | |
14677 | const gchar *format_string, | |
14678 | ...); | |
14679 | gboolean g_variant_iter_loop (GVariantIter *iter, | |
14680 | const gchar *format_string, | |
14681 | ...); | |
14682 | ||
14683 | ||
14684 | typedef struct _GVariantBuilder GVariantBuilder; | |
14685 | struct _GVariantBuilder { | |
14686 | ||
14687 | gsize x[16]; | |
14688 | }; | |
14689 | ||
14690 | typedef enum | |
14691 | { | |
14692 | G_VARIANT_PARSE_ERROR_FAILED, | |
14693 | G_VARIANT_PARSE_ERROR_BASIC_TYPE_EXPECTED, | |
14694 | G_VARIANT_PARSE_ERROR_CANNOT_INFER_TYPE, | |
14695 | G_VARIANT_PARSE_ERROR_DEFINITE_TYPE_EXPECTED, | |
14696 | G_VARIANT_PARSE_ERROR_INPUT_NOT_AT_END, | |
14697 | G_VARIANT_PARSE_ERROR_INVALID_CHARACTER, | |
14698 | G_VARIANT_PARSE_ERROR_INVALID_FORMAT_STRING, | |
14699 | G_VARIANT_PARSE_ERROR_INVALID_OBJECT_PATH, | |
14700 | G_VARIANT_PARSE_ERROR_INVALID_SIGNATURE, | |
14701 | G_VARIANT_PARSE_ERROR_INVALID_TYPE_STRING, | |
14702 | G_VARIANT_PARSE_ERROR_NO_COMMON_TYPE, | |
14703 | G_VARIANT_PARSE_ERROR_NUMBER_OUT_OF_RANGE, | |
14704 | G_VARIANT_PARSE_ERROR_NUMBER_TOO_BIG, | |
14705 | G_VARIANT_PARSE_ERROR_TYPE_ERROR, | |
14706 | G_VARIANT_PARSE_ERROR_UNEXPECTED_TOKEN, | |
14707 | G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD, | |
14708 | G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT, | |
14709 | G_VARIANT_PARSE_ERROR_VALUE_EXPECTED | |
14710 | } GVariantParseError; | |
14711 | ||
14712 | ||
14713 | GQuark g_variant_parser_get_error_quark (void); | |
14714 | ||
14715 | GVariantBuilder * g_variant_builder_new (const GVariantType *type); | |
14716 | void g_variant_builder_unref (GVariantBuilder *builder); | |
14717 | GVariantBuilder * g_variant_builder_ref (GVariantBuilder *builder); | |
14718 | void g_variant_builder_init (GVariantBuilder *builder, | |
14719 | const GVariantType *type); | |
14720 | GVariant * g_variant_builder_end (GVariantBuilder *builder); | |
14721 | void g_variant_builder_clear (GVariantBuilder *builder); | |
14722 | void g_variant_builder_open (GVariantBuilder *builder, | |
14723 | const GVariantType *type); | |
14724 | void g_variant_builder_close (GVariantBuilder *builder); | |
14725 | void g_variant_builder_add_value (GVariantBuilder *builder, | |
14726 | GVariant *value); | |
14727 | void g_variant_builder_add (GVariantBuilder *builder, | |
14728 | const gchar *format_string, | |
14729 | ...); | |
14730 | void g_variant_builder_add_parsed (GVariantBuilder *builder, | |
14731 | const gchar *format, | |
14732 | ...); | |
14733 | ||
14734 | GVariant * g_variant_new (const gchar *format_string, | |
14735 | ...); | |
14736 | void g_variant_get (GVariant *value, | |
14737 | const gchar *format_string, | |
14738 | ...); | |
14739 | GVariant * g_variant_new_va (const gchar *format_string, | |
14740 | const gchar **endptr, | |
14741 | va_list *app); | |
14742 | void g_variant_get_va (GVariant *value, | |
14743 | const gchar *format_string, | |
14744 | const gchar **endptr, | |
14745 | va_list *app); | |
14746 | ||
14747 | ||
14748 | GVariant * g_variant_parse (const GVariantType *type, | |
14749 | const gchar *text, | |
14750 | const gchar *limit, | |
14751 | const gchar **endptr, | |
14752 | GError **error); | |
14753 | GVariant * g_variant_new_parsed (const gchar *format, | |
14754 | ...); | |
14755 | GVariant * g_variant_new_parsed_va (const gchar *format, | |
14756 | va_list *app); | |
14757 | ||
14758 | gint g_variant_compare (gconstpointer one, | |
14759 | gconstpointer two); | |
14760 | ||
14761 | # 97 "/usr/include/glib-2.0/glib.h" 2 | |
14762 | # 1 "/usr/include/glib-2.0/glib/gversion.h" 1 | |
14763 | # 34 "/usr/include/glib-2.0/glib/gversion.h" | |
14764 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
14765 | # 35 "/usr/include/glib-2.0/glib/gversion.h" 2 | |
14766 | ||
14767 | ||
14768 | ||
14769 | extern const guint glib_major_version; | |
14770 | extern const guint glib_minor_version; | |
14771 | extern const guint glib_micro_version; | |
14772 | extern const guint glib_interface_age; | |
14773 | extern const guint glib_binary_age; | |
14774 | ||
14775 | const gchar * glib_check_version (guint required_major, | |
14776 | guint required_minor, | |
14777 | guint required_micro); | |
14778 | ||
14779 | ||
14780 | ||
14781 | ||
14782 | ||
14783 | ||
14784 | ||
14785 | ||
14786 | # 98 "/usr/include/glib-2.0/glib.h" 2 | |
14787 | # 1 "/usr/include/glib-2.0/glib/gversionmacros.h" 1 | |
14788 | # 99 "/usr/include/glib-2.0/glib.h" 2 | |
14789 | ||
14790 | ||
14791 | ||
14792 | ||
14793 | # 1 "/usr/include/glib-2.0/glib/deprecated/gallocator.h" 1 | |
14794 | # 25 "/usr/include/glib-2.0/glib/deprecated/gallocator.h" | |
14795 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
14796 | # 26 "/usr/include/glib-2.0/glib/deprecated/gallocator.h" 2 | |
14797 | ||
14798 | ||
14799 | ||
14800 | typedef struct _GAllocator GAllocator; | |
14801 | typedef struct _GMemChunk GMemChunk; | |
14802 | # 44 "/usr/include/glib-2.0/glib/deprecated/gallocator.h" | |
14803 | __attribute__((__deprecated__)) | |
14804 | GMemChunk * g_mem_chunk_new (const gchar *name, | |
14805 | gint atom_size, | |
14806 | gsize area_size, | |
14807 | gint type); | |
14808 | __attribute__((__deprecated__)) | |
14809 | void g_mem_chunk_destroy (GMemChunk *mem_chunk); | |
14810 | __attribute__((__deprecated__)) | |
14811 | gpointer g_mem_chunk_alloc (GMemChunk *mem_chunk); | |
14812 | __attribute__((__deprecated__)) | |
14813 | gpointer g_mem_chunk_alloc0 (GMemChunk *mem_chunk); | |
14814 | __attribute__((__deprecated__)) | |
14815 | void g_mem_chunk_free (GMemChunk *mem_chunk, | |
14816 | gpointer mem); | |
14817 | __attribute__((__deprecated__)) | |
14818 | void g_mem_chunk_clean (GMemChunk *mem_chunk); | |
14819 | __attribute__((__deprecated__)) | |
14820 | void g_mem_chunk_reset (GMemChunk *mem_chunk); | |
14821 | __attribute__((__deprecated__)) | |
14822 | void g_mem_chunk_print (GMemChunk *mem_chunk); | |
14823 | __attribute__((__deprecated__)) | |
14824 | void g_mem_chunk_info (void); | |
14825 | __attribute__((__deprecated__)) | |
14826 | void g_blow_chunks (void); | |
14827 | ||
14828 | ||
14829 | __attribute__((__deprecated__)) | |
14830 | GAllocator * g_allocator_new (const gchar *name, | |
14831 | guint n_preallocs); | |
14832 | __attribute__((__deprecated__)) | |
14833 | void g_allocator_free (GAllocator *allocator); | |
14834 | __attribute__((__deprecated__)) | |
14835 | void g_list_push_allocator (GAllocator *allocator); | |
14836 | __attribute__((__deprecated__)) | |
14837 | void g_list_pop_allocator (void); | |
14838 | __attribute__((__deprecated__)) | |
14839 | void g_slist_push_allocator (GAllocator *allocator); | |
14840 | __attribute__((__deprecated__)) | |
14841 | void g_slist_pop_allocator (void); | |
14842 | __attribute__((__deprecated__)) | |
14843 | void g_node_push_allocator (GAllocator *allocator); | |
14844 | __attribute__((__deprecated__)) | |
14845 | void g_node_pop_allocator (void); | |
14846 | ||
14847 | ||
14848 | # 104 "/usr/include/glib-2.0/glib.h" 2 | |
14849 | # 1 "/usr/include/glib-2.0/glib/deprecated/gcache.h" 1 | |
14850 | # 34 "/usr/include/glib-2.0/glib/deprecated/gcache.h" | |
14851 | # 1 "/usr/include/glib-2.0/glib/glist.h" 1 | |
14852 | # 35 "/usr/include/glib-2.0/glib/deprecated/gcache.h" 2 | |
14853 | ||
14854 | ||
14855 | ||
14856 | typedef struct _GCache GCache; | |
14857 | ||
14858 | typedef gpointer (*GCacheNewFunc) (gpointer key); | |
14859 | typedef gpointer (*GCacheDupFunc) (gpointer value); | |
14860 | typedef void (*GCacheDestroyFunc) (gpointer value); | |
14861 | ||
14862 | ||
14863 | ||
14864 | __attribute__((__deprecated__)) | |
14865 | GCache* g_cache_new (GCacheNewFunc value_new_func, | |
14866 | GCacheDestroyFunc value_destroy_func, | |
14867 | GCacheDupFunc key_dup_func, | |
14868 | GCacheDestroyFunc key_destroy_func, | |
14869 | GHashFunc hash_key_func, | |
14870 | GHashFunc hash_value_func, | |
14871 | GEqualFunc key_equal_func); | |
14872 | __attribute__((__deprecated__)) | |
14873 | void g_cache_destroy (GCache *cache); | |
14874 | __attribute__((__deprecated__)) | |
14875 | gpointer g_cache_insert (GCache *cache, | |
14876 | gpointer key); | |
14877 | __attribute__((__deprecated__)) | |
14878 | void g_cache_remove (GCache *cache, | |
14879 | gconstpointer value); | |
14880 | __attribute__((__deprecated__)) | |
14881 | void g_cache_key_foreach (GCache *cache, | |
14882 | GHFunc func, | |
14883 | gpointer user_data); | |
14884 | __attribute__((__deprecated__)) | |
14885 | void g_cache_value_foreach (GCache *cache, | |
14886 | GHFunc func, | |
14887 | gpointer user_data); | |
14888 | ||
14889 | ||
14890 | # 105 "/usr/include/glib-2.0/glib.h" 2 | |
14891 | # 1 "/usr/include/glib-2.0/glib/deprecated/gcompletion.h" 1 | |
14892 | # 34 "/usr/include/glib-2.0/glib/deprecated/gcompletion.h" | |
14893 | # 1 "/usr/include/glib-2.0/glib/glist.h" 1 | |
14894 | # 35 "/usr/include/glib-2.0/glib/deprecated/gcompletion.h" 2 | |
14895 | ||
14896 | ||
14897 | ||
14898 | typedef struct _GCompletion GCompletion; | |
14899 | ||
14900 | typedef gchar* (*GCompletionFunc) (gpointer); | |
14901 | ||
14902 | ||
14903 | ||
14904 | ||
14905 | typedef gint (*GCompletionStrncmpFunc) (const gchar *s1, | |
14906 | const gchar *s2, | |
14907 | gsize n); | |
14908 | ||
14909 | struct _GCompletion | |
14910 | { | |
14911 | GList* items; | |
14912 | GCompletionFunc func; | |
14913 | ||
14914 | gchar* prefix; | |
14915 | GList* cache; | |
14916 | GCompletionStrncmpFunc strncmp_func; | |
14917 | }; | |
14918 | ||
14919 | __attribute__((__deprecated__)) | |
14920 | GCompletion* g_completion_new (GCompletionFunc func); | |
14921 | __attribute__((__deprecated__)) | |
14922 | void g_completion_add_items (GCompletion* cmp, | |
14923 | GList* items); | |
14924 | __attribute__((__deprecated__)) | |
14925 | void g_completion_remove_items (GCompletion* cmp, | |
14926 | GList* items); | |
14927 | __attribute__((__deprecated__)) | |
14928 | void g_completion_clear_items (GCompletion* cmp); | |
14929 | __attribute__((__deprecated__)) | |
14930 | GList* g_completion_complete (GCompletion* cmp, | |
14931 | const gchar* prefix, | |
14932 | gchar** new_prefix); | |
14933 | __attribute__((__deprecated__)) | |
14934 | GList* g_completion_complete_utf8 (GCompletion *cmp, | |
14935 | const gchar* prefix, | |
14936 | gchar** new_prefix); | |
14937 | __attribute__((__deprecated__)) | |
14938 | void g_completion_set_compare (GCompletion *cmp, | |
14939 | GCompletionStrncmpFunc strncmp_func); | |
14940 | __attribute__((__deprecated__)) | |
14941 | void g_completion_free (GCompletion* cmp); | |
14942 | ||
14943 | ||
14944 | # 106 "/usr/include/glib-2.0/glib.h" 2 | |
14945 | # 1 "/usr/include/glib-2.0/glib/deprecated/gmain.h" 1 | |
14946 | # 34 "/usr/include/glib-2.0/glib/deprecated/gmain.h" | |
14947 | # 1 "/usr/include/glib-2.0/glib/gmain.h" 1 | |
14948 | # 35 "/usr/include/glib-2.0/glib/deprecated/gmain.h" 2 | |
14949 | ||
14950 | ||
14951 | # 136 "/usr/include/glib-2.0/glib/deprecated/gmain.h" | |
14952 | ||
14953 | # 107 "/usr/include/glib-2.0/glib.h" 2 | |
14954 | # 1 "/usr/include/glib-2.0/glib/deprecated/grel.h" 1 | |
14955 | # 34 "/usr/include/glib-2.0/glib/deprecated/grel.h" | |
14956 | # 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 | |
14957 | # 35 "/usr/include/glib-2.0/glib/deprecated/grel.h" 2 | |
14958 | ||
14959 | ||
14960 | ||
14961 | typedef struct _GRelation GRelation; | |
14962 | typedef struct _GTuples GTuples; | |
14963 | ||
14964 | struct _GTuples | |
14965 | { | |
14966 | guint len; | |
14967 | }; | |
14968 | # 69 "/usr/include/glib-2.0/glib/deprecated/grel.h" | |
14969 | __attribute__((__deprecated__)) | |
14970 | GRelation* g_relation_new (gint fields); | |
14971 | __attribute__((__deprecated__)) | |
14972 | void g_relation_destroy (GRelation *relation); | |
14973 | __attribute__((__deprecated__)) | |
14974 | void g_relation_index (GRelation *relation, | |
14975 | gint field, | |
14976 | GHashFunc hash_func, | |
14977 | GEqualFunc key_equal_func); | |
14978 | __attribute__((__deprecated__)) | |
14979 | void g_relation_insert (GRelation *relation, | |
14980 | ...); | |
14981 | __attribute__((__deprecated__)) | |
14982 | gint g_relation_delete (GRelation *relation, | |
14983 | gconstpointer key, | |
14984 | gint field); | |
14985 | __attribute__((__deprecated__)) | |
14986 | GTuples* g_relation_select (GRelation *relation, | |
14987 | gconstpointer key, | |
14988 | gint field); | |
14989 | __attribute__((__deprecated__)) | |
14990 | gint g_relation_count (GRelation *relation, | |
14991 | gconstpointer key, | |
14992 | gint field); | |
14993 | __attribute__((__deprecated__)) | |
14994 | gboolean g_relation_exists (GRelation *relation, | |
14995 | ...); | |
14996 | __attribute__((__deprecated__)) | |
14997 | void g_relation_print (GRelation *relation); | |
14998 | __attribute__((__deprecated__)) | |
14999 | void g_tuples_destroy (GTuples *tuples); | |
15000 | __attribute__((__deprecated__)) | |
15001 | gpointer g_tuples_index (GTuples *tuples, | |
15002 | gint index_, | |
15003 | gint field); | |
15004 | ||
15005 | ||
15006 | # 108 "/usr/include/glib-2.0/glib.h" 2 | |
15007 | # 1 "/usr/include/glib-2.0/glib/deprecated/gthread.h" 1 | |
15008 | # 34 "/usr/include/glib-2.0/glib/deprecated/gthread.h" | |
15009 | # 1 "/usr/include/glib-2.0/glib/gthread.h" 1 | |
15010 | # 35 "/usr/include/glib-2.0/glib/deprecated/gthread.h" 2 | |
15011 | ||
15012 | ||
15013 | ||
15014 | typedef enum | |
15015 | { | |
15016 | G_THREAD_PRIORITY_LOW, | |
15017 | G_THREAD_PRIORITY_NORMAL, | |
15018 | G_THREAD_PRIORITY_HIGH, | |
15019 | G_THREAD_PRIORITY_URGENT | |
15020 | } GThreadPriority; | |
15021 | ||
15022 | struct _GThread | |
15023 | { | |
15024 | ||
15025 | GThreadFunc func; | |
15026 | gpointer data; | |
15027 | gboolean joinable; | |
15028 | GThreadPriority priority; | |
15029 | }; | |
15030 | ||
15031 | typedef struct _GThreadFunctions GThreadFunctions; | |
15032 | struct _GThreadFunctions | |
15033 | { | |
15034 | GMutex* (*mutex_new) (void); | |
15035 | void (*mutex_lock) (GMutex *mutex); | |
15036 | gboolean (*mutex_trylock) (GMutex *mutex); | |
15037 | void (*mutex_unlock) (GMutex *mutex); | |
15038 | void (*mutex_free) (GMutex *mutex); | |
15039 | GCond* (*cond_new) (void); | |
15040 | void (*cond_signal) (GCond *cond); | |
15041 | void (*cond_broadcast) (GCond *cond); | |
15042 | void (*cond_wait) (GCond *cond, | |
15043 | GMutex *mutex); | |
15044 | gboolean (*cond_timed_wait) (GCond *cond, | |
15045 | GMutex *mutex, | |
15046 | GTimeVal *end_time); | |
15047 | void (*cond_free) (GCond *cond); | |
15048 | GPrivate* (*private_new) (GDestroyNotify destructor); | |
15049 | gpointer (*private_get) (GPrivate *private_key); | |
15050 | void (*private_set) (GPrivate *private_key, | |
15051 | gpointer data); | |
15052 | void (*thread_create) (GThreadFunc func, | |
15053 | gpointer data, | |
15054 | gulong stack_size, | |
15055 | gboolean joinable, | |
15056 | gboolean bound, | |
15057 | GThreadPriority priority, | |
15058 | gpointer thread, | |
15059 | GError **error); | |
15060 | void (*thread_yield) (void); | |
15061 | void (*thread_join) (gpointer thread); | |
15062 | void (*thread_exit) (void); | |
15063 | void (*thread_set_priority)(gpointer thread, | |
15064 | GThreadPriority priority); | |
15065 | void (*thread_self) (gpointer thread); | |
15066 | gboolean (*thread_equal) (gpointer thread1, | |
15067 | gpointer thread2); | |
15068 | }; | |
15069 | ||
15070 | extern GThreadFunctions g_thread_functions_for_glib_use; | |
15071 | extern gboolean g_thread_use_default_impl; | |
15072 | ||
15073 | extern guint64 (*g_thread_gettime) (void); | |
15074 | ||
15075 | ||
15076 | GThread *g_thread_create (GThreadFunc func, | |
15077 | gpointer data, | |
15078 | gboolean joinable, | |
15079 | GError **error); | |
15080 | ||
15081 | ||
15082 | GThread *g_thread_create_full (GThreadFunc func, | |
15083 | gpointer data, | |
15084 | gulong stack_size, | |
15085 | gboolean joinable, | |
15086 | gboolean bound, | |
15087 | GThreadPriority priority, | |
15088 | GError **error); | |
15089 | ||
15090 | ||
15091 | void g_thread_set_priority (GThread *thread, | |
15092 | GThreadPriority priority); | |
15093 | ||
15094 | ||
15095 | void g_thread_foreach (GFunc thread_func, | |
15096 | gpointer user_data); | |
15097 | ||
15098 | ||
15099 | # 1 "/usr/include/pthread.h" 1 3 4 | |
15100 | # 25 "/usr/include/pthread.h" 3 4 | |
15101 | # 1 "/usr/include/sched.h" 1 3 4 | |
15102 | # 30 "/usr/include/sched.h" 3 4 | |
15103 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
15104 | # 31 "/usr/include/sched.h" 2 3 4 | |
15105 | # 43 "/usr/include/sched.h" 3 4 | |
15106 | # 1 "/usr/include/bits/sched.h" 1 3 4 | |
15107 | # 74 "/usr/include/bits/sched.h" 3 4 | |
15108 | struct sched_param | |
15109 | { | |
15110 | int __sched_priority; | |
15111 | }; | |
15112 | ||
15113 | ||
15114 | ||
15115 | ||
15116 | ||
15117 | extern int clone (int (*__fn) (void *__arg), void *__child_stack, | |
15118 | int __flags, void *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)); | |
15119 | ||
15120 | ||
15121 | extern int unshare (int __flags) __attribute__ ((__nothrow__ , __leaf__)); | |
15122 | ||
15123 | ||
15124 | extern int sched_getcpu (void) __attribute__ ((__nothrow__ , __leaf__)); | |
15125 | ||
15126 | ||
15127 | extern int setns (int __fd, int __nstype) __attribute__ ((__nothrow__ , __leaf__)); | |
15128 | ||
15129 | ||
15130 | ||
15131 | ||
15132 | ||
15133 | ||
15134 | ||
15135 | ||
15136 | ||
15137 | ||
15138 | ||
15139 | struct __sched_param | |
15140 | { | |
15141 | int __sched_priority; | |
15142 | }; | |
15143 | # 120 "/usr/include/bits/sched.h" 3 4 | |
15144 | typedef unsigned long int __cpu_mask; | |
15145 | ||
15146 | ||
15147 | ||
15148 | ||
15149 | ||
15150 | ||
15151 | typedef struct | |
15152 | { | |
15153 | __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; | |
15154 | } cpu_set_t; | |
15155 | # 203 "/usr/include/bits/sched.h" 3 4 | |
15156 | ||
15157 | ||
15158 | extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) | |
15159 | __attribute__ ((__nothrow__ , __leaf__)); | |
15160 | extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); | |
15161 | extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__)); | |
15162 | ||
15163 | ||
15164 | # 44 "/usr/include/sched.h" 2 3 4 | |
15165 | ||
15166 | ||
15167 | ||
15168 | ||
15169 | ||
15170 | ||
15171 | ||
15172 | extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) | |
15173 | __attribute__ ((__nothrow__ , __leaf__)); | |
15174 | ||
15175 | ||
15176 | extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); | |
15177 | ||
15178 | ||
15179 | extern int sched_setscheduler (__pid_t __pid, int __policy, | |
15180 | __const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); | |
15181 | ||
15182 | ||
15183 | extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); | |
15184 | ||
15185 | ||
15186 | extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__)); | |
15187 | ||
15188 | ||
15189 | extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__)); | |
15190 | ||
15191 | ||
15192 | extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__)); | |
15193 | ||
15194 | ||
15195 | extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__)); | |
15196 | # 118 "/usr/include/sched.h" 3 4 | |
15197 | extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, | |
15198 | __const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)); | |
15199 | ||
15200 | ||
15201 | extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, | |
15202 | cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)); | |
15203 | ||
15204 | ||
15205 | ||
15206 | # 26 "/usr/include/pthread.h" 2 3 4 | |
15207 | ||
15208 | ||
15209 | ||
15210 | # 1 "/usr/include/bits/setjmp.h" 1 3 4 | |
15211 | # 29 "/usr/include/bits/setjmp.h" 3 4 | |
15212 | typedef int __jmp_buf[6]; | |
15213 | # 30 "/usr/include/pthread.h" 2 3 4 | |
15214 | # 1 "/usr/include/bits/wordsize.h" 1 3 4 | |
15215 | # 31 "/usr/include/pthread.h" 2 3 4 | |
15216 | ||
15217 | ||
15218 | ||
15219 | enum | |
15220 | { | |
15221 | PTHREAD_CREATE_JOINABLE, | |
15222 | ||
15223 | PTHREAD_CREATE_DETACHED | |
15224 | ||
15225 | }; | |
15226 | ||
15227 | ||
15228 | ||
15229 | enum | |
15230 | { | |
15231 | PTHREAD_MUTEX_TIMED_NP, | |
15232 | PTHREAD_MUTEX_RECURSIVE_NP, | |
15233 | PTHREAD_MUTEX_ERRORCHECK_NP, | |
15234 | PTHREAD_MUTEX_ADAPTIVE_NP | |
15235 | ||
15236 | , | |
15237 | PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, | |
15238 | PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, | |
15239 | PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, | |
15240 | PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL | |
15241 | ||
15242 | ||
15243 | ||
15244 | , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP | |
15245 | ||
15246 | }; | |
15247 | ||
15248 | ||
15249 | ||
15250 | ||
15251 | enum | |
15252 | { | |
15253 | PTHREAD_MUTEX_STALLED, | |
15254 | PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, | |
15255 | PTHREAD_MUTEX_ROBUST, | |
15256 | PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST | |
15257 | }; | |
15258 | ||
15259 | ||
15260 | ||
15261 | ||
15262 | ||
15263 | enum | |
15264 | { | |
15265 | PTHREAD_PRIO_NONE, | |
15266 | PTHREAD_PRIO_INHERIT, | |
15267 | PTHREAD_PRIO_PROTECT | |
15268 | }; | |
15269 | # 115 "/usr/include/pthread.h" 3 4 | |
15270 | enum | |
15271 | { | |
15272 | PTHREAD_RWLOCK_PREFER_READER_NP, | |
15273 | PTHREAD_RWLOCK_PREFER_WRITER_NP, | |
15274 | PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, | |
15275 | PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP | |
15276 | }; | |
15277 | # 147 "/usr/include/pthread.h" 3 4 | |
15278 | enum | |
15279 | { | |
15280 | PTHREAD_INHERIT_SCHED, | |
15281 | ||
15282 | PTHREAD_EXPLICIT_SCHED | |
15283 | ||
15284 | }; | |
15285 | ||
15286 | ||
15287 | ||
15288 | enum | |
15289 | { | |
15290 | PTHREAD_SCOPE_SYSTEM, | |
15291 | ||
15292 | PTHREAD_SCOPE_PROCESS | |
15293 | ||
15294 | }; | |
15295 | ||
15296 | ||
15297 | ||
15298 | enum | |
15299 | { | |
15300 | PTHREAD_PROCESS_PRIVATE, | |
15301 | ||
15302 | PTHREAD_PROCESS_SHARED | |
15303 | ||
15304 | }; | |
15305 | # 182 "/usr/include/pthread.h" 3 4 | |
15306 | struct _pthread_cleanup_buffer | |
15307 | { | |
15308 | void (*__routine) (void *); | |
15309 | void *__arg; | |
15310 | int __canceltype; | |
15311 | struct _pthread_cleanup_buffer *__prev; | |
15312 | }; | |
15313 | ||
15314 | ||
15315 | enum | |
15316 | { | |
15317 | PTHREAD_CANCEL_ENABLE, | |
15318 | ||
15319 | PTHREAD_CANCEL_DISABLE | |
15320 | ||
15321 | }; | |
15322 | enum | |
15323 | { | |
15324 | PTHREAD_CANCEL_DEFERRED, | |
15325 | ||
15326 | PTHREAD_CANCEL_ASYNCHRONOUS | |
15327 | ||
15328 | }; | |
15329 | # 220 "/usr/include/pthread.h" 3 4 | |
15330 | ||
15331 | ||
15332 | ||
15333 | ||
15334 | ||
15335 | extern int pthread_create (pthread_t *__restrict __newthread, | |
15336 | __const pthread_attr_t *__restrict __attr, | |
15337 | void *(*__start_routine) (void *), | |
15338 | void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); | |
15339 | ||
15340 | ||
15341 | ||
15342 | ||
15343 | ||
15344 | extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); | |
15345 | ||
15346 | ||
15347 | ||
15348 | ||
15349 | ||
15350 | ||
15351 | ||
15352 | extern int pthread_join (pthread_t __th, void **__thread_return); | |
15353 | ||
15354 | ||
15355 | ||
15356 | ||
15357 | extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__ , __leaf__)); | |
15358 | ||
15359 | ||
15360 | ||
15361 | ||
15362 | ||
15363 | ||
15364 | ||
15365 | extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, | |
15366 | __const struct timespec *__abstime); | |
15367 | ||
15368 | ||
15369 | ||
15370 | ||
15371 | ||
15372 | ||
15373 | extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__)); | |
15374 | ||
15375 | ||
15376 | ||
15377 | extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); | |
15378 | ||
15379 | ||
15380 | extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__ , __leaf__)); | |
15381 | ||
15382 | ||
15383 | ||
15384 | ||
15385 | ||
15386 | ||
15387 | ||
15388 | extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15389 | ||
15390 | ||
15391 | extern int pthread_attr_destroy (pthread_attr_t *__attr) | |
15392 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15393 | ||
15394 | ||
15395 | extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, | |
15396 | int *__detachstate) | |
15397 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15398 | ||
15399 | ||
15400 | extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, | |
15401 | int __detachstate) | |
15402 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15403 | ||
15404 | ||
15405 | ||
15406 | extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, | |
15407 | size_t *__guardsize) | |
15408 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15409 | ||
15410 | ||
15411 | extern int pthread_attr_setguardsize (pthread_attr_t *__attr, | |
15412 | size_t __guardsize) | |
15413 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15414 | ||
15415 | ||
15416 | ||
15417 | extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict | |
15418 | __attr, | |
15419 | struct sched_param *__restrict __param) | |
15420 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15421 | ||
15422 | ||
15423 | extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, | |
15424 | __const struct sched_param *__restrict | |
15425 | __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15426 | ||
15427 | ||
15428 | extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict | |
15429 | __attr, int *__restrict __policy) | |
15430 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15431 | ||
15432 | ||
15433 | extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) | |
15434 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15435 | ||
15436 | ||
15437 | extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict | |
15438 | __attr, int *__restrict __inherit) | |
15439 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15440 | ||
15441 | ||
15442 | extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, | |
15443 | int __inherit) | |
15444 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15445 | ||
15446 | ||
15447 | ||
15448 | extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, | |
15449 | int *__restrict __scope) | |
15450 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15451 | ||
15452 | ||
15453 | extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) | |
15454 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15455 | ||
15456 | ||
15457 | extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict | |
15458 | __attr, void **__restrict __stackaddr) | |
15459 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); | |
15460 | ||
15461 | ||
15462 | ||
15463 | ||
15464 | ||
15465 | extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, | |
15466 | void *__stackaddr) | |
15467 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); | |
15468 | ||
15469 | ||
15470 | extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict | |
15471 | __attr, size_t *__restrict __stacksize) | |
15472 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15473 | ||
15474 | ||
15475 | ||
15476 | ||
15477 | extern int pthread_attr_setstacksize (pthread_attr_t *__attr, | |
15478 | size_t __stacksize) | |
15479 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15480 | ||
15481 | ||
15482 | ||
15483 | extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, | |
15484 | void **__restrict __stackaddr, | |
15485 | size_t *__restrict __stacksize) | |
15486 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); | |
15487 | ||
15488 | ||
15489 | ||
15490 | ||
15491 | extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, | |
15492 | size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15493 | ||
15494 | ||
15495 | ||
15496 | ||
15497 | ||
15498 | extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, | |
15499 | size_t __cpusetsize, | |
15500 | __const cpu_set_t *__cpuset) | |
15501 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); | |
15502 | ||
15503 | ||
15504 | ||
15505 | extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, | |
15506 | size_t __cpusetsize, | |
15507 | cpu_set_t *__cpuset) | |
15508 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); | |
15509 | ||
15510 | ||
15511 | ||
15512 | ||
15513 | ||
15514 | extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) | |
15515 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
15516 | ||
15517 | ||
15518 | ||
15519 | ||
15520 | ||
15521 | ||
15522 | ||
15523 | extern int pthread_setschedparam (pthread_t __target_thread, int __policy, | |
15524 | __const struct sched_param *__param) | |
15525 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); | |
15526 | ||
15527 | ||
15528 | extern int pthread_getschedparam (pthread_t __target_thread, | |
15529 | int *__restrict __policy, | |
15530 | struct sched_param *__restrict __param) | |
15531 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); | |
15532 | ||
15533 | ||
15534 | extern int pthread_setschedprio (pthread_t __target_thread, int __prio) | |
15535 | __attribute__ ((__nothrow__ , __leaf__)); | |
15536 | ||
15537 | ||
15538 | ||
15539 | ||
15540 | extern int pthread_getname_np (pthread_t __target_thread, char *__buf, | |
15541 | size_t __buflen) | |
15542 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
15543 | ||
15544 | ||
15545 | extern int pthread_setname_np (pthread_t __target_thread, __const char *__name) | |
15546 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
15547 | ||
15548 | ||
15549 | ||
15550 | ||
15551 | ||
15552 | extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__ , __leaf__)); | |
15553 | ||
15554 | ||
15555 | extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__ , __leaf__)); | |
15556 | ||
15557 | ||
15558 | ||
15559 | ||
15560 | ||
15561 | ||
15562 | ||
15563 | extern int pthread_yield (void) __attribute__ ((__nothrow__ , __leaf__)); | |
15564 | ||
15565 | ||
15566 | ||
15567 | ||
15568 | extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, | |
15569 | __const cpu_set_t *__cpuset) | |
15570 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); | |
15571 | ||
15572 | ||
15573 | extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, | |
15574 | cpu_set_t *__cpuset) | |
15575 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); | |
15576 | # 478 "/usr/include/pthread.h" 3 4 | |
15577 | extern int pthread_once (pthread_once_t *__once_control, | |
15578 | void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); | |
15579 | # 490 "/usr/include/pthread.h" 3 4 | |
15580 | extern int pthread_setcancelstate (int __state, int *__oldstate); | |
15581 | ||
15582 | ||
15583 | ||
15584 | extern int pthread_setcanceltype (int __type, int *__oldtype); | |
15585 | ||
15586 | ||
15587 | extern int pthread_cancel (pthread_t __th); | |
15588 | ||
15589 | ||
15590 | ||
15591 | ||
15592 | extern void pthread_testcancel (void); | |
15593 | ||
15594 | ||
15595 | ||
15596 | ||
15597 | typedef struct | |
15598 | { | |
15599 | struct | |
15600 | { | |
15601 | __jmp_buf __cancel_jmp_buf; | |
15602 | int __mask_was_saved; | |
15603 | } __cancel_jmp_buf[1]; | |
15604 | void *__pad[4]; | |
15605 | } __pthread_unwind_buf_t __attribute__ ((__aligned__)); | |
15606 | # 524 "/usr/include/pthread.h" 3 4 | |
15607 | struct __pthread_cleanup_frame | |
15608 | { | |
15609 | void (*__cancel_routine) (void *); | |
15610 | void *__cancel_arg; | |
15611 | int __do_it; | |
15612 | int __cancel_type; | |
15613 | }; | |
15614 | # 664 "/usr/include/pthread.h" 3 4 | |
15615 | extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) | |
15616 | __attribute__ ((__regparm__ (1))); | |
15617 | # 676 "/usr/include/pthread.h" 3 4 | |
15618 | extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) | |
15619 | __attribute__ ((__regparm__ (1))); | |
15620 | # 699 "/usr/include/pthread.h" 3 4 | |
15621 | extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) | |
15622 | __attribute__ ((__regparm__ (1))); | |
15623 | # 712 "/usr/include/pthread.h" 3 4 | |
15624 | extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) | |
15625 | __attribute__ ((__regparm__ (1))); | |
15626 | ||
15627 | ||
15628 | ||
15629 | extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) | |
15630 | __attribute__ ((__regparm__ (1))) __attribute__ ((__noreturn__)) | |
15631 | ||
15632 | __attribute__ ((__weak__)) | |
15633 | ||
15634 | ; | |
15635 | ||
15636 | ||
15637 | ||
15638 | struct __jmp_buf_tag; | |
15639 | extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__ , __leaf__)); | |
15640 | ||
15641 | ||
15642 | ||
15643 | ||
15644 | ||
15645 | extern int pthread_mutex_init (pthread_mutex_t *__mutex, | |
15646 | __const pthread_mutexattr_t *__mutexattr) | |
15647 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15648 | ||
15649 | ||
15650 | extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) | |
15651 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15652 | ||
15653 | ||
15654 | extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) | |
15655 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15656 | ||
15657 | ||
15658 | extern int pthread_mutex_lock (pthread_mutex_t *__mutex) | |
15659 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15660 | ||
15661 | ||
15662 | ||
15663 | extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, | |
15664 | __const struct timespec *__restrict | |
15665 | __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
15666 | ||
15667 | ||
15668 | ||
15669 | extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) | |
15670 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15671 | ||
15672 | ||
15673 | ||
15674 | extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * | |
15675 | __restrict __mutex, | |
15676 | int *__restrict __prioceiling) | |
15677 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15678 | ||
15679 | ||
15680 | ||
15681 | extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, | |
15682 | int __prioceiling, | |
15683 | int *__restrict __old_ceiling) | |
15684 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); | |
15685 | ||
15686 | ||
15687 | ||
15688 | ||
15689 | extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) | |
15690 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15691 | ||
15692 | extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) | |
15693 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15694 | # 790 "/usr/include/pthread.h" 3 4 | |
15695 | extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) | |
15696 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15697 | ||
15698 | ||
15699 | extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) | |
15700 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15701 | ||
15702 | ||
15703 | extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * | |
15704 | __restrict __attr, | |
15705 | int *__restrict __pshared) | |
15706 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15707 | ||
15708 | ||
15709 | extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, | |
15710 | int __pshared) | |
15711 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15712 | ||
15713 | ||
15714 | ||
15715 | extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict | |
15716 | __attr, int *__restrict __kind) | |
15717 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15718 | ||
15719 | ||
15720 | ||
15721 | ||
15722 | extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) | |
15723 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15724 | ||
15725 | ||
15726 | ||
15727 | extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * | |
15728 | __restrict __attr, | |
15729 | int *__restrict __protocol) | |
15730 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15731 | ||
15732 | ||
15733 | ||
15734 | extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, | |
15735 | int __protocol) | |
15736 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15737 | ||
15738 | ||
15739 | extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * | |
15740 | __restrict __attr, | |
15741 | int *__restrict __prioceiling) | |
15742 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15743 | ||
15744 | ||
15745 | extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, | |
15746 | int __prioceiling) | |
15747 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15748 | ||
15749 | ||
15750 | ||
15751 | extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, | |
15752 | int *__robustness) | |
15753 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15754 | ||
15755 | extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, | |
15756 | int *__robustness) | |
15757 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15758 | ||
15759 | ||
15760 | ||
15761 | extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, | |
15762 | int __robustness) | |
15763 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15764 | ||
15765 | extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, | |
15766 | int __robustness) | |
15767 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15768 | # 872 "/usr/include/pthread.h" 3 4 | |
15769 | extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, | |
15770 | __const pthread_rwlockattr_t *__restrict | |
15771 | __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15772 | ||
15773 | ||
15774 | extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) | |
15775 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15776 | ||
15777 | ||
15778 | extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) | |
15779 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15780 | ||
15781 | ||
15782 | extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) | |
15783 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15784 | ||
15785 | ||
15786 | ||
15787 | extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, | |
15788 | __const struct timespec *__restrict | |
15789 | __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
15790 | ||
15791 | ||
15792 | ||
15793 | extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) | |
15794 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15795 | ||
15796 | ||
15797 | extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) | |
15798 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15799 | ||
15800 | ||
15801 | ||
15802 | extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, | |
15803 | __const struct timespec *__restrict | |
15804 | __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); | |
15805 | ||
15806 | ||
15807 | ||
15808 | extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) | |
15809 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15810 | ||
15811 | ||
15812 | ||
15813 | ||
15814 | ||
15815 | extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) | |
15816 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15817 | ||
15818 | ||
15819 | extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) | |
15820 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15821 | ||
15822 | ||
15823 | extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * | |
15824 | __restrict __attr, | |
15825 | int *__restrict __pshared) | |
15826 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15827 | ||
15828 | ||
15829 | extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, | |
15830 | int __pshared) | |
15831 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15832 | ||
15833 | ||
15834 | extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * | |
15835 | __restrict __attr, | |
15836 | int *__restrict __pref) | |
15837 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15838 | ||
15839 | ||
15840 | extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, | |
15841 | int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15842 | ||
15843 | ||
15844 | ||
15845 | ||
15846 | ||
15847 | ||
15848 | ||
15849 | extern int pthread_cond_init (pthread_cond_t *__restrict __cond, | |
15850 | __const pthread_condattr_t *__restrict | |
15851 | __cond_attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15852 | ||
15853 | ||
15854 | extern int pthread_cond_destroy (pthread_cond_t *__cond) | |
15855 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15856 | ||
15857 | ||
15858 | extern int pthread_cond_signal (pthread_cond_t *__cond) | |
15859 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15860 | ||
15861 | ||
15862 | extern int pthread_cond_broadcast (pthread_cond_t *__cond) | |
15863 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15864 | ||
15865 | ||
15866 | ||
15867 | ||
15868 | ||
15869 | ||
15870 | extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, | |
15871 | pthread_mutex_t *__restrict __mutex) | |
15872 | __attribute__ ((__nonnull__ (1, 2))); | |
15873 | # 984 "/usr/include/pthread.h" 3 4 | |
15874 | extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, | |
15875 | pthread_mutex_t *__restrict __mutex, | |
15876 | __const struct timespec *__restrict | |
15877 | __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); | |
15878 | ||
15879 | ||
15880 | ||
15881 | ||
15882 | extern int pthread_condattr_init (pthread_condattr_t *__attr) | |
15883 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15884 | ||
15885 | ||
15886 | extern int pthread_condattr_destroy (pthread_condattr_t *__attr) | |
15887 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15888 | ||
15889 | ||
15890 | extern int pthread_condattr_getpshared (__const pthread_condattr_t * | |
15891 | __restrict __attr, | |
15892 | int *__restrict __pshared) | |
15893 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15894 | ||
15895 | ||
15896 | extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, | |
15897 | int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15898 | ||
15899 | ||
15900 | ||
15901 | extern int pthread_condattr_getclock (__const pthread_condattr_t * | |
15902 | __restrict __attr, | |
15903 | __clockid_t *__restrict __clock_id) | |
15904 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15905 | ||
15906 | ||
15907 | extern int pthread_condattr_setclock (pthread_condattr_t *__attr, | |
15908 | __clockid_t __clock_id) | |
15909 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15910 | # 1028 "/usr/include/pthread.h" 3 4 | |
15911 | extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) | |
15912 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15913 | ||
15914 | ||
15915 | extern int pthread_spin_destroy (pthread_spinlock_t *__lock) | |
15916 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15917 | ||
15918 | ||
15919 | extern int pthread_spin_lock (pthread_spinlock_t *__lock) | |
15920 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15921 | ||
15922 | ||
15923 | extern int pthread_spin_trylock (pthread_spinlock_t *__lock) | |
15924 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15925 | ||
15926 | ||
15927 | extern int pthread_spin_unlock (pthread_spinlock_t *__lock) | |
15928 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15929 | ||
15930 | ||
15931 | ||
15932 | ||
15933 | ||
15934 | ||
15935 | extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, | |
15936 | __const pthread_barrierattr_t *__restrict | |
15937 | __attr, unsigned int __count) | |
15938 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15939 | ||
15940 | ||
15941 | extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) | |
15942 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15943 | ||
15944 | ||
15945 | extern int pthread_barrier_wait (pthread_barrier_t *__barrier) | |
15946 | __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); | |
15947 | ||
15948 | ||
15949 | ||
15950 | extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) | |
15951 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15952 | ||
15953 | ||
15954 | extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) | |
15955 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15956 | ||
15957 | ||
15958 | extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * | |
15959 | __restrict __attr, | |
15960 | int *__restrict __pshared) | |
15961 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); | |
15962 | ||
15963 | ||
15964 | extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, | |
15965 | int __pshared) | |
15966 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15967 | # 1095 "/usr/include/pthread.h" 3 4 | |
15968 | extern int pthread_key_create (pthread_key_t *__key, | |
15969 | void (*__destr_function) (void *)) | |
15970 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); | |
15971 | ||
15972 | ||
15973 | extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__)); | |
15974 | ||
15975 | ||
15976 | extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__)); | |
15977 | ||
15978 | ||
15979 | extern int pthread_setspecific (pthread_key_t __key, | |
15980 | __const void *__pointer) __attribute__ ((__nothrow__ , __leaf__)) ; | |
15981 | ||
15982 | ||
15983 | ||
15984 | ||
15985 | extern int pthread_getcpuclockid (pthread_t __thread_id, | |
15986 | __clockid_t *__clock_id) | |
15987 | __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); | |
15988 | # 1129 "/usr/include/pthread.h" 3 4 | |
15989 | extern int pthread_atfork (void (*__prepare) (void), | |
15990 | void (*__parent) (void), | |
15991 | void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__)); | |
15992 | ||
15993 | ||
15994 | ||
15995 | ||
15996 | extern __inline int | |
15997 | __attribute__ ((__nothrow__ , __leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) | |
15998 | { | |
15999 | return __thread1 == __thread2; | |
16000 | } | |
16001 | ||
16002 | ||
16003 | ||
16004 | # 124 "/usr/include/glib-2.0/glib/deprecated/gthread.h" 2 | |
16005 | ||
16006 | ||
16007 | ||
16008 | ||
16009 | typedef struct | |
16010 | { | |
16011 | GMutex *mutex; | |
16012 | ||
16013 | ||
16014 | pthread_mutex_t unused; | |
16015 | ||
16016 | } GStaticMutex; | |
16017 | # 144 "/usr/include/glib-2.0/glib/deprecated/gthread.h" | |
16018 | ||
16019 | void g_static_mutex_init (GStaticMutex *mutex); | |
16020 | ||
16021 | void g_static_mutex_free (GStaticMutex *mutex); | |
16022 | GMutex *g_static_mutex_get_mutex_impl (GStaticMutex *mutex); | |
16023 | ||
16024 | typedef struct _GStaticRecMutex GStaticRecMutex; | |
16025 | struct _GStaticRecMutex | |
16026 | { | |
16027 | ||
16028 | GStaticMutex mutex; | |
16029 | guint depth; | |
16030 | ||
16031 | ||
16032 | union { | |
16033 | ||
16034 | ||
16035 | ||
16036 | pthread_t owner; | |
16037 | ||
16038 | gdouble dummy; | |
16039 | } unused; | |
16040 | }; | |
16041 | ||
16042 | ||
16043 | ||
16044 | void g_static_rec_mutex_init (GStaticRecMutex *mutex); | |
16045 | ||
16046 | ||
16047 | void g_static_rec_mutex_lock (GStaticRecMutex *mutex); | |
16048 | ||
16049 | ||
16050 | gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex); | |
16051 | ||
16052 | ||
16053 | void g_static_rec_mutex_unlock (GStaticRecMutex *mutex); | |
16054 | ||
16055 | ||
16056 | void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex, | |
16057 | guint depth); | |
16058 | ||
16059 | ||
16060 | guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex); | |
16061 | ||
16062 | ||
16063 | void g_static_rec_mutex_free (GStaticRecMutex *mutex); | |
16064 | ||
16065 | typedef struct _GStaticRWLock GStaticRWLock; | |
16066 | struct _GStaticRWLock | |
16067 | { | |
16068 | ||
16069 | GStaticMutex mutex; | |
16070 | GCond *read_cond; | |
16071 | GCond *write_cond; | |
16072 | guint read_counter; | |
16073 | gboolean have_writer; | |
16074 | guint want_to_read; | |
16075 | guint want_to_write; | |
16076 | }; | |
16077 | ||
16078 | ||
16079 | ||
16080 | ||
16081 | void g_static_rw_lock_init (GStaticRWLock *lock); | |
16082 | ||
16083 | ||
16084 | void g_static_rw_lock_reader_lock (GStaticRWLock *lock); | |
16085 | ||
16086 | ||
16087 | gboolean g_static_rw_lock_reader_trylock (GStaticRWLock *lock); | |
16088 | ||
16089 | ||
16090 | void g_static_rw_lock_reader_unlock (GStaticRWLock *lock); | |
16091 | ||
16092 | ||
16093 | void g_static_rw_lock_writer_lock (GStaticRWLock *lock); | |
16094 | ||
16095 | ||
16096 | gboolean g_static_rw_lock_writer_trylock (GStaticRWLock *lock); | |
16097 | ||
16098 | ||
16099 | void g_static_rw_lock_writer_unlock (GStaticRWLock *lock); | |
16100 | ||
16101 | ||
16102 | void g_static_rw_lock_free (GStaticRWLock *lock); | |
16103 | ||
16104 | ||
16105 | GPrivate * g_private_new (GDestroyNotify notify); | |
16106 | ||
16107 | typedef struct _GStaticPrivate GStaticPrivate; | |
16108 | struct _GStaticPrivate | |
16109 | { | |
16110 | ||
16111 | guint index; | |
16112 | }; | |
16113 | ||
16114 | ||
16115 | ||
16116 | void g_static_private_init (GStaticPrivate *private_key); | |
16117 | ||
16118 | ||
16119 | gpointer g_static_private_get (GStaticPrivate *private_key); | |
16120 | ||
16121 | ||
16122 | void g_static_private_set (GStaticPrivate *private_key, | |
16123 | gpointer data, | |
16124 | GDestroyNotify notify); | |
16125 | ||
16126 | ||
16127 | void g_static_private_free (GStaticPrivate *private_key); | |
16128 | ||
16129 | ||
16130 | gboolean g_once_init_enter_impl (volatile gsize *location); | |
16131 | ||
16132 | ||
16133 | void g_thread_init (gpointer vtable); | |
16134 | ||
16135 | void g_thread_init_with_errorcheck_mutexes (gpointer vtable); | |
16136 | ||
16137 | ||
16138 | gboolean g_thread_get_initialized (void); | |
16139 | ||
16140 | extern gboolean g_threads_got_initialized; | |
16141 | ||
16142 | ||
16143 | ||
16144 | ||
16145 | GMutex * g_mutex_new (void); | |
16146 | ||
16147 | void g_mutex_free (GMutex *mutex); | |
16148 | ||
16149 | GCond * g_cond_new (void); | |
16150 | ||
16151 | void g_cond_free (GCond *cond); | |
16152 | ||
16153 | gboolean g_cond_timed_wait (GCond *cond, | |
16154 | GMutex *mutex, | |
16155 | GTimeVal *timeval); | |
16156 | ||
16157 | ||
16158 | # 109 "/usr/include/glib-2.0/glib.h" 2 | |
16159 | # 40 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
16160 | ||
16161 | ||
16162 | ||
16163 | ||
16164 | ||
16165 | ||
16166 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-os-posix.h" 1 | |
16167 | # 29 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-os-posix.h" | |
16168 | void os_set_line_buffering(void); | |
16169 | void os_set_proc_name(const char *s); | |
16170 | void os_setup_signal_handling(void); | |
16171 | void os_daemonize(void); | |
16172 | void os_setup_post(void); | |
16173 | ||
16174 | typedef struct timeval qemu_timeval; | |
16175 | # 46 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-os-posix.h" | |
16176 | typedef struct timespec qemu_timespec; | |
16177 | int qemu_utimens(const char *path, const qemu_timespec *times); | |
16178 | # 47 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
16179 | # 91 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" | |
16180 | # 1 "/usr/include/sys/uio.h" 1 3 4 | |
16181 | # 26 "/usr/include/sys/uio.h" 3 4 | |
16182 | ||
16183 | ||
16184 | ||
16185 | # 1 "/usr/include/bits/uio.h" 1 3 4 | |
16186 | # 55 "/usr/include/bits/uio.h" 3 4 | |
16187 | ||
16188 | ||
16189 | ||
16190 | extern ssize_t process_vm_readv (pid_t __pid, __const struct iovec *__lvec, | |
16191 | unsigned long int __liovcnt, | |
16192 | __const struct iovec *__rvec, | |
16193 | unsigned long int __riovcnt, | |
16194 | unsigned long int __flags) | |
16195 | __attribute__ ((__nothrow__ , __leaf__)); | |
16196 | ||
16197 | ||
16198 | extern ssize_t process_vm_writev (pid_t __pid, __const struct iovec *__lvec, | |
16199 | unsigned long int __liovcnt, | |
16200 | __const struct iovec *__rvec, | |
16201 | unsigned long int __riovcnt, | |
16202 | unsigned long int __flags) | |
16203 | __attribute__ ((__nothrow__ , __leaf__)); | |
16204 | ||
16205 | ||
16206 | # 30 "/usr/include/sys/uio.h" 2 3 4 | |
16207 | # 40 "/usr/include/sys/uio.h" 3 4 | |
16208 | extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count) | |
16209 | __attribute__ ((__warn_unused_result__)); | |
16210 | # 51 "/usr/include/sys/uio.h" 3 4 | |
16211 | extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count) | |
16212 | __attribute__ ((__warn_unused_result__)); | |
16213 | # 82 "/usr/include/sys/uio.h" 3 4 | |
16214 | extern ssize_t preadv (int __fd, __const struct iovec *__iovec, int __count, __off64_t __offset) __asm__ ("" "preadv64") | |
16215 | ||
16216 | __attribute__ ((__warn_unused_result__)); | |
16217 | extern ssize_t pwritev (int __fd, __const struct iovec *__iovec, int __count, __off64_t __offset) __asm__ ("" "pwritev64") | |
16218 | ||
16219 | __attribute__ ((__warn_unused_result__)); | |
16220 | # 104 "/usr/include/sys/uio.h" 3 4 | |
16221 | extern ssize_t preadv64 (int __fd, __const struct iovec *__iovec, int __count, | |
16222 | __off64_t __offset) __attribute__ ((__warn_unused_result__)); | |
16223 | # 116 "/usr/include/sys/uio.h" 3 4 | |
16224 | extern ssize_t pwritev64 (int __fd, __const struct iovec *__iovec, int __count, | |
16225 | __off64_t __offset) __attribute__ ((__warn_unused_result__)); | |
16226 | ||
16227 | ||
16228 | ||
16229 | ||
16230 | # 92 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
16231 | ||
16232 | ||
16233 | typedef int (*fprintf_function)(FILE *f, const char *fmt, ...) | |
16234 | __attribute__((format(gnu_printf, 2, 3))); | |
16235 | # 115 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" | |
16236 | void configure_icount(const char *option); | |
16237 | extern int use_icount; | |
16238 | # 126 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" | |
16239 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 1 | |
16240 | # 127 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
16241 | # 135 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" | |
16242 | void qemu_get_timedate(struct tm *tm, int offset); | |
16243 | int qemu_timedate_diff(struct tm *tm); | |
16244 | ||
16245 | ||
16246 | void pstrcpy(char *buf, int buf_size, const char *str); | |
16247 | char *pstrcat(char *buf, int buf_size, const char *s); | |
16248 | int strstart(const char *str, const char *val, const char **ptr); | |
16249 | int stristart(const char *str, const char *val, const char **ptr); | |
16250 | int qemu_strnlen(const char *s, int max_len); | |
16251 | time_t mktimegm(struct tm *tm); | |
16252 | int qemu_fls(int i); | |
16253 | int qemu_fdatasync(int fd); | |
16254 | int fcntl_setfl(int fd, int flag); | |
16255 | int qemu_parse_fd(const char *param); | |
16256 | # 162 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" | |
16257 | int64_t strtosz(const char *nptr, char **end); | |
16258 | int64_t strtosz_suffix(const char *nptr, char **end, const char default_suffix); | |
16259 | int64_t strtosz_suffix_unit(const char *nptr, char **end, | |
16260 | const char default_suffix, int64_t unit); | |
16261 | ||
16262 | ||
16263 | void init_paths(const char *prefix); | |
16264 | const char *path(const char *pathname); | |
16265 | # 187 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" | |
16266 | void *qemu_oom_check(void *ptr); | |
16267 | ||
16268 | int qemu_open(const char *name, int flags, ...); | |
16269 | ssize_t qemu_write_full(int fd, const void *buf, size_t count) | |
16270 | __attribute__((warn_unused_result)); | |
16271 | ssize_t qemu_send_full(int fd, const void *buf, size_t count, int flags) | |
16272 | __attribute__((warn_unused_result)); | |
16273 | ssize_t qemu_recv_full(int fd, void *buf, size_t count, int flags) | |
16274 | __attribute__((warn_unused_result)); | |
16275 | ||
16276 | ||
16277 | int qemu_eventfd(int pipefd[2]); | |
16278 | int qemu_pipe(int pipefd[2]); | |
16279 | # 208 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" | |
16280 | int qemu_recvv(int sockfd, struct iovec *iov, int len, int iov_offset); | |
16281 | int qemu_sendv(int sockfd, struct iovec *iov, int len, int iov_offset); | |
16282 | ||
16283 | ||
16284 | ||
16285 | void __attribute__ ((__noreturn__)) hw_error(const char *fmt, ...) __attribute__((format(gnu_printf, 1, 2))); | |
16286 | ||
16287 | struct ParallelIOArg { | |
16288 | void *buffer; | |
16289 | int count; | |
16290 | }; | |
16291 | ||
16292 | typedef int (*DMA_transfer_handler) (void *opaque, int nchan, int pos, int size); | |
16293 | ||
16294 | ||
16295 | ||
16296 | typedef struct NICInfo NICInfo; | |
16297 | typedef struct HCIInfo HCIInfo; | |
16298 | typedef struct AudioState AudioState; | |
16299 | typedef struct BlockDriverState BlockDriverState; | |
16300 | typedef struct DriveInfo DriveInfo; | |
16301 | typedef struct DisplayState DisplayState; | |
16302 | typedef struct DisplayChangeListener DisplayChangeListener; | |
16303 | typedef struct DisplaySurface DisplaySurface; | |
16304 | typedef struct DisplayAllocator DisplayAllocator; | |
16305 | typedef struct PixelFormat PixelFormat; | |
16306 | typedef struct TextConsole TextConsole; | |
16307 | typedef TextConsole QEMUConsole; | |
16308 | typedef struct CharDriverState CharDriverState; | |
16309 | typedef struct MACAddr MACAddr; | |
16310 | typedef struct VLANState VLANState; | |
16311 | typedef struct VLANClientState VLANClientState; | |
16312 | typedef struct i2c_bus i2c_bus; | |
16313 | typedef struct ISABus ISABus; | |
16314 | typedef struct SMBusDevice SMBusDevice; | |
16315 | typedef struct PCIHostState PCIHostState; | |
16316 | typedef struct PCIExpressHost PCIExpressHost; | |
16317 | typedef struct PCIBus PCIBus; | |
16318 | typedef struct PCIDevice PCIDevice; | |
16319 | typedef struct PCIExpressDevice PCIExpressDevice; | |
16320 | typedef struct PCIBridge PCIBridge; | |
16321 | typedef struct PCIEAERMsg PCIEAERMsg; | |
16322 | typedef struct PCIEAERLog PCIEAERLog; | |
16323 | typedef struct PCIEAERErr PCIEAERErr; | |
16324 | typedef struct PCIEPort PCIEPort; | |
16325 | typedef struct PCIESlot PCIESlot; | |
16326 | typedef struct SerialState SerialState; | |
16327 | typedef struct IRQState *qemu_irq; | |
16328 | typedef struct PCMCIACardState PCMCIACardState; | |
16329 | typedef struct MouseTransformInfo MouseTransformInfo; | |
16330 | typedef struct uWireSlave uWireSlave; | |
16331 | typedef struct I2SCodec I2SCodec; | |
16332 | typedef struct SSIBus SSIBus; | |
16333 | typedef struct EventNotifier EventNotifier; | |
16334 | typedef struct VirtIODevice VirtIODevice; | |
16335 | typedef struct QEMUSGList QEMUSGList; | |
16336 | typedef struct SHPCDevice SHPCDevice; | |
16337 | ||
16338 | typedef uint64_t pcibus_t; | |
16339 | ||
16340 | typedef enum LostTickPolicy { | |
16341 | LOST_TICK_DISCARD, | |
16342 | LOST_TICK_DELAY, | |
16343 | LOST_TICK_MERGE, | |
16344 | LOST_TICK_SLEW, | |
16345 | LOST_TICK_MAX | |
16346 | } LostTickPolicy; | |
16347 | ||
16348 | void tcg_exec_init(unsigned long tb_size); | |
16349 | _Bool tcg_enabled(void); | |
16350 | ||
16351 | void cpu_exec_init_all(void); | |
16352 | ||
16353 | ||
16354 | void cpu_save(QEMUFile *f, void *opaque); | |
16355 | int cpu_load(QEMUFile *f, void *opaque, int version_id); | |
16356 | ||
16357 | ||
16358 | void qemu_cpu_kick(void *env); | |
16359 | void qemu_cpu_kick_self(void); | |
16360 | int qemu_cpu_is_self(void *env); | |
16361 | _Bool all_cpu_threads_idle(void); | |
16362 | ||
16363 | ||
16364 | struct qemu_work_item { | |
16365 | struct qemu_work_item *next; | |
16366 | void (*func)(void *data); | |
16367 | void *data; | |
16368 | int done; | |
16369 | }; | |
16370 | ||
16371 | ||
16372 | ||
16373 | ||
16374 | void qemu_init_vcpu(void *env); | |
16375 | ||
16376 | ||
16377 | ||
16378 | ||
16379 | ||
16380 | ||
16381 | int qemu_co_sendv(int sockfd, struct iovec *iov, | |
16382 | int len, int iov_offset); | |
16383 | ||
16384 | ||
16385 | ||
16386 | ||
16387 | ||
16388 | int qemu_co_recvv(int sockfd, struct iovec *iov, | |
16389 | int len, int iov_offset); | |
16390 | ||
16391 | ||
16392 | ||
16393 | ||
16394 | ||
16395 | int qemu_co_send(int sockfd, void *buf, int len); | |
16396 | ||
16397 | ||
16398 | ||
16399 | ||
16400 | ||
16401 | int qemu_co_recv(int sockfd, void *buf, int len); | |
16402 | ||
16403 | ||
16404 | typedef struct QEMUIOVector { | |
16405 | struct iovec *iov; | |
16406 | int niov; | |
16407 | int nalloc; | |
16408 | size_t size; | |
16409 | } QEMUIOVector; | |
16410 | ||
16411 | void qemu_iovec_init(QEMUIOVector *qiov, int alloc_hint); | |
16412 | void qemu_iovec_init_external(QEMUIOVector *qiov, struct iovec *iov, int niov); | |
16413 | void qemu_iovec_add(QEMUIOVector *qiov, void *base, size_t len); | |
16414 | void qemu_iovec_copy(QEMUIOVector *dst, QEMUIOVector *src, uint64_t skip, | |
16415 | size_t size); | |
16416 | void qemu_iovec_concat(QEMUIOVector *dst, QEMUIOVector *src, size_t size); | |
16417 | void qemu_iovec_destroy(QEMUIOVector *qiov); | |
16418 | void qemu_iovec_reset(QEMUIOVector *qiov); | |
16419 | void qemu_iovec_to_buffer(QEMUIOVector *qiov, void *buf); | |
16420 | void qemu_iovec_from_buffer(QEMUIOVector *qiov, const void *buf, size_t count); | |
16421 | void qemu_iovec_memset(QEMUIOVector *qiov, int c, size_t count); | |
16422 | void qemu_iovec_memset_skip(QEMUIOVector *qiov, int c, size_t count, | |
16423 | size_t skip); | |
16424 | ||
16425 | _Bool buffer_is_zero(const void *buf, size_t len); | |
16426 | ||
16427 | void qemu_progress_init(int enabled, float min_skip); | |
16428 | void qemu_progress_end(void); | |
16429 | void qemu_progress_print(float delta, int max); | |
16430 | ||
16431 | ||
16432 | ||
16433 | char *qemu_find_file(int type, const char *name); | |
16434 | ||
16435 | ||
16436 | void os_setup_early_signal_handling(void); | |
16437 | char *os_find_datadir(const char *argv0); | |
16438 | void os_parse_cmd_args(int index, const char *optarg); | |
16439 | void os_pidfile_error(void); | |
16440 | ||
16441 | ||
16442 | static inline uint8_t to_bcd(uint8_t val) | |
16443 | { | |
16444 | return ((val / 10) << 4) | (val % 10); | |
16445 | } | |
16446 | ||
16447 | static inline uint8_t from_bcd(uint8_t val) | |
16448 | { | |
16449 | return ((val >> 4) * 10) + (val & 0x0f); | |
16450 | } | |
16451 | ||
16452 | ||
16453 | static inline uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c) | |
16454 | { | |
16455 | union { | |
16456 | uint64_t ll; | |
16457 | struct { | |
16458 | ||
16459 | ||
16460 | ||
16461 | uint32_t low, high; | |
16462 | ||
16463 | } l; | |
16464 | } u, res; | |
16465 | uint64_t rl, rh; | |
16466 | ||
16467 | u.ll = a; | |
16468 | rl = (uint64_t)u.l.low * (uint64_t)b; | |
16469 | rh = (uint64_t)u.l.high * (uint64_t)b; | |
16470 | rh += (rl >> 32); | |
16471 | res.l.high = rh / c; | |
16472 | res.l.low = (((rh % c) << 32) + (rl & 0xffffffff)) / c; | |
16473 | return res.ll; | |
16474 | } | |
16475 | ||
16476 | ||
16477 | ||
16478 | ||
16479 | ||
16480 | ||
16481 | ||
16482 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/module.h" 1 | |
16483 | # 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/module.h" | |
16484 | typedef enum { | |
16485 | MODULE_INIT_BLOCK, | |
16486 | MODULE_INIT_MACHINE, | |
16487 | MODULE_INIT_QAPI, | |
16488 | MODULE_INIT_QOM, | |
16489 | MODULE_INIT_MAX | |
16490 | } module_init_type; | |
16491 | ||
16492 | ||
16493 | ||
16494 | ||
16495 | ||
16496 | ||
16497 | void register_module_init(void (*fn)(void), module_init_type type); | |
16498 | ||
16499 | void module_call_init(module_init_type type); | |
16500 | # 411 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 | |
16501 | # 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 | |
16502 | # 47 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" | |
16503 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" 1 | |
16504 | # 26 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" | |
16505 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config.h" 1 | |
16506 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config-host.h" 1 | |
16507 | # 2 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config.h" 2 | |
16508 | # 1 "./config-target.h" 1 | |
16509 | # 2 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config.h" 2 | |
16510 | # 27 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" 2 | |
16511 | # 1 "/usr/include/setjmp.h" 1 3 4 | |
16512 | # 28 "/usr/include/setjmp.h" 3 4 | |
16513 | ||
16514 | ||
16515 | ||
16516 | # 1 "/usr/include/bits/sigset.h" 1 3 4 | |
16517 | # 32 "/usr/include/setjmp.h" 2 3 4 | |
16518 | ||
16519 | ||
16520 | ||
16521 | struct __jmp_buf_tag | |
16522 | { | |
16523 | ||
16524 | ||
16525 | ||
16526 | ||
16527 | __jmp_buf __jmpbuf; | |
16528 | int __mask_was_saved; | |
16529 | __sigset_t __saved_mask; | |
16530 | }; | |
16531 | ||
16532 | ||
16533 | ||
16534 | ||
16535 | typedef struct __jmp_buf_tag jmp_buf[1]; | |
16536 | ||
16537 | ||
16538 | ||
16539 | extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__)); | |
16540 | ||
16541 | ||
16542 | ||
16543 | ||
16544 | ||
16545 | ||
16546 | extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__)); | |
16547 | ||
16548 | ||
16549 | ||
16550 | ||
16551 | extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__)); | |
16552 | # 78 "/usr/include/setjmp.h" 3 4 | |
16553 | ||
16554 | ||
16555 | ||
16556 | ||
16557 | extern void longjmp (struct __jmp_buf_tag __env[1], int __val) | |
16558 | __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); | |
16559 | ||
16560 | ||
16561 | ||
16562 | ||
16563 | ||
16564 | ||
16565 | ||
16566 | extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) | |
16567 | __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); | |
16568 | ||
16569 | ||
16570 | ||
16571 | ||
16572 | ||
16573 | ||
16574 | ||
16575 | typedef struct __jmp_buf_tag sigjmp_buf[1]; | |
16576 | # 110 "/usr/include/setjmp.h" 3 4 | |
16577 | extern void siglongjmp (sigjmp_buf __env, int __val) | |
16578 | __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); | |
16579 | ||
16580 | ||
16581 | ||
16582 | ||
16583 | ||
16584 | # 1 "/usr/include/bits/setjmp2.h" 1 3 4 | |
16585 | # 26 "/usr/include/bits/setjmp2.h" 3 4 | |
16586 | extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) | |
16587 | ||
16588 | __attribute__ ((__noreturn__)); | |
16589 | extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) | |
16590 | ||
16591 | __attribute__ ((__noreturn__)); | |
16592 | extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) | |
16593 | ||
16594 | __attribute__ ((__noreturn__)); | |
16595 | # 118 "/usr/include/setjmp.h" 2 3 4 | |
16596 | ||
16597 | ||
16598 | ||
16599 | # 28 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" 2 | |
16600 | ||
16601 | ||
16602 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" 1 | |
16603 | ||
16604 | ||
16605 | ||
16606 | ||
16607 | # 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 | |
16608 | # 6 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" 2 | |
16609 | # 82 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" | |
16610 | int qemu_daemon(int nochdir, int noclose); | |
16611 | void *qemu_memalign(size_t alignment, size_t size); | |
16612 | void *qemu_vmalloc(size_t size); | |
16613 | void qemu_vfree(void *ptr); | |
16614 | # 120 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" | |
16615 | int qemu_madvise(void *addr, size_t len, int advice); | |
16616 | # 130 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" | |
16617 | int qemu_create_pidfile(const char *filename); | |
16618 | int qemu_get_thread_id(void); | |
16619 | # 150 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" | |
16620 | void qemu_set_cloexec(int fd); | |
16621 | # 31 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" 2 | |
16622 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-queue.h" 1 | |
16623 | # 81 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-queue.h" | |
16624 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-barrier.h" 1 | |
16625 | # 82 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-queue.h" 2 | |
16626 | # 32 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" 2 | |
16627 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/targphys.h" 1 | |
16628 | # 15 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/targphys.h" | |
16629 | typedef uint64_t target_phys_addr_t; | |
16630 | # 33 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" 2 | |
16631 | ||
16632 | ||
16633 | ||
16634 | ||
16635 | ||
16636 | ||
16637 | ||
16638 | typedef int16_t target_short __attribute__ ((aligned(2))); | |
16639 | typedef uint16_t target_ushort __attribute__((aligned(2))); | |
16640 | typedef int32_t target_int __attribute__((aligned(4))); | |
16641 | typedef uint32_t target_uint __attribute__((aligned(4))); | |
16642 | typedef int64_t target_llong __attribute__((aligned(8))); | |
16643 | typedef uint64_t target_ullong __attribute__((aligned(8))); | |
16644 | ||
16645 | ||
16646 | typedef int32_t target_long __attribute__((aligned(4))); | |
16647 | typedef uint32_t target_ulong __attribute__((aligned(4))); | |
16648 | # 89 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" | |
16649 | typedef struct CPUTLBEntry { | |
16650 | ||
16651 | ||
16652 | ||
16653 | ||
16654 | ||
16655 | ||
16656 | target_ulong addr_read; | |
16657 | target_ulong addr_write; | |
16658 | target_ulong addr_code; | |
16659 | ||
16660 | ||
16661 | uintptr_t addend; | |
16662 | ||
16663 | uint8_t dummy[(1 << 4) - | |
16664 | (sizeof(target_ulong) * 3 + | |
16665 | ((-sizeof(target_ulong) * 3) & (sizeof(uintptr_t) - 1)) + | |
16666 | sizeof(uintptr_t))]; | |
16667 | } CPUTLBEntry; | |
16668 | ||
16669 | extern int CPUTLBEntry_wrong_size[sizeof(CPUTLBEntry) == (1 << 4) ? 1 : -1]; | |
16670 | # 131 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" | |
16671 | typedef struct icount_decr_u16 { | |
16672 | uint16_t low; | |
16673 | uint16_t high; | |
16674 | } icount_decr_u16; | |
16675 | ||
16676 | ||
16677 | struct kvm_run; | |
16678 | struct KVMState; | |
16679 | struct qemu_work_item; | |
16680 | ||
16681 | typedef struct CPUBreakpoint { | |
16682 | target_ulong pc; | |
16683 | int flags; | |
16684 | struct { struct CPUBreakpoint *tqe_next; struct CPUBreakpoint * *tqe_prev; } entry; | |
16685 | } CPUBreakpoint; | |
16686 | ||
16687 | typedef struct CPUWatchpoint { | |
16688 | target_ulong vaddr; | |
16689 | target_ulong len_mask; | |
16690 | int flags; | |
16691 | struct { struct CPUWatchpoint *tqe_next; struct CPUWatchpoint * *tqe_prev; } entry; | |
16692 | } CPUWatchpoint; | |
16693 | # 48 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 | |
16694 | ||
16695 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" 1 | |
16696 | # 46 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" | |
16697 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config-host.h" 1 | |
16698 | # 47 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" 2 | |
16699 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" 1 | |
16700 | # 48 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" 2 | |
16701 | # 57 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" | |
16702 | typedef uint8_t flag; | |
16703 | typedef uint8_t uint8; | |
16704 | typedef int8_t int8; | |
16705 | typedef unsigned int uint32; | |
16706 | typedef signed int int32; | |
16707 | typedef uint64_t uint64; | |
16708 | typedef int64_t int64; | |
16709 | # 75 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" | |
16710 | enum { | |
16711 | float_relation_less = -1, | |
16712 | float_relation_equal = 0, | |
16713 | float_relation_greater = 1, | |
16714 | float_relation_unordered = 2 | |
16715 | }; | |
16716 | # 111 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" | |
16717 | typedef uint16_t float16; | |
16718 | typedef uint32_t float32; | |
16719 | typedef uint64_t float64; | |
16720 | # 124 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" | |
16721 | typedef struct { | |
16722 | uint64_t low; | |
16723 | uint16_t high; | |
16724 | } floatx80; | |
16725 | ||
16726 | ||
16727 | typedef struct { | |
16728 | ||
16729 | ||
16730 | ||
16731 | uint64_t low, high; | |
16732 | ||
16733 | } float128; | |
16734 | ||
16735 | ||
16736 | ||
16737 | ||
16738 | ||
16739 | ||
16740 | enum { | |
16741 | float_tininess_after_rounding = 0, | |
16742 | float_tininess_before_rounding = 1 | |
16743 | }; | |
16744 | ||
16745 | ||
16746 | ||
16747 | ||
16748 | enum { | |
16749 | float_round_nearest_even = 0, | |
16750 | float_round_down = 1, | |
16751 | float_round_up = 2, | |
16752 | float_round_to_zero = 3 | |
16753 | }; | |
16754 | ||
16755 | ||
16756 | ||
16757 | ||
16758 | enum { | |
16759 | float_flag_invalid = 1, | |
16760 | float_flag_divbyzero = 4, | |
16761 | float_flag_overflow = 8, | |
16762 | float_flag_underflow = 16, | |
16763 | float_flag_inexact = 32, | |
16764 | float_flag_input_denormal = 64, | |
16765 | float_flag_output_denormal = 128 | |
16766 | }; | |
16767 | ||
16768 | typedef struct float_status { | |
16769 | signed char float_detect_tininess; | |
16770 | signed char float_rounding_mode; | |
16771 | signed char float_exception_flags; | |
16772 | signed char floatx80_rounding_precision; | |
16773 | ||
16774 | flag flush_to_zero; | |
16775 | ||
16776 | flag flush_inputs_to_zero; | |
16777 | flag default_nan_mode; | |
16778 | } float_status; | |
16779 | ||
16780 | void set_float_rounding_mode(int val , float_status *status); | |
16781 | void set_float_exception_flags(int val , float_status *status); | |
16782 | static __attribute__ (( always_inline )) __inline__ void set_float_detect_tininess(int val , float_status *status) | |
16783 | { | |
16784 | status->float_detect_tininess = val; | |
16785 | } | |
16786 | static __attribute__ (( always_inline )) __inline__ void set_flush_to_zero(flag val , float_status *status) | |
16787 | { | |
16788 | status->flush_to_zero = val; | |
16789 | } | |
16790 | static __attribute__ (( always_inline )) __inline__ void set_flush_inputs_to_zero(flag val , float_status *status) | |
16791 | { | |
16792 | status->flush_inputs_to_zero = val; | |
16793 | } | |
16794 | static __attribute__ (( always_inline )) __inline__ void set_default_nan_mode(flag val , float_status *status) | |
16795 | { | |
16796 | status->default_nan_mode = val; | |
16797 | } | |
16798 | static __attribute__ (( always_inline )) __inline__ int get_float_exception_flags(float_status *status) | |
16799 | { | |
16800 | return status->float_exception_flags; | |
16801 | } | |
16802 | void set_floatx80_rounding_precision(int val , float_status *status); | |
16803 | ||
16804 | ||
16805 | ||
16806 | ||
16807 | ||
16808 | void float_raise( int8 flags , float_status *status); | |
16809 | ||
16810 | ||
16811 | ||
16812 | ||
16813 | ||
16814 | ||
16815 | ||
16816 | enum { | |
16817 | float_muladd_negate_c = 1, | |
16818 | float_muladd_negate_product = 2, | |
16819 | float_muladd_negate_result = 3, | |
16820 | }; | |
16821 | ||
16822 | ||
16823 | ||
16824 | ||
16825 | float32 int32_to_float32( int32 , float_status *status ); | |
16826 | float64 int32_to_float64( int32 , float_status *status ); | |
16827 | float32 uint32_to_float32( uint32 , float_status *status ); | |
16828 | float64 uint32_to_float64( uint32 , float_status *status ); | |
16829 | floatx80 int32_to_floatx80( int32 , float_status *status ); | |
16830 | float128 int32_to_float128( int32 , float_status *status ); | |
16831 | float32 int64_to_float32( int64 , float_status *status ); | |
16832 | float32 uint64_to_float32( uint64 , float_status *status ); | |
16833 | float64 int64_to_float64( int64 , float_status *status ); | |
16834 | float64 uint64_to_float64( uint64 , float_status *status ); | |
16835 | floatx80 int64_to_floatx80( int64 , float_status *status ); | |
16836 | float128 int64_to_float128( int64 , float_status *status ); | |
16837 | ||
16838 | ||
16839 | ||
16840 | ||
16841 | float16 float32_to_float16( float32, flag , float_status *status ); | |
16842 | float32 float16_to_float32( float16, flag , float_status *status ); | |
16843 | ||
16844 | ||
16845 | ||
16846 | ||
16847 | int float16_is_quiet_nan( float16 ); | |
16848 | int float16_is_signaling_nan( float16 ); | |
16849 | float16 float16_maybe_silence_nan( float16 ); | |
16850 | ||
16851 | ||
16852 | ||
16853 | ||
16854 | extern const float16 float16_default_nan; | |
16855 | ||
16856 | ||
16857 | ||
16858 | ||
16859 | int_fast16_t float32_to_int16_round_to_zero(float32 , float_status *status); | |
16860 | uint_fast16_t float32_to_uint16_round_to_zero(float32 , float_status *status); | |
16861 | int32 float32_to_int32( float32 , float_status *status ); | |
16862 | int32 float32_to_int32_round_to_zero( float32 , float_status *status ); | |
16863 | uint32 float32_to_uint32( float32 , float_status *status ); | |
16864 | uint32 float32_to_uint32_round_to_zero( float32 , float_status *status ); | |
16865 | int64 float32_to_int64( float32 , float_status *status ); | |
16866 | int64 float32_to_int64_round_to_zero( float32 , float_status *status ); | |
16867 | float64 float32_to_float64( float32 , float_status *status ); | |
16868 | floatx80 float32_to_floatx80( float32 , float_status *status ); | |
16869 | float128 float32_to_float128( float32 , float_status *status ); | |
16870 | ||
16871 | ||
16872 | ||
16873 | ||
16874 | float32 float32_round_to_int( float32 , float_status *status ); | |
16875 | float32 float32_add( float32, float32 , float_status *status ); | |
16876 | float32 float32_sub( float32, float32 , float_status *status ); | |
16877 | float32 float32_mul( float32, float32 , float_status *status ); | |
16878 | float32 float32_div( float32, float32 , float_status *status ); | |
16879 | float32 float32_rem( float32, float32 , float_status *status ); | |
16880 | float32 float32_muladd(float32, float32, float32, int , float_status *status); | |
16881 | float32 float32_sqrt( float32 , float_status *status ); | |
16882 | float32 float32_exp2( float32 , float_status *status ); | |
16883 | float32 float32_log2( float32 , float_status *status ); | |
16884 | int float32_eq( float32, float32 , float_status *status ); | |
16885 | int float32_le( float32, float32 , float_status *status ); | |
16886 | int float32_lt( float32, float32 , float_status *status ); | |
16887 | int float32_unordered( float32, float32 , float_status *status ); | |
16888 | int float32_eq_quiet( float32, float32 , float_status *status ); | |
16889 | int float32_le_quiet( float32, float32 , float_status *status ); | |
16890 | int float32_lt_quiet( float32, float32 , float_status *status ); | |
16891 | int float32_unordered_quiet( float32, float32 , float_status *status ); | |
16892 | int float32_compare( float32, float32 , float_status *status ); | |
16893 | int float32_compare_quiet( float32, float32 , float_status *status ); | |
16894 | float32 float32_min(float32, float32 , float_status *status); | |
16895 | float32 float32_max(float32, float32 , float_status *status); | |
16896 | int float32_is_quiet_nan( float32 ); | |
16897 | int float32_is_signaling_nan( float32 ); | |
16898 | float32 float32_maybe_silence_nan( float32 ); | |
16899 | float32 float32_scalbn( float32, int , float_status *status ); | |
16900 | ||
16901 | static __attribute__ (( always_inline )) __inline__ float32 float32_abs(float32 a) | |
16902 | { | |
16903 | ||
16904 | ||
16905 | ||
16906 | return ((a) & 0x7fffffff); | |
16907 | } | |
16908 | ||
16909 | static __attribute__ (( always_inline )) __inline__ float32 float32_chs(float32 a) | |
16910 | { | |
16911 | ||
16912 | ||
16913 | ||
16914 | return ((a) ^ 0x80000000); | |
16915 | } | |
16916 | ||
16917 | static __attribute__ (( always_inline )) __inline__ int float32_is_infinity(float32 a) | |
16918 | { | |
16919 | return ((a) & 0x7fffffff) == 0x7f800000; | |
16920 | } | |
16921 | ||
16922 | static __attribute__ (( always_inline )) __inline__ int float32_is_neg(float32 a) | |
16923 | { | |
16924 | return (a) >> 31; | |
16925 | } | |
16926 | ||
16927 | static __attribute__ (( always_inline )) __inline__ int float32_is_zero(float32 a) | |
16928 | { | |
16929 | return ((a) & 0x7fffffff) == 0; | |
16930 | } | |
16931 | ||
16932 | static __attribute__ (( always_inline )) __inline__ int float32_is_any_nan(float32 a) | |
16933 | { | |
16934 | return (((a) & ~(1 << 31)) > 0x7f800000UL); | |
16935 | } | |
16936 | ||
16937 | static __attribute__ (( always_inline )) __inline__ int float32_is_zero_or_denormal(float32 a) | |
16938 | { | |
16939 | return ((a) & 0x7f800000) == 0; | |
16940 | } | |
16941 | ||
16942 | static __attribute__ (( always_inline )) __inline__ float32 float32_set_sign(float32 a, int sign) | |
16943 | { | |
16944 | return (((a) & 0x7fffffff) | (sign << 31)); | |
16945 | } | |
16946 | # 361 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" | |
16947 | extern const float32 float32_default_nan; | |
16948 | ||
16949 | ||
16950 | ||
16951 | ||
16952 | int_fast16_t float64_to_int16_round_to_zero(float64 , float_status *status); | |
16953 | uint_fast16_t float64_to_uint16_round_to_zero(float64 , float_status *status); | |
16954 | int32 float64_to_int32( float64 , float_status *status ); | |
16955 | int32 float64_to_int32_round_to_zero( float64 , float_status *status ); | |
16956 | uint32 float64_to_uint32( float64 , float_status *status ); | |
16957 | uint32 float64_to_uint32_round_to_zero( float64 , float_status *status ); | |
16958 | int64 float64_to_int64( float64 , float_status *status ); | |
16959 | int64 float64_to_int64_round_to_zero( float64 , float_status *status ); | |
16960 | uint64 float64_to_uint64 (float64 a , float_status *status); | |
16961 | uint64 float64_to_uint64_round_to_zero (float64 a , float_status *status); | |
16962 | float32 float64_to_float32( float64 , float_status *status ); | |
16963 | floatx80 float64_to_floatx80( float64 , float_status *status ); | |
16964 | float128 float64_to_float128( float64 , float_status *status ); | |
16965 | ||
16966 | ||
16967 | ||
16968 | ||
16969 | float64 float64_round_to_int( float64 , float_status *status ); | |
16970 | float64 float64_trunc_to_int( float64 , float_status *status ); | |
16971 | float64 float64_add( float64, float64 , float_status *status ); | |
16972 | float64 float64_sub( float64, float64 , float_status *status ); | |
16973 | float64 float64_mul( float64, float64 , float_status *status ); | |
16974 | float64 float64_div( float64, float64 , float_status *status ); | |
16975 | float64 float64_rem( float64, float64 , float_status *status ); | |
16976 | float64 float64_muladd(float64, float64, float64, int , float_status *status); | |
16977 | float64 float64_sqrt( float64 , float_status *status ); | |
16978 | float64 float64_log2( float64 , float_status *status ); | |
16979 | int float64_eq( float64, float64 , float_status *status ); | |
16980 | int float64_le( float64, float64 , float_status *status ); | |
16981 | int float64_lt( float64, float64 , float_status *status ); | |
16982 | int float64_unordered( float64, float64 , float_status *status ); | |
16983 | int float64_eq_quiet( float64, float64 , float_status *status ); | |
16984 | int float64_le_quiet( float64, float64 , float_status *status ); | |
16985 | int float64_lt_quiet( float64, float64 , float_status *status ); | |
16986 | int float64_unordered_quiet( float64, float64 , float_status *status ); | |
16987 | int float64_compare( float64, float64 , float_status *status ); | |
16988 | int float64_compare_quiet( float64, float64 , float_status *status ); | |
16989 | float64 float64_min(float64, float64 , float_status *status); | |
16990 | float64 float64_max(float64, float64 , float_status *status); | |
16991 | int float64_is_quiet_nan( float64 a ); | |
16992 | int float64_is_signaling_nan( float64 ); | |
16993 | float64 float64_maybe_silence_nan( float64 ); | |
16994 | float64 float64_scalbn( float64, int , float_status *status ); | |
16995 | ||
16996 | static __attribute__ (( always_inline )) __inline__ float64 float64_abs(float64 a) | |
16997 | { | |
16998 | ||
16999 | ||
17000 | ||
17001 | return ((a) & 0x7fffffffffffffffLL); | |
17002 | } | |
17003 | ||
17004 | static __attribute__ (( always_inline )) __inline__ float64 float64_chs(float64 a) | |
17005 | { | |
17006 | ||
17007 | ||
17008 | ||
17009 | return ((a) ^ 0x8000000000000000LL); | |
17010 | } | |
17011 | ||
17012 | static __attribute__ (( always_inline )) __inline__ int float64_is_infinity(float64 a) | |
17013 | { | |
17014 | return ((a) & 0x7fffffffffffffffLL ) == 0x7ff0000000000000LL; | |
17015 | } | |
17016 | ||
17017 | static __attribute__ (( always_inline )) __inline__ int float64_is_neg(float64 a) | |
17018 | { | |
17019 | return (a) >> 63; | |
17020 | } | |
17021 | ||
17022 | static __attribute__ (( always_inline )) __inline__ int float64_is_zero(float64 a) | |
17023 | { | |
17024 | return ((a) & 0x7fffffffffffffffLL) == 0; | |
17025 | } | |
17026 | ||
17027 | static __attribute__ (( always_inline )) __inline__ int float64_is_any_nan(float64 a) | |
17028 | { | |
17029 | return (((a) & ~(1ULL << 63)) > 0x7ff0000000000000ULL); | |
17030 | } | |
17031 | ||
17032 | static __attribute__ (( always_inline )) __inline__ int float64_is_zero_or_denormal(float64 a) | |
17033 | { | |
17034 | return ((a) & 0x7ff0000000000000LL) == 0; | |
17035 | } | |
17036 | ||
17037 | static __attribute__ (( always_inline )) __inline__ float64 float64_set_sign(float64 a, int sign) | |
17038 | { | |
17039 | return (((a) & 0x7fffffffffffffffULL) | ((int64_t)sign << 63)) | |
17040 | ; | |
17041 | } | |
17042 | # 467 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" | |
17043 | extern const float64 float64_default_nan; | |
17044 | ||
17045 | ||
17046 | ||
17047 | ||
17048 | int32 floatx80_to_int32( floatx80 , float_status *status ); | |
17049 | int32 floatx80_to_int32_round_to_zero( floatx80 , float_status *status ); | |
17050 | int64 floatx80_to_int64( floatx80 , float_status *status ); | |
17051 | int64 floatx80_to_int64_round_to_zero( floatx80 , float_status *status ); | |
17052 | float32 floatx80_to_float32( floatx80 , float_status *status ); | |
17053 | float64 floatx80_to_float64( floatx80 , float_status *status ); | |
17054 | float128 floatx80_to_float128( floatx80 , float_status *status ); | |
17055 | ||
17056 | ||
17057 | ||
17058 | ||
17059 | floatx80 floatx80_round_to_int( floatx80 , float_status *status ); | |
17060 | floatx80 floatx80_add( floatx80, floatx80 , float_status *status ); | |
17061 | floatx80 floatx80_sub( floatx80, floatx80 , float_status *status ); | |
17062 | floatx80 floatx80_mul( floatx80, floatx80 , float_status *status ); | |
17063 | floatx80 floatx80_div( floatx80, floatx80 , float_status *status ); | |
17064 | floatx80 floatx80_rem( floatx80, floatx80 , float_status *status ); | |
17065 | floatx80 floatx80_sqrt( floatx80 , float_status *status ); | |
17066 | int floatx80_eq( floatx80, floatx80 , float_status *status ); | |
17067 | int floatx80_le( floatx80, floatx80 , float_status *status ); | |
17068 | int floatx80_lt( floatx80, floatx80 , float_status *status ); | |
17069 | int floatx80_unordered( floatx80, floatx80 , float_status *status ); | |
17070 | int floatx80_eq_quiet( floatx80, floatx80 , float_status *status ); | |
17071 | int floatx80_le_quiet( floatx80, floatx80 , float_status *status ); | |
17072 | int floatx80_lt_quiet( floatx80, floatx80 , float_status *status ); | |
17073 | int floatx80_unordered_quiet( floatx80, floatx80 , float_status *status ); | |
17074 | int floatx80_compare( floatx80, floatx80 , float_status *status ); | |
17075 | int floatx80_compare_quiet( floatx80, floatx80 , float_status *status ); | |
17076 | int floatx80_is_quiet_nan( floatx80 ); | |
17077 | int floatx80_is_signaling_nan( floatx80 ); | |
17078 | floatx80 floatx80_maybe_silence_nan( floatx80 ); | |
17079 | floatx80 floatx80_scalbn( floatx80, int , float_status *status ); | |
17080 | ||
17081 | static __attribute__ (( always_inline )) __inline__ floatx80 floatx80_abs(floatx80 a) | |
17082 | { | |
17083 | a.high &= 0x7fff; | |
17084 | return a; | |
17085 | } | |
17086 | ||
17087 | static __attribute__ (( always_inline )) __inline__ floatx80 floatx80_chs(floatx80 a) | |
17088 | { | |
17089 | a.high ^= 0x8000; | |
17090 | return a; | |
17091 | } | |
17092 | ||
17093 | static __attribute__ (( always_inline )) __inline__ int floatx80_is_infinity(floatx80 a) | |
17094 | { | |
17095 | return (a.high & 0x7fff) == 0x7fff && a.low == 0x8000000000000000LL; | |
17096 | } | |
17097 | ||
17098 | static __attribute__ (( always_inline )) __inline__ int floatx80_is_neg(floatx80 a) | |
17099 | { | |
17100 | return a.high >> 15; | |
17101 | } | |
17102 | ||
17103 | static __attribute__ (( always_inline )) __inline__ int floatx80_is_zero(floatx80 a) | |
17104 | { | |
17105 | return (a.high & 0x7fff) == 0 && a.low == 0; | |
17106 | } | |
17107 | ||
17108 | static __attribute__ (( always_inline )) __inline__ int floatx80_is_zero_or_denormal(floatx80 a) | |
17109 | { | |
17110 | return (a.high & 0x7fff) == 0; | |
17111 | } | |
17112 | ||
17113 | static __attribute__ (( always_inline )) __inline__ int floatx80_is_any_nan(floatx80 a) | |
17114 | { | |
17115 | return ((a.high & 0x7fff) == 0x7fff) && (a.low<<1); | |
17116 | } | |
17117 | # 552 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" | |
17118 | extern const floatx80 floatx80_default_nan; | |
17119 | ||
17120 | ||
17121 | ||
17122 | ||
17123 | int32 float128_to_int32( float128 , float_status *status ); | |
17124 | int32 float128_to_int32_round_to_zero( float128 , float_status *status ); | |
17125 | int64 float128_to_int64( float128 , float_status *status ); | |
17126 | int64 float128_to_int64_round_to_zero( float128 , float_status *status ); | |
17127 | float32 float128_to_float32( float128 , float_status *status ); | |
17128 | float64 float128_to_float64( float128 , float_status *status ); | |
17129 | floatx80 float128_to_floatx80( float128 , float_status *status ); | |
17130 | ||
17131 | ||
17132 | ||
17133 | ||
17134 | float128 float128_round_to_int( float128 , float_status *status ); | |
17135 | float128 float128_add( float128, float128 , float_status *status ); | |
17136 | float128 float128_sub( float128, float128 , float_status *status ); | |
17137 | float128 float128_mul( float128, float128 , float_status *status ); | |
17138 | float128 float128_div( float128, float128 , float_status *status ); | |
17139 | float128 float128_rem( float128, float128 , float_status *status ); | |
17140 | float128 float128_sqrt( float128 , float_status *status ); | |
17141 | int float128_eq( float128, float128 , float_status *status ); | |
17142 | int float128_le( float128, float128 , float_status *status ); | |
17143 | int float128_lt( float128, float128 , float_status *status ); | |
17144 | int float128_unordered( float128, float128 , float_status *status ); | |
17145 | int float128_eq_quiet( float128, float128 , float_status *status ); | |
17146 | int float128_le_quiet( float128, float128 , float_status *status ); | |
17147 | int float128_lt_quiet( float128, float128 , float_status *status ); | |
17148 | int float128_unordered_quiet( float128, float128 , float_status *status ); | |
17149 | int float128_compare( float128, float128 , float_status *status ); | |
17150 | int float128_compare_quiet( float128, float128 , float_status *status ); | |
17151 | int float128_is_quiet_nan( float128 ); | |
17152 | int float128_is_signaling_nan( float128 ); | |
17153 | float128 float128_maybe_silence_nan( float128 ); | |
17154 | float128 float128_scalbn( float128, int , float_status *status ); | |
17155 | ||
17156 | static __attribute__ (( always_inline )) __inline__ float128 float128_abs(float128 a) | |
17157 | { | |
17158 | a.high &= 0x7fffffffffffffffLL; | |
17159 | return a; | |
17160 | } | |
17161 | ||
17162 | static __attribute__ (( always_inline )) __inline__ float128 float128_chs(float128 a) | |
17163 | { | |
17164 | a.high ^= 0x8000000000000000LL; | |
17165 | return a; | |
17166 | } | |
17167 | ||
17168 | static __attribute__ (( always_inline )) __inline__ int float128_is_infinity(float128 a) | |
17169 | { | |
17170 | return (a.high & 0x7fffffffffffffffLL) == 0x7fff000000000000LL && a.low == 0; | |
17171 | } | |
17172 | ||
17173 | static __attribute__ (( always_inline )) __inline__ int float128_is_neg(float128 a) | |
17174 | { | |
17175 | return a.high >> 63; | |
17176 | } | |
17177 | ||
17178 | static __attribute__ (( always_inline )) __inline__ int float128_is_zero(float128 a) | |
17179 | { | |
17180 | return (a.high & 0x7fffffffffffffffLL) == 0 && a.low == 0; | |
17181 | } | |
17182 | ||
17183 | static __attribute__ (( always_inline )) __inline__ int float128_is_zero_or_denormal(float128 a) | |
17184 | { | |
17185 | return (a.high & 0x7fff000000000000LL) == 0; | |
17186 | } | |
17187 | ||
17188 | static __attribute__ (( always_inline )) __inline__ int float128_is_any_nan(float128 a) | |
17189 | { | |
17190 | return ((a.high >> 48) & 0x7fff) == 0x7fff && | |
17191 | ((a.low != 0) || ((a.high & 0xffffffffffffLL) != 0)); | |
17192 | } | |
17193 | ||
17194 | ||
17195 | ||
17196 | ||
17197 | extern const float128 float128_default_nan; | |
17198 | # 50 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 | |
17199 | # 489 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" | |
17200 | enum { | |
17201 | CC_OP_DYNAMIC, | |
17202 | CC_OP_EFLAGS, | |
17203 | ||
17204 | CC_OP_MULB, | |
17205 | CC_OP_MULW, | |
17206 | CC_OP_MULL, | |
17207 | CC_OP_MULQ, | |
17208 | ||
17209 | CC_OP_ADDB, | |
17210 | CC_OP_ADDW, | |
17211 | CC_OP_ADDL, | |
17212 | CC_OP_ADDQ, | |
17213 | ||
17214 | CC_OP_ADCB, | |
17215 | CC_OP_ADCW, | |
17216 | CC_OP_ADCL, | |
17217 | CC_OP_ADCQ, | |
17218 | ||
17219 | CC_OP_SUBB, | |
17220 | CC_OP_SUBW, | |
17221 | CC_OP_SUBL, | |
17222 | CC_OP_SUBQ, | |
17223 | ||
17224 | CC_OP_SBBB, | |
17225 | CC_OP_SBBW, | |
17226 | CC_OP_SBBL, | |
17227 | CC_OP_SBBQ, | |
17228 | ||
17229 | CC_OP_LOGICB, | |
17230 | CC_OP_LOGICW, | |
17231 | CC_OP_LOGICL, | |
17232 | CC_OP_LOGICQ, | |
17233 | ||
17234 | CC_OP_INCB, | |
17235 | CC_OP_INCW, | |
17236 | CC_OP_INCL, | |
17237 | CC_OP_INCQ, | |
17238 | ||
17239 | CC_OP_DECB, | |
17240 | CC_OP_DECW, | |
17241 | CC_OP_DECL, | |
17242 | CC_OP_DECQ, | |
17243 | ||
17244 | CC_OP_SHLB, | |
17245 | CC_OP_SHLW, | |
17246 | CC_OP_SHLL, | |
17247 | CC_OP_SHLQ, | |
17248 | ||
17249 | CC_OP_SARB, | |
17250 | CC_OP_SARW, | |
17251 | CC_OP_SARL, | |
17252 | CC_OP_SARQ, | |
17253 | ||
17254 | CC_OP_NB, | |
17255 | }; | |
17256 | ||
17257 | typedef struct SegmentCache { | |
17258 | uint32_t selector; | |
17259 | target_ulong base; | |
17260 | uint32_t limit; | |
17261 | uint32_t flags; | |
17262 | } SegmentCache; | |
17263 | ||
17264 | typedef union { | |
17265 | uint8_t _b[16]; | |
17266 | uint16_t _w[8]; | |
17267 | uint32_t _l[4]; | |
17268 | uint64_t _q[2]; | |
17269 | float32 _s[4]; | |
17270 | float64 _d[2]; | |
17271 | } XMMReg; | |
17272 | ||
17273 | typedef union { | |
17274 | uint8_t _b[8]; | |
17275 | uint16_t _w[4]; | |
17276 | uint32_t _l[2]; | |
17277 | float32 _s[2]; | |
17278 | uint64_t q; | |
17279 | } MMXReg; | |
17280 | # 597 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" | |
17281 | typedef union { | |
17282 | floatx80 d __attribute__((aligned(16))); | |
17283 | MMXReg mmx; | |
17284 | } FPReg; | |
17285 | ||
17286 | typedef struct { | |
17287 | uint64_t base; | |
17288 | uint64_t mask; | |
17289 | } MTRRVar; | |
17290 | # 618 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" | |
17291 | typedef enum TPRAccess { | |
17292 | TPR_ACCESS_READ, | |
17293 | TPR_ACCESS_WRITE, | |
17294 | } TPRAccess; | |
17295 | ||
17296 | typedef struct CPUX86State { | |
17297 | ||
17298 | target_ulong regs[8]; | |
17299 | target_ulong eip; | |
17300 | target_ulong eflags; | |
17301 | ||
17302 | ||
17303 | ||
17304 | ||
17305 | target_ulong cc_src; | |
17306 | target_ulong cc_dst; | |
17307 | uint32_t cc_op; | |
17308 | int32_t df; | |
17309 | uint32_t hflags; | |
17310 | ||
17311 | uint32_t hflags2; | |
17312 | ||
17313 | ||
17314 | SegmentCache segs[6]; | |
17315 | SegmentCache ldt; | |
17316 | SegmentCache tr; | |
17317 | SegmentCache gdt; | |
17318 | SegmentCache idt; | |
17319 | ||
17320 | target_ulong cr[5]; | |
17321 | int32_t a20_mask; | |
17322 | ||
17323 | ||
17324 | unsigned int fpstt; | |
17325 | uint16_t fpus; | |
17326 | uint16_t fpuc; | |
17327 | uint8_t fptags[8]; | |
17328 | FPReg fpregs[8]; | |
17329 | ||
17330 | uint16_t fpop; | |
17331 | uint64_t fpip; | |
17332 | uint64_t fpdp; | |
17333 | ||
17334 | ||
17335 | float_status fp_status; | |
17336 | floatx80 ft0; | |
17337 | ||
17338 | float_status mmx_status; | |
17339 | float_status sse_status; | |
17340 | uint32_t mxcsr; | |
17341 | XMMReg xmm_regs[8]; | |
17342 | XMMReg xmm_t0; | |
17343 | MMXReg mmx_t0; | |
17344 | target_ulong cc_tmp; | |
17345 | ||
17346 | ||
17347 | uint32_t sysenter_cs; | |
17348 | target_ulong sysenter_esp; | |
17349 | target_ulong sysenter_eip; | |
17350 | uint64_t efer; | |
17351 | uint64_t star; | |
17352 | ||
17353 | uint64_t vm_hsave; | |
17354 | uint64_t vm_vmcb; | |
17355 | uint64_t tsc_offset; | |
17356 | uint64_t intercept; | |
17357 | uint16_t intercept_cr_read; | |
17358 | uint16_t intercept_cr_write; | |
17359 | uint16_t intercept_dr_read; | |
17360 | uint16_t intercept_dr_write; | |
17361 | uint32_t intercept_exceptions; | |
17362 | uint8_t v_tpr; | |
17363 | ||
17364 | ||
17365 | ||
17366 | ||
17367 | ||
17368 | ||
17369 | ||
17370 | uint64_t system_time_msr; | |
17371 | uint64_t wall_clock_msr; | |
17372 | uint64_t async_pf_en_msr; | |
17373 | ||
17374 | uint64_t tsc; | |
17375 | uint64_t tsc_deadline; | |
17376 | ||
17377 | uint64_t mcg_status; | |
17378 | uint64_t msr_ia32_misc_enable; | |
17379 | ||
17380 | ||
17381 | int error_code; | |
17382 | int exception_is_int; | |
17383 | target_ulong exception_next_eip; | |
17384 | target_ulong dr[8]; | |
17385 | union { | |
17386 | CPUBreakpoint *cpu_breakpoint[4]; | |
17387 | CPUWatchpoint *cpu_watchpoint[4]; | |
17388 | }; | |
17389 | uint32_t smbase; | |
17390 | int old_exception; | |
17391 | ||
17392 | ||
17393 | uint8_t nmi_injected; | |
17394 | uint8_t nmi_pending; | |
17395 | ||
17396 | struct TranslationBlock *current_tb; uintptr_t mem_io_pc; target_ulong mem_io_vaddr; uint32_t halted; uint32_t interrupt_request; volatile sig_atomic_t exit_request; CPUTLBEntry tlb_table[2][(1 << 8)]; target_phys_addr_t iotlb[2][(1 << 8)]; target_ulong tlb_flush_addr; target_ulong tlb_flush_mask; struct TranslationBlock *tb_jmp_cache[(1 << 12)]; long temp_buf[128]; int64_t icount_extra; union { uint32_t u32; icount_decr_u16 u16; } icount_decr; uint32_t can_do_io; struct breakpoints_head { struct CPUBreakpoint *tqh_first; struct CPUBreakpoint * *tqh_last; } breakpoints; int singlestep_enabled; struct watchpoints_head { struct CPUWatchpoint *tqh_first; struct CPUWatchpoint * *tqh_last; } watchpoints; CPUWatchpoint *watchpoint_hit; struct GDBRegisterState *gdb_regs; jmp_buf jmp_env; int exception_index; struct CPUX86State *next_cpu; int cpu_index; uint32_t host_tid; int numa_node; int nr_cores; int nr_threads; int running; int thread_id; void *opaque; uint32_t created; uint32_t stop; uint32_t stopped; struct QemuThread *thread; struct QemuCond *halt_cond; int thread_kicked; struct qemu_work_item *queued_work_first, *queued_work_last; const char *cpu_model_str; struct KVMState *kvm_state; struct kvm_run *kvm_run; int kvm_fd; int kvm_vcpu_dirty; | |
17397 | ||
17398 | uint64_t pat; | |
17399 | ||
17400 | ||
17401 | uint32_t cpuid_level; | |
17402 | uint32_t cpuid_vendor1; | |
17403 | uint32_t cpuid_vendor2; | |
17404 | uint32_t cpuid_vendor3; | |
17405 | uint32_t cpuid_version; | |
17406 | uint32_t cpuid_features; | |
17407 | uint32_t cpuid_ext_features; | |
17408 | uint32_t cpuid_xlevel; | |
17409 | uint32_t cpuid_model[12]; | |
17410 | uint32_t cpuid_ext2_features; | |
17411 | uint32_t cpuid_ext3_features; | |
17412 | uint32_t cpuid_apic_id; | |
17413 | int cpuid_vendor_override; | |
17414 | ||
17415 | uint32_t cpuid_xlevel2; | |
17416 | uint32_t cpuid_ext4_features; | |
17417 | ||
17418 | uint32_t cpuid_7_0_ebx; | |
17419 | ||
17420 | ||
17421 | uint64_t mtrr_fixed[11]; | |
17422 | uint64_t mtrr_deftype; | |
17423 | MTRRVar mtrr_var[8]; | |
17424 | ||
17425 | ||
17426 | uint32_t mp_state; | |
17427 | int32_t exception_injected; | |
17428 | int32_t interrupt_injected; | |
17429 | uint8_t soft_interrupt; | |
17430 | uint8_t has_error_code; | |
17431 | uint32_t sipi_vector; | |
17432 | uint32_t cpuid_kvm_features; | |
17433 | uint32_t cpuid_svm_features; | |
17434 | _Bool tsc_valid; | |
17435 | int tsc_khz; | |
17436 | void *kvm_xsave_buf; | |
17437 | ||
17438 | ||
17439 | ||
17440 | struct DeviceState *apic_state; | |
17441 | ||
17442 | uint64_t mcg_cap; | |
17443 | uint64_t mcg_ctl; | |
17444 | uint64_t mce_banks[10*4]; | |
17445 | ||
17446 | uint64_t tsc_aux; | |
17447 | ||
17448 | ||
17449 | uint16_t fpus_vmstate; | |
17450 | uint16_t fptag_vmstate; | |
17451 | uint16_t fpregs_format_vmstate; | |
17452 | ||
17453 | uint64_t xstate_bv; | |
17454 | XMMReg ymmh_regs[8]; | |
17455 | ||
17456 | uint64_t xcr0; | |
17457 | ||
17458 | TPRAccess tpr_access_type; | |
17459 | } CPUX86State; | |
17460 | ||
17461 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu-qom.h" 1 | |
17462 | # 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu-qom.h" | |
17463 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/cpu.h" 1 | |
17464 | # 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/cpu.h" | |
17465 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" 1 | |
17466 | # 20 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17467 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-queue.h" 1 | |
17468 | # 21 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" 2 | |
17469 | ||
17470 | struct Visitor; | |
17471 | struct Error; | |
17472 | ||
17473 | struct TypeImpl; | |
17474 | typedef struct TypeImpl *Type; | |
17475 | ||
17476 | typedef struct ObjectClass ObjectClass; | |
17477 | typedef struct Object Object; | |
17478 | ||
17479 | typedef struct TypeInfo TypeInfo; | |
17480 | ||
17481 | typedef struct InterfaceClass InterfaceClass; | |
17482 | typedef struct InterfaceInfo InterfaceInfo; | |
17483 | # 202 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17484 | typedef void (ObjectPropertyAccessor)(Object *obj, | |
17485 | struct Visitor *v, | |
17486 | void *opaque, | |
17487 | const char *name, | |
17488 | struct Error **errp); | |
17489 | # 216 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17490 | typedef void (ObjectPropertyRelease)(Object *obj, | |
17491 | const char *name, | |
17492 | void *opaque); | |
17493 | ||
17494 | typedef struct ObjectProperty | |
17495 | { | |
17496 | gchar *name; | |
17497 | gchar *type; | |
17498 | ObjectPropertyAccessor *get; | |
17499 | ObjectPropertyAccessor *set; | |
17500 | ObjectPropertyRelease *release; | |
17501 | void *opaque; | |
17502 | ||
17503 | struct { struct ObjectProperty *tqe_next; struct ObjectProperty * *tqe_prev; } node; | |
17504 | } ObjectProperty; | |
17505 | ||
17506 | ||
17507 | ||
17508 | ||
17509 | ||
17510 | ||
17511 | ||
17512 | struct ObjectClass | |
17513 | { | |
17514 | ||
17515 | Type type; | |
17516 | }; | |
17517 | # 259 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17518 | struct Object | |
17519 | { | |
17520 | ||
17521 | ObjectClass *class; | |
17522 | GSList *interfaces; | |
17523 | struct { struct ObjectProperty *tqh_first; struct ObjectProperty * *tqh_last; } properties; | |
17524 | uint32_t ref; | |
17525 | Object *parent; | |
17526 | }; | |
17527 | # 302 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17528 | struct TypeInfo | |
17529 | { | |
17530 | const char *name; | |
17531 | const char *parent; | |
17532 | ||
17533 | size_t instance_size; | |
17534 | void (*instance_init)(Object *obj); | |
17535 | void (*instance_finalize)(Object *obj); | |
17536 | ||
17537 | _Bool abstract; | |
17538 | size_t class_size; | |
17539 | ||
17540 | void (*class_init)(ObjectClass *klass, void *data); | |
17541 | void (*class_finalize)(ObjectClass *klass, void *data); | |
17542 | void *class_data; | |
17543 | ||
17544 | InterfaceInfo *interfaces; | |
17545 | }; | |
17546 | # 390 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17547 | struct InterfaceClass | |
17548 | { | |
17549 | ObjectClass parent_class; | |
17550 | }; | |
17551 | # 405 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17552 | struct InterfaceInfo | |
17553 | { | |
17554 | const char *type; | |
17555 | ||
17556 | void (*interface_initfn)(ObjectClass *class, void *data); | |
17557 | }; | |
17558 | # 424 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17559 | Object *object_new(const char *typename); | |
17560 | # 436 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17561 | Object *object_new_with_type(Type type); | |
17562 | # 445 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17563 | void object_delete(Object *obj); | |
17564 | # 455 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17565 | void object_initialize_with_type(void *data, Type type); | |
17566 | # 465 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17567 | void object_initialize(void *obj, const char *typename); | |
17568 | # 474 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17569 | void object_finalize(void *obj); | |
17570 | # 486 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17571 | Object *object_dynamic_cast(Object *obj, const char *typename); | |
17572 | # 495 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17573 | Object *object_dynamic_cast_assert(Object *obj, const char *typename); | |
17574 | ||
17575 | ||
17576 | ||
17577 | ||
17578 | ||
17579 | ||
17580 | ||
17581 | ObjectClass *object_get_class(Object *obj); | |
17582 | ||
17583 | ||
17584 | ||
17585 | ||
17586 | ||
17587 | ||
17588 | ||
17589 | const char *object_get_typename(Object *obj); | |
17590 | # 522 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17591 | Type type_register_static(const TypeInfo *info); | |
17592 | # 535 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17593 | Type type_register(const TypeInfo *info); | |
17594 | # 544 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17595 | ObjectClass *object_class_dynamic_cast_assert(ObjectClass *klass, | |
17596 | const char *typename); | |
17597 | ||
17598 | ObjectClass *object_class_dynamic_cast(ObjectClass *klass, | |
17599 | const char *typename); | |
17600 | ||
17601 | ||
17602 | ||
17603 | ||
17604 | ||
17605 | ||
17606 | ||
17607 | const char *object_class_get_name(ObjectClass *klass); | |
17608 | ||
17609 | ||
17610 | ||
17611 | ||
17612 | ||
17613 | ||
17614 | ||
17615 | ObjectClass *object_class_by_name(const char *typename); | |
17616 | ||
17617 | void object_class_foreach(void (*fn)(ObjectClass *klass, void *opaque), | |
17618 | const char *implements_type, _Bool include_abstract, | |
17619 | void *opaque); | |
17620 | # 577 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17621 | GSList *object_class_get_list(const char *implements_type, | |
17622 | _Bool include_abstract); | |
17623 | # 587 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17624 | void object_ref(Object *obj); | |
17625 | # 596 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17626 | void object_unref(Object *obj); | |
17627 | # 618 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17628 | void object_property_add(Object *obj, const char *name, const char *type, | |
17629 | ObjectPropertyAccessor *get, | |
17630 | ObjectPropertyAccessor *set, | |
17631 | ObjectPropertyRelease *release, | |
17632 | void *opaque, struct Error **errp); | |
17633 | ||
17634 | void object_property_del(Object *obj, const char *name, struct Error **errp); | |
17635 | ||
17636 | void object_unparent(Object *obj); | |
17637 | # 638 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17638 | void object_property_get(Object *obj, struct Visitor *v, const char *name, | |
17639 | struct Error **errp); | |
17640 | # 649 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17641 | void object_property_set_str(Object *obj, const char *value, | |
17642 | const char *name, struct Error **errp); | |
17643 | # 662 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17644 | char *object_property_get_str(Object *obj, const char *name, | |
17645 | struct Error **errp); | |
17646 | # 673 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17647 | void object_property_set_link(Object *obj, Object *value, | |
17648 | const char *name, struct Error **errp); | |
17649 | # 686 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17650 | Object *object_property_get_link(Object *obj, const char *name, | |
17651 | struct Error **errp); | |
17652 | # 697 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17653 | void object_property_set_bool(Object *obj, _Bool value, | |
17654 | const char *name, struct Error **errp); | |
17655 | # 709 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17656 | _Bool object_property_get_bool(Object *obj, const char *name, | |
17657 | struct Error **errp); | |
17658 | # 720 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17659 | void object_property_set_int(Object *obj, int64_t value, | |
17660 | const char *name, struct Error **errp); | |
17661 | # 732 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17662 | int64_t object_property_get_int(Object *obj, const char *name, | |
17663 | struct Error **errp); | |
17664 | # 746 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17665 | void object_property_set(Object *obj, struct Visitor *v, const char *name, | |
17666 | struct Error **errp); | |
17667 | # 758 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17668 | void object_property_parse(Object *obj, const char *string, | |
17669 | const char *name, struct Error **errp); | |
17670 | # 770 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17671 | char *object_property_print(Object *obj, const char *name, | |
17672 | struct Error **errp); | |
17673 | # 781 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17674 | const char *object_property_get_type(Object *obj, const char *name, | |
17675 | struct Error **errp); | |
17676 | ||
17677 | ||
17678 | ||
17679 | ||
17680 | ||
17681 | ||
17682 | Object *object_get_root(void); | |
17683 | ||
17684 | ||
17685 | ||
17686 | ||
17687 | ||
17688 | ||
17689 | ||
17690 | gchar *object_get_canonical_path(Object *obj); | |
17691 | # 822 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17692 | Object *object_resolve_path(const char *path, _Bool *ambiguous); | |
17693 | # 842 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17694 | Object *object_resolve_path_type(const char *path, const char *typename, | |
17695 | _Bool *ambiguous); | |
17696 | # 855 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17697 | Object *object_resolve_path_component(Object *parent, gchar *part); | |
17698 | # 874 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17699 | void object_property_add_child(Object *obj, const char *name, | |
17700 | Object *child, struct Error **errp); | |
17701 | # 891 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17702 | void object_property_add_link(Object *obj, const char *name, | |
17703 | const char *type, Object **child, | |
17704 | struct Error **errp); | |
17705 | # 907 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17706 | void object_property_add_str(Object *obj, const char *name, | |
17707 | char *(*get)(Object *, struct Error **), | |
17708 | void (*set)(Object *, const char *, struct Error **), | |
17709 | struct Error **errp); | |
17710 | # 922 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" | |
17711 | Object *container_get(Object *root, const char *path); | |
17712 | # 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/cpu.h" 2 | |
17713 | # 38 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/cpu.h" | |
17714 | typedef struct CPUState CPUState; | |
17715 | ||
17716 | ||
17717 | ||
17718 | ||
17719 | ||
17720 | ||
17721 | ||
17722 | typedef struct CPUClass { | |
17723 | ||
17724 | ObjectClass parent_class; | |
17725 | ||
17726 | ||
17727 | void (*reset)(CPUState *cpu); | |
17728 | } CPUClass; | |
17729 | ||
17730 | ||
17731 | ||
17732 | ||
17733 | ||
17734 | ||
17735 | struct CPUState { | |
17736 | ||
17737 | Object parent_obj; | |
17738 | ||
17739 | ||
17740 | ||
17741 | }; | |
17742 | ||
17743 | ||
17744 | ||
17745 | ||
17746 | ||
17747 | ||
17748 | void cpu_reset(CPUState *cpu); | |
17749 | # 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu-qom.h" 2 | |
17750 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 1 | |
17751 | # 25 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu-qom.h" 2 | |
17752 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/error.h" 1 | |
17753 | # 22 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/error.h" | |
17754 | typedef struct Error Error; | |
17755 | ||
17756 | ||
17757 | ||
17758 | ||
17759 | ||
17760 | ||
17761 | void error_set(Error **err, const char *fmt, ...) __attribute__((format(gnu_printf, 2, 3))); | |
17762 | ||
17763 | ||
17764 | ||
17765 | ||
17766 | ||
17767 | _Bool error_is_set(Error **err); | |
17768 | ||
17769 | ||
17770 | ||
17771 | ||
17772 | Error *error_copy(const Error *err); | |
17773 | ||
17774 | ||
17775 | ||
17776 | ||
17777 | const char *error_get_pretty(Error *err); | |
17778 | ||
17779 | ||
17780 | ||
17781 | ||
17782 | const char *error_get_field(Error *err, const char *field); | |
17783 | ||
17784 | ||
17785 | ||
17786 | ||
17787 | void error_set_field(Error *err, const char *field, const char *value); | |
17788 | ||
17789 | ||
17790 | ||
17791 | ||
17792 | ||
17793 | ||
17794 | void error_propagate(Error **dst_err, Error *local_err); | |
17795 | ||
17796 | ||
17797 | ||
17798 | ||
17799 | void error_free(Error *err); | |
17800 | ||
17801 | ||
17802 | ||
17803 | ||
17804 | ||
17805 | _Bool error_is_type(Error *err, const char *fmt); | |
17806 | # 26 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu-qom.h" 2 | |
17807 | # 46 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu-qom.h" | |
17808 | typedef struct X86CPUClass { | |
17809 | ||
17810 | CPUClass parent_class; | |
17811 | ||
17812 | ||
17813 | void (*parent_reset)(CPUState *cpu); | |
17814 | } X86CPUClass; | |
17815 | ||
17816 | ||
17817 | ||
17818 | ||
17819 | ||
17820 | ||
17821 | ||
17822 | typedef struct X86CPU { | |
17823 | ||
17824 | CPUState parent_obj; | |
17825 | ||
17826 | ||
17827 | CPUX86State env; | |
17828 | } X86CPU; | |
17829 | ||
17830 | static __attribute__ (( always_inline )) __inline__ X86CPU *x86_env_get_cpu(CPUX86State *env) | |
17831 | { | |
17832 | return ((X86CPU *)object_dynamic_cast_assert(((Object *)((({ const typeof(((X86CPU *) 0)->env) *__mptr = (env); (X86CPU *) ((char *) __mptr - __builtin_offsetof (X86CPU, env));})))), ("i386-cpu"))); | |
17833 | } | |
17834 | ||
17835 | ||
17836 | ||
17837 | ||
17838 | void x86_cpu_realize(Object *obj, Error **errp); | |
17839 | # 789 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 | |
17840 | ||
17841 | CPUX86State *cpu_x86_init(const char *cpu_model); | |
17842 | int cpu_x86_exec(CPUX86State *s); | |
17843 | void x86_cpu_list (FILE *f, fprintf_function cpu_fprintf, const char *optarg); | |
17844 | void x86_cpudef_setup(void); | |
17845 | int cpu_x86_support_mca_broadcast(CPUX86State *env); | |
17846 | ||
17847 | int cpu_get_pic_interrupt(CPUX86State *s); | |
17848 | ||
17849 | void cpu_set_ferr(CPUX86State *s); | |
17850 | ||
17851 | ||
17852 | ||
17853 | static __attribute__ (( always_inline )) __inline__ void cpu_x86_load_seg_cache(CPUX86State *env, | |
17854 | int seg_reg, unsigned int selector, | |
17855 | target_ulong base, | |
17856 | unsigned int limit, | |
17857 | unsigned int flags) | |
17858 | { | |
17859 | SegmentCache *sc; | |
17860 | unsigned int new_hflags; | |
17861 | ||
17862 | sc = &env->segs[seg_reg]; | |
17863 | sc->selector = selector; | |
17864 | sc->base = base; | |
17865 | sc->limit = limit; | |
17866 | sc->flags = flags; | |
17867 | ||
17868 | ||
17869 | { | |
17870 | if (seg_reg == 1) { | |
17871 | ||
17872 | ||
17873 | ||
17874 | ||
17875 | ||
17876 | ||
17877 | ||
17878 | { | |
17879 | ||
17880 | new_hflags = (env->segs[1].flags & (1 << 22)) | |
17881 | >> (22 - 4); | |
17882 | env->hflags = (env->hflags & ~((1 << 4) | (1 << 15))) | | |
17883 | new_hflags; | |
17884 | } | |
17885 | } | |
17886 | new_hflags = (env->segs[2].flags & (1 << 22)) | |
17887 | >> (22 - 5); | |
17888 | if (env->hflags & (1 << 15)) { | |
17889 | ||
17890 | } else if (!(env->cr[0] & (1 << 0)) || | |
17891 | (env->eflags & 0x00020000) || | |
17892 | !(env->hflags & (1 << 4))) { | |
17893 | ||
17894 | ||
17895 | ||
17896 | ||
17897 | ||
17898 | new_hflags |= (1 << 6); | |
17899 | } else { | |
17900 | new_hflags |= ((env->segs[3].base | | |
17901 | env->segs[0].base | | |
17902 | env->segs[2].base) != 0) << | |
17903 | 6; | |
17904 | } | |
17905 | env->hflags = (env->hflags & | |
17906 | ~((1 << 5) | (1 << 6))) | new_hflags; | |
17907 | } | |
17908 | } | |
17909 | ||
17910 | static __attribute__ (( always_inline )) __inline__ void cpu_x86_load_seg_cache_sipi(CPUX86State *env, | |
17911 | int sipi_vector) | |
17912 | { | |
17913 | env->eip = 0; | |
17914 | cpu_x86_load_seg_cache(env, 1, sipi_vector << 8, | |
17915 | sipi_vector << 12, | |
17916 | env->segs[1].limit, | |
17917 | env->segs[1].flags); | |
17918 | env->halted = 0; | |
17919 | } | |
17920 | ||
17921 | int cpu_x86_get_descr_debug(CPUX86State *env, unsigned int selector, | |
17922 | target_ulong *base, unsigned int *limit, | |
17923 | unsigned int *flags); | |
17924 | ||
17925 | ||
17926 | static __attribute__ (( always_inline )) __inline__ void cpu_x86_set_cpl(CPUX86State *s, int cpl) | |
17927 | { | |
17928 | ||
17929 | s->hflags = (s->hflags & ~(3 << 0)) | cpl; | |
17930 | ||
17931 | ||
17932 | ||
17933 | } | |
17934 | ||
17935 | ||
17936 | ||
17937 | void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f); | |
17938 | floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper); | |
17939 | ||
17940 | ||
17941 | ||
17942 | ||
17943 | void cpu_x86_load_seg(CPUX86State *s, int seg_reg, int selector); | |
17944 | void cpu_x86_fsave(CPUX86State *s, target_ulong ptr, int data32); | |
17945 | void cpu_x86_frstor(CPUX86State *s, target_ulong ptr, int data32); | |
17946 | ||
17947 | ||
17948 | ||
17949 | ||
17950 | int cpu_x86_signal_handler(int host_signum, void *pinfo, | |
17951 | void *puc); | |
17952 | ||
17953 | ||
17954 | void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, | |
17955 | uint32_t *eax, uint32_t *ebx, | |
17956 | uint32_t *ecx, uint32_t *edx); | |
17957 | int cpu_x86_register(X86CPU *cpu, const char *cpu_model); | |
17958 | void cpu_clear_apic_feature(CPUX86State *env); | |
17959 | void host_cpuid(uint32_t function, uint32_t count, | |
17960 | uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx); | |
17961 | ||
17962 | ||
17963 | int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr, | |
17964 | int is_write, int mmu_idx); | |
17965 | ||
17966 | void cpu_x86_set_a20(CPUX86State *env, int a20_state); | |
17967 | ||
17968 | static __attribute__ (( always_inline )) __inline__ int hw_breakpoint_enabled(unsigned long dr7, int index) | |
17969 | { | |
17970 | return (dr7 >> (index * 2)) & 3; | |
17971 | } | |
17972 | ||
17973 | static __attribute__ (( always_inline )) __inline__ int hw_breakpoint_type(unsigned long dr7, int index) | |
17974 | { | |
17975 | return (dr7 >> (16 + (index * 4))) & 3; | |
17976 | } | |
17977 | ||
17978 | static __attribute__ (( always_inline )) __inline__ int hw_breakpoint_len(unsigned long dr7, int index) | |
17979 | { | |
17980 | int len = ((dr7 >> (18 + (index * 4))) & 3); | |
17981 | return (len == 2) ? 8 : len + 1; | |
17982 | } | |
17983 | ||
17984 | void hw_breakpoint_insert(CPUX86State *env, int index); | |
17985 | void hw_breakpoint_remove(CPUX86State *env, int index); | |
17986 | int check_hw_breakpoints(CPUX86State *env, int force_dr6_update); | |
17987 | ||
17988 | ||
17989 | void cpu_x86_update_cr0(CPUX86State *env, uint32_t new_cr0); | |
17990 | void cpu_x86_update_cr3(CPUX86State *env, target_ulong new_cr3); | |
17991 | void cpu_x86_update_cr4(CPUX86State *env, uint32_t new_cr4); | |
17992 | ||
17993 | ||
17994 | void cpu_smm_update(CPUX86State *env); | |
17995 | uint64_t cpu_get_tsc(CPUX86State *env); | |
17996 | struct CPUX86State *pc_new_cpu(const char *cpu_model); | |
17997 | # 977 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" | |
17998 | static __attribute__ (( always_inline )) __inline__ int cpu_mmu_index (CPUX86State *env) | |
17999 | { | |
18000 | return (env->hflags & (3 << 0)) == 3 ? 1 : 0; | |
18001 | } | |
18002 | # 1013 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" | |
18003 | void optimize_flags_init(void); | |
18004 | # 1024 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" | |
18005 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" 1 | |
18006 | # 22 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" | |
18007 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 1 | |
18008 | # 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" 2 | |
18009 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-tls.h" 1 | |
18010 | # 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" 2 | |
18011 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-common.h" 1 | |
18012 | # 14 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-common.h" | |
18013 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" 1 | |
18014 | ||
18015 | ||
18016 | ||
18017 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config-host.h" 1 | |
18018 | # 5 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" 2 | |
18019 | # 16 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" | |
18020 | # 1 "/usr/include/byteswap.h" 1 3 4 | |
18021 | # 23 "/usr/include/byteswap.h" 3 4 | |
18022 | # 1 "/usr/include/bits/byteswap.h" 1 3 4 | |
18023 | # 24 "/usr/include/byteswap.h" 2 3 4 | |
18024 | # 17 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" 2 | |
18025 | # 53 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" | |
18026 | static __attribute__ (( always_inline )) __inline__ uint16_t bswap16(uint16_t x) | |
18027 | { | |
18028 | return (__extension__ ({ register unsigned short int __v, __x = (unsigned short int) (x); if (__builtin_constant_p (__x)) __v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8))); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); | |
18029 | } | |
18030 | ||
18031 | static __attribute__ (( always_inline )) __inline__ uint32_t bswap32(uint32_t x) | |
18032 | { | |
18033 | return (__extension__ ({ register unsigned int __v, __x = (x); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); | |
18034 | } | |
18035 | ||
18036 | static __attribute__ (( always_inline )) __inline__ uint64_t bswap64(uint64_t x) | |
18037 | { | |
18038 | return (__extension__ ({ union { __extension__ unsigned long long int __ll; unsigned long int __l[2]; } __w, __r; if (__builtin_constant_p (x)) __r.__ll = (__extension__ ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56))); else { __w.__ll = (x); __r.__l[0] = (__extension__ ({ register unsigned int __v, __x = (__w.__l[1]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); __r.__l[1] = (__extension__ ({ register unsigned int __v, __x = (__w.__l[0]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); } __r.__ll; })); | |
18039 | } | |
18040 | ||
18041 | ||
18042 | ||
18043 | static __attribute__ (( always_inline )) __inline__ void bswap16s(uint16_t *s) | |
18044 | { | |
18045 | *s = bswap16(*s); | |
18046 | } | |
18047 | ||
18048 | static __attribute__ (( always_inline )) __inline__ void bswap32s(uint32_t *s) | |
18049 | { | |
18050 | *s = bswap32(*s); | |
18051 | } | |
18052 | ||
18053 | static __attribute__ (( always_inline )) __inline__ void bswap64s(uint64_t *s) | |
18054 | { | |
18055 | *s = bswap64(*s); | |
18056 | } | |
18057 | # 128 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" | |
18058 | static __attribute__ (( always_inline )) __inline__ uint16_t be16_to_cpu(uint16_t v){ return bswap16(v);}static __attribute__ (( always_inline )) __inline__ uint16_t cpu_to_be16(uint16_t v){ return bswap16(v);}static __attribute__ (( always_inline )) __inline__ void be16_to_cpus(uint16_t *p){ *p = bswap16(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_be16s(uint16_t *p){ *p = bswap16(*p);}static __attribute__ (( always_inline )) __inline__ uint16_t be16_to_cpup(const uint16_t *p){ return be16_to_cpu(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_be16w(uint16_t *p, uint16_t v){ *p = cpu_to_be16(v);} | |
18059 | static __attribute__ (( always_inline )) __inline__ uint32_t be32_to_cpu(uint32_t v){ return bswap32(v);}static __attribute__ (( always_inline )) __inline__ uint32_t cpu_to_be32(uint32_t v){ return bswap32(v);}static __attribute__ (( always_inline )) __inline__ void be32_to_cpus(uint32_t *p){ *p = bswap32(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_be32s(uint32_t *p){ *p = bswap32(*p);}static __attribute__ (( always_inline )) __inline__ uint32_t be32_to_cpup(const uint32_t *p){ return be32_to_cpu(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_be32w(uint32_t *p, uint32_t v){ *p = cpu_to_be32(v);} | |
18060 | static __attribute__ (( always_inline )) __inline__ uint64_t be64_to_cpu(uint64_t v){ return bswap64(v);}static __attribute__ (( always_inline )) __inline__ uint64_t cpu_to_be64(uint64_t v){ return bswap64(v);}static __attribute__ (( always_inline )) __inline__ void be64_to_cpus(uint64_t *p){ *p = bswap64(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_be64s(uint64_t *p){ *p = bswap64(*p);}static __attribute__ (( always_inline )) __inline__ uint64_t be64_to_cpup(const uint64_t *p){ return be64_to_cpu(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_be64w(uint64_t *p, uint64_t v){ *p = cpu_to_be64(v);} | |
18061 | ||
18062 | static __attribute__ (( always_inline )) __inline__ uint16_t le16_to_cpu(uint16_t v){ return (v);}static __attribute__ (( always_inline )) __inline__ uint16_t cpu_to_le16(uint16_t v){ return (v);}static __attribute__ (( always_inline )) __inline__ void le16_to_cpus(uint16_t *p){ }static __attribute__ (( always_inline )) __inline__ void cpu_to_le16s(uint16_t *p){ }static __attribute__ (( always_inline )) __inline__ uint16_t le16_to_cpup(const uint16_t *p){ return le16_to_cpu(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_le16w(uint16_t *p, uint16_t v){ *p = cpu_to_le16(v);} | |
18063 | static __attribute__ (( always_inline )) __inline__ uint32_t le32_to_cpu(uint32_t v){ return (v);}static __attribute__ (( always_inline )) __inline__ uint32_t cpu_to_le32(uint32_t v){ return (v);}static __attribute__ (( always_inline )) __inline__ void le32_to_cpus(uint32_t *p){ }static __attribute__ (( always_inline )) __inline__ void cpu_to_le32s(uint32_t *p){ }static __attribute__ (( always_inline )) __inline__ uint32_t le32_to_cpup(const uint32_t *p){ return le32_to_cpu(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_le32w(uint32_t *p, uint32_t v){ *p = cpu_to_le32(v);} | |
18064 | static __attribute__ (( always_inline )) __inline__ uint64_t le64_to_cpu(uint64_t v){ return (v);}static __attribute__ (( always_inline )) __inline__ uint64_t cpu_to_le64(uint64_t v){ return (v);}static __attribute__ (( always_inline )) __inline__ void le64_to_cpus(uint64_t *p){ }static __attribute__ (( always_inline )) __inline__ void cpu_to_le64s(uint64_t *p){ }static __attribute__ (( always_inline )) __inline__ uint64_t le64_to_cpup(const uint64_t *p){ return le64_to_cpu(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_le64w(uint64_t *p, uint64_t v){ *p = cpu_to_le64(v);} | |
18065 | # 236 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" | |
18066 | static __attribute__ (( always_inline )) __inline__ uint32_t qemu_bswap_len(uint32_t value, int len) | |
18067 | { | |
18068 | return bswap32(value) >> (32 - 8 * len); | |
18069 | } | |
18070 | ||
18071 | typedef union { | |
18072 | float32 f; | |
18073 | uint32_t l; | |
18074 | } CPU_FloatU; | |
18075 | ||
18076 | typedef union { | |
18077 | float64 d; | |
18078 | ||
18079 | ||
18080 | ||
18081 | ||
18082 | ||
18083 | ||
18084 | struct { | |
18085 | uint32_t lower; | |
18086 | uint32_t upper; | |
18087 | } l; | |
18088 | ||
18089 | uint64_t ll; | |
18090 | } CPU_DoubleU; | |
18091 | ||
18092 | typedef union { | |
18093 | floatx80 d; | |
18094 | struct { | |
18095 | uint64_t lower; | |
18096 | uint16_t upper; | |
18097 | } l; | |
18098 | } CPU_LDoubleU; | |
18099 | ||
18100 | typedef union { | |
18101 | float128 q; | |
18102 | # 284 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" | |
18103 | struct { | |
18104 | uint32_t lowest; | |
18105 | uint32_t lower; | |
18106 | uint32_t upper; | |
18107 | uint32_t upmost; | |
18108 | } l; | |
18109 | struct { | |
18110 | uint64_t lower; | |
18111 | uint64_t upper; | |
18112 | } ll; | |
18113 | ||
18114 | } CPU_QuadU; | |
18115 | # 328 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" | |
18116 | static __attribute__ (( always_inline )) __inline__ int ldub_p(const void *ptr) | |
18117 | { | |
18118 | return *(uint8_t *)ptr; | |
18119 | } | |
18120 | ||
18121 | static __attribute__ (( always_inline )) __inline__ int ldsb_p(const void *ptr) | |
18122 | { | |
18123 | return *(int8_t *)ptr; | |
18124 | } | |
18125 | ||
18126 | static __attribute__ (( always_inline )) __inline__ void stb_p(void *ptr, int v) | |
18127 | { | |
18128 | *(uint8_t *)ptr = v; | |
18129 | } | |
18130 | # 465 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" | |
18131 | static __attribute__ (( always_inline )) __inline__ int lduw_le_p(const void *ptr) | |
18132 | { | |
18133 | return *(uint16_t *)ptr; | |
18134 | } | |
18135 | ||
18136 | static __attribute__ (( always_inline )) __inline__ int ldsw_le_p(const void *ptr) | |
18137 | { | |
18138 | return *(int16_t *)ptr; | |
18139 | } | |
18140 | ||
18141 | static __attribute__ (( always_inline )) __inline__ int ldl_le_p(const void *ptr) | |
18142 | { | |
18143 | return *(uint32_t *)ptr; | |
18144 | } | |
18145 | ||
18146 | static __attribute__ (( always_inline )) __inline__ uint64_t ldq_le_p(const void *ptr) | |
18147 | { | |
18148 | return *(uint64_t *)ptr; | |
18149 | } | |
18150 | ||
18151 | static __attribute__ (( always_inline )) __inline__ void stw_le_p(void *ptr, int v) | |
18152 | { | |
18153 | *(uint16_t *)ptr = v; | |
18154 | } | |
18155 | ||
18156 | static __attribute__ (( always_inline )) __inline__ void stl_le_p(void *ptr, int v) | |
18157 | { | |
18158 | *(uint32_t *)ptr = v; | |
18159 | } | |
18160 | ||
18161 | static __attribute__ (( always_inline )) __inline__ void stq_le_p(void *ptr, uint64_t v) | |
18162 | { | |
18163 | *(uint64_t *)ptr = v; | |
18164 | } | |
18165 | ||
18166 | ||
18167 | ||
18168 | static __attribute__ (( always_inline )) __inline__ float32 ldfl_le_p(const void *ptr) | |
18169 | { | |
18170 | return *(float32 *)ptr; | |
18171 | } | |
18172 | ||
18173 | static __attribute__ (( always_inline )) __inline__ float64 ldfq_le_p(const void *ptr) | |
18174 | { | |
18175 | return *(float64 *)ptr; | |
18176 | } | |
18177 | ||
18178 | static __attribute__ (( always_inline )) __inline__ void stfl_le_p(void *ptr, float32 v) | |
18179 | { | |
18180 | *(float32 *)ptr = v; | |
18181 | } | |
18182 | ||
18183 | static __attribute__ (( always_inline )) __inline__ void stfq_le_p(void *ptr, float64 v) | |
18184 | { | |
18185 | *(float64 *)ptr = v; | |
18186 | } | |
18187 | ||
18188 | ||
18189 | ||
18190 | ||
18191 | static __attribute__ (( always_inline )) __inline__ int lduw_be_p(const void *ptr) | |
18192 | { | |
18193 | ||
18194 | int val; | |
18195 | asm volatile ("movzwl %1, %0\n" | |
18196 | "xchgb %b0, %h0\n" | |
18197 | : "=q" (val) | |
18198 | : "m" (*(uint16_t *)ptr)); | |
18199 | return val; | |
18200 | ||
18201 | ||
18202 | ||
18203 | ||
18204 | } | |
18205 | ||
18206 | static __attribute__ (( always_inline )) __inline__ int ldsw_be_p(const void *ptr) | |
18207 | { | |
18208 | ||
18209 | int val; | |
18210 | asm volatile ("movzwl %1, %0\n" | |
18211 | "xchgb %b0, %h0\n" | |
18212 | : "=q" (val) | |
18213 | : "m" (*(uint16_t *)ptr)); | |
18214 | return (int16_t)val; | |
18215 | ||
18216 | ||
18217 | ||
18218 | ||
18219 | } | |
18220 | ||
18221 | static __attribute__ (( always_inline )) __inline__ int ldl_be_p(const void *ptr) | |
18222 | { | |
18223 | ||
18224 | int val; | |
18225 | asm volatile ("movl %1, %0\n" | |
18226 | "bswap %0\n" | |
18227 | : "=r" (val) | |
18228 | : "m" (*(uint32_t *)ptr)); | |
18229 | return val; | |
18230 | ||
18231 | ||
18232 | ||
18233 | ||
18234 | } | |
18235 | ||
18236 | static __attribute__ (( always_inline )) __inline__ uint64_t ldq_be_p(const void *ptr) | |
18237 | { | |
18238 | uint32_t a,b; | |
18239 | a = ldl_be_p(ptr); | |
18240 | b = ldl_be_p((uint8_t *)ptr + 4); | |
18241 | return (((uint64_t)a<<32)|b); | |
18242 | } | |
18243 | ||
18244 | static __attribute__ (( always_inline )) __inline__ void stw_be_p(void *ptr, int v) | |
18245 | { | |
18246 | ||
18247 | asm volatile ("xchgb %b0, %h0\n" | |
18248 | "movw %w0, %1\n" | |
18249 | : "=q" (v) | |
18250 | : "m" (*(uint16_t *)ptr), "0" (v)); | |
18251 | ||
18252 | ||
18253 | ||
18254 | ||
18255 | ||
18256 | } | |
18257 | ||
18258 | static __attribute__ (( always_inline )) __inline__ void stl_be_p(void *ptr, int v) | |
18259 | { | |
18260 | ||
18261 | asm volatile ("bswap %0\n" | |
18262 | "movl %0, %1\n" | |
18263 | : "=r" (v) | |
18264 | : "m" (*(uint32_t *)ptr), "0" (v)); | |
18265 | ||
18266 | ||
18267 | ||
18268 | ||
18269 | ||
18270 | ||
18271 | ||
18272 | } | |
18273 | ||
18274 | static __attribute__ (( always_inline )) __inline__ void stq_be_p(void *ptr, uint64_t v) | |
18275 | { | |
18276 | stl_be_p(ptr, v >> 32); | |
18277 | stl_be_p((uint8_t *)ptr + 4, v); | |
18278 | } | |
18279 | ||
18280 | ||
18281 | ||
18282 | static __attribute__ (( always_inline )) __inline__ float32 ldfl_be_p(const void *ptr) | |
18283 | { | |
18284 | union { | |
18285 | float32 f; | |
18286 | uint32_t i; | |
18287 | } u; | |
18288 | u.i = ldl_be_p(ptr); | |
18289 | return u.f; | |
18290 | } | |
18291 | ||
18292 | static __attribute__ (( always_inline )) __inline__ void stfl_be_p(void *ptr, float32 v) | |
18293 | { | |
18294 | union { | |
18295 | float32 f; | |
18296 | uint32_t i; | |
18297 | } u; | |
18298 | u.f = v; | |
18299 | stl_be_p(ptr, u.i); | |
18300 | } | |
18301 | ||
18302 | static __attribute__ (( always_inline )) __inline__ float64 ldfq_be_p(const void *ptr) | |
18303 | { | |
18304 | CPU_DoubleU u; | |
18305 | u.l.upper = ldl_be_p(ptr); | |
18306 | u.l.lower = ldl_be_p((uint8_t *)ptr + 4); | |
18307 | return u.d; | |
18308 | } | |
18309 | ||
18310 | static __attribute__ (( always_inline )) __inline__ void stfq_be_p(void *ptr, float64 v) | |
18311 | { | |
18312 | CPU_DoubleU u; | |
18313 | u.d = v; | |
18314 | stl_be_p(ptr, u.l.upper); | |
18315 | stl_be_p((uint8_t *)ptr + 4, u.l.lower); | |
18316 | } | |
18317 | # 15 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-common.h" 2 | |
18318 | ||
18319 | ||
18320 | ||
18321 | ||
18322 | enum device_endian { | |
18323 | DEVICE_NATIVE_ENDIAN, | |
18324 | DEVICE_BIG_ENDIAN, | |
18325 | DEVICE_LITTLE_ENDIAN, | |
18326 | }; | |
18327 | ||
18328 | ||
18329 | ||
18330 | ||
18331 | ||
18332 | ||
18333 | ||
18334 | typedef uintptr_t ram_addr_t; | |
18335 | ||
18336 | ||
18337 | ||
18338 | ||
18339 | ||
18340 | ||
18341 | typedef void CPUWriteMemoryFunc(void *opaque, target_phys_addr_t addr, uint32_t value); | |
18342 | typedef uint32_t CPUReadMemoryFunc(void *opaque, target_phys_addr_t addr); | |
18343 | ||
18344 | void qemu_ram_remap(ram_addr_t addr, ram_addr_t length); | |
18345 | ||
18346 | void *qemu_get_ram_ptr(ram_addr_t addr); | |
18347 | void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size); | |
18348 | ||
18349 | ||
18350 | void *qemu_safe_ram_ptr(ram_addr_t addr); | |
18351 | void qemu_put_ram_ptr(void *addr); | |
18352 | ||
18353 | int qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr); | |
18354 | ram_addr_t qemu_ram_addr_from_host_nofail(void *ptr); | |
18355 | void qemu_ram_set_idstr(ram_addr_t addr, const char *name, DeviceState *dev); | |
18356 | ||
18357 | void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, | |
18358 | int len, int is_write); | |
18359 | static __attribute__ (( always_inline )) __inline__ void cpu_physical_memory_read(target_phys_addr_t addr, | |
18360 | void *buf, int len) | |
18361 | { | |
18362 | cpu_physical_memory_rw(addr, buf, len, 0); | |
18363 | } | |
18364 | static __attribute__ (( always_inline )) __inline__ void cpu_physical_memory_write(target_phys_addr_t addr, | |
18365 | const void *buf, int len) | |
18366 | { | |
18367 | cpu_physical_memory_rw(addr, (void *)buf, len, 1); | |
18368 | } | |
18369 | void *cpu_physical_memory_map(target_phys_addr_t addr, | |
18370 | target_phys_addr_t *plen, | |
18371 | int is_write); | |
18372 | void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len, | |
18373 | int is_write, target_phys_addr_t access_len); | |
18374 | void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque)); | |
18375 | void cpu_unregister_map_client(void *cookie); | |
18376 | ||
18377 | ||
18378 | ||
18379 | ||
18380 | ||
18381 | ||
18382 | void qemu_flush_coalesced_mmio_buffer(void); | |
18383 | ||
18384 | uint32_t ldub_phys(target_phys_addr_t addr); | |
18385 | uint32_t lduw_le_phys(target_phys_addr_t addr); | |
18386 | uint32_t lduw_be_phys(target_phys_addr_t addr); | |
18387 | uint32_t ldl_le_phys(target_phys_addr_t addr); | |
18388 | uint32_t ldl_be_phys(target_phys_addr_t addr); | |
18389 | uint64_t ldq_le_phys(target_phys_addr_t addr); | |
18390 | uint64_t ldq_be_phys(target_phys_addr_t addr); | |
18391 | void stb_phys(target_phys_addr_t addr, uint32_t val); | |
18392 | void stw_le_phys(target_phys_addr_t addr, uint32_t val); | |
18393 | void stw_be_phys(target_phys_addr_t addr, uint32_t val); | |
18394 | void stl_le_phys(target_phys_addr_t addr, uint32_t val); | |
18395 | void stl_be_phys(target_phys_addr_t addr, uint32_t val); | |
18396 | void stq_le_phys(target_phys_addr_t addr, uint64_t val); | |
18397 | void stq_be_phys(target_phys_addr_t addr, uint64_t val); | |
18398 | ||
18399 | ||
18400 | uint32_t lduw_phys(target_phys_addr_t addr); | |
18401 | uint32_t ldl_phys(target_phys_addr_t addr); | |
18402 | uint64_t ldq_phys(target_phys_addr_t addr); | |
18403 | void stl_phys_notdirty(target_phys_addr_t addr, uint32_t val); | |
18404 | void stq_phys_notdirty(target_phys_addr_t addr, uint64_t val); | |
18405 | void stw_phys(target_phys_addr_t addr, uint32_t val); | |
18406 | void stl_phys(target_phys_addr_t addr, uint32_t val); | |
18407 | void stq_phys(target_phys_addr_t addr, uint64_t val); | |
18408 | ||
18409 | ||
18410 | void cpu_physical_memory_write_rom(target_phys_addr_t addr, | |
18411 | const uint8_t *buf, int len); | |
18412 | ||
18413 | extern struct MemoryRegion io_mem_ram; | |
18414 | extern struct MemoryRegion io_mem_rom; | |
18415 | extern struct MemoryRegion io_mem_unassigned; | |
18416 | extern struct MemoryRegion io_mem_notdirty; | |
18417 | # 25 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" 2 | |
18418 | # 77 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" | |
18419 | static __attribute__ (( always_inline )) __inline__ uint16_t tswap16(uint16_t s) | |
18420 | { | |
18421 | return s; | |
18422 | } | |
18423 | ||
18424 | static __attribute__ (( always_inline )) __inline__ uint32_t tswap32(uint32_t s) | |
18425 | { | |
18426 | return s; | |
18427 | } | |
18428 | ||
18429 | static __attribute__ (( always_inline )) __inline__ uint64_t tswap64(uint64_t s) | |
18430 | { | |
18431 | return s; | |
18432 | } | |
18433 | ||
18434 | static __attribute__ (( always_inline )) __inline__ void tswap16s(uint16_t *s) | |
18435 | { | |
18436 | } | |
18437 | ||
18438 | static __attribute__ (( always_inline )) __inline__ void tswap32s(uint32_t *s) | |
18439 | { | |
18440 | } | |
18441 | ||
18442 | static __attribute__ (( always_inline )) __inline__ void tswap64s(uint64_t *s) | |
18443 | { | |
18444 | } | |
18445 | # 303 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" | |
18446 | extern uintptr_t qemu_real_host_page_size; | |
18447 | extern uintptr_t qemu_host_page_size; | |
18448 | extern uintptr_t qemu_host_page_mask; | |
18449 | # 335 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" | |
18450 | struct CPUX86State *cpu_copy(struct CPUX86State *env); | |
18451 | struct CPUX86State *qemu_get_cpu(int cpu); | |
18452 | ||
18453 | ||
18454 | ||
18455 | void cpu_dump_state(struct CPUX86State *env, FILE *f, fprintf_function cpu_fprintf, | |
18456 | int flags); | |
18457 | void cpu_dump_statistics(struct CPUX86State *env, FILE *f, fprintf_function cpu_fprintf, | |
18458 | int flags); | |
18459 | ||
18460 | void __attribute__ ((__noreturn__)) cpu_abort(struct CPUX86State *env, const char *fmt, ...) | |
18461 | __attribute__((format(gnu_printf, 2, 3))); | |
18462 | extern struct CPUX86State *first_cpu; | |
18463 | extern __thread __typeof__(struct CPUX86State *) tls__cpu_single_env; | |
18464 | # 402 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" | |
18465 | typedef void (*CPUInterruptHandler)(struct CPUX86State *, int); | |
18466 | ||
18467 | extern CPUInterruptHandler cpu_interrupt_handler; | |
18468 | ||
18469 | static __attribute__ (( always_inline )) __inline__ void cpu_interrupt(struct CPUX86State *s, int mask) | |
18470 | { | |
18471 | cpu_interrupt_handler(s, mask); | |
18472 | } | |
18473 | ||
18474 | ||
18475 | ||
18476 | ||
18477 | void cpu_reset_interrupt(struct CPUX86State *env, int mask); | |
18478 | ||
18479 | void cpu_exit(struct CPUX86State *s); | |
18480 | ||
18481 | _Bool qemu_cpu_has_work(struct CPUX86State *env); | |
18482 | # 429 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" | |
18483 | int cpu_breakpoint_insert(struct CPUX86State *env, target_ulong pc, int flags, | |
18484 | CPUBreakpoint **breakpoint); | |
18485 | int cpu_breakpoint_remove(struct CPUX86State *env, target_ulong pc, int flags); | |
18486 | void cpu_breakpoint_remove_by_ref(struct CPUX86State *env, CPUBreakpoint *breakpoint); | |
18487 | void cpu_breakpoint_remove_all(struct CPUX86State *env, int mask); | |
18488 | int cpu_watchpoint_insert(struct CPUX86State *env, target_ulong addr, target_ulong len, | |
18489 | int flags, CPUWatchpoint **watchpoint); | |
18490 | int cpu_watchpoint_remove(struct CPUX86State *env, target_ulong addr, | |
18491 | target_ulong len, int flags); | |
18492 | void cpu_watchpoint_remove_by_ref(struct CPUX86State *env, CPUWatchpoint *watchpoint); | |
18493 | void cpu_watchpoint_remove_all(struct CPUX86State *env, int mask); | |
18494 | ||
18495 | ||
18496 | ||
18497 | ||
18498 | ||
18499 | void cpu_single_step(struct CPUX86State *env, int enabled); | |
18500 | void cpu_state_reset(struct CPUX86State *s); | |
18501 | int cpu_is_stopped(struct CPUX86State *env); | |
18502 | void run_on_cpu(struct CPUX86State *env, void (*func)(void *data), void *data); | |
18503 | # 462 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" | |
18504 | typedef struct CPULogItem { | |
18505 | int mask; | |
18506 | const char *name; | |
18507 | const char *help; | |
18508 | } CPULogItem; | |
18509 | ||
18510 | extern const CPULogItem cpu_log_items[]; | |
18511 | ||
18512 | void cpu_set_log(int log_flags); | |
18513 | void cpu_set_log_filename(const char *filename); | |
18514 | int cpu_str_to_log_mask(const char *str); | |
18515 | ||
18516 | ||
18517 | ||
18518 | ||
18519 | ||
18520 | ||
18521 | target_phys_addr_t cpu_get_phys_page_debug(struct CPUX86State *env, target_ulong addr); | |
18522 | ||
18523 | ||
18524 | ||
18525 | extern int phys_ram_fd; | |
18526 | extern ram_addr_t ram_size; | |
18527 | ||
18528 | ||
18529 | ||
18530 | ||
18531 | typedef struct RAMBlock { | |
18532 | struct MemoryRegion *mr; | |
18533 | uint8_t *host; | |
18534 | ram_addr_t offset; | |
18535 | ram_addr_t length; | |
18536 | uint32_t flags; | |
18537 | char idstr[256]; | |
18538 | struct { struct RAMBlock *le_next; struct RAMBlock **le_prev; } next; | |
18539 | ||
18540 | int fd; | |
18541 | ||
18542 | } RAMBlock; | |
18543 | ||
18544 | typedef struct RAMList { | |
18545 | uint8_t *phys_dirty; | |
18546 | struct { struct RAMBlock *lh_first; } blocks; | |
18547 | } RAMList; | |
18548 | extern RAMList ram_list; | |
18549 | ||
18550 | extern const char *mem_path; | |
18551 | extern int mem_prealloc; | |
18552 | # 521 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" | |
18553 | void dump_exec_info(FILE *f, fprintf_function cpu_fprintf); | |
18554 | ||
18555 | ||
18556 | int cpu_memory_rw_debug(struct CPUX86State *env, target_ulong addr, | |
18557 | uint8_t *buf, int len, int is_write); | |
18558 | # 1025 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 | |
18559 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/svm.h" 1 | |
18560 | # 133 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/svm.h" | |
18561 | struct __attribute__((packed)) vmcb_control_area { | |
18562 | uint16_t intercept_cr_read; | |
18563 | uint16_t intercept_cr_write; | |
18564 | uint16_t intercept_dr_read; | |
18565 | uint16_t intercept_dr_write; | |
18566 | uint32_t intercept_exceptions; | |
18567 | uint64_t intercept; | |
18568 | uint8_t reserved_1[44]; | |
18569 | uint64_t iopm_base_pa; | |
18570 | uint64_t msrpm_base_pa; | |
18571 | uint64_t tsc_offset; | |
18572 | uint32_t asid; | |
18573 | uint8_t tlb_ctl; | |
18574 | uint8_t reserved_2[3]; | |
18575 | uint32_t int_ctl; | |
18576 | uint32_t int_vector; | |
18577 | uint32_t int_state; | |
18578 | uint8_t reserved_3[4]; | |
18579 | uint64_t exit_code; | |
18580 | uint64_t exit_info_1; | |
18581 | uint64_t exit_info_2; | |
18582 | uint32_t exit_int_info; | |
18583 | uint32_t exit_int_info_err; | |
18584 | uint64_t nested_ctl; | |
18585 | uint8_t reserved_4[16]; | |
18586 | uint32_t event_inj; | |
18587 | uint32_t event_inj_err; | |
18588 | uint64_t nested_cr3; | |
18589 | uint64_t lbr_ctl; | |
18590 | uint8_t reserved_5[832]; | |
18591 | }; | |
18592 | ||
18593 | struct __attribute__((packed)) vmcb_seg { | |
18594 | uint16_t selector; | |
18595 | uint16_t attrib; | |
18596 | uint32_t limit; | |
18597 | uint64_t base; | |
18598 | }; | |
18599 | ||
18600 | struct __attribute__((packed)) vmcb_save_area { | |
18601 | struct vmcb_seg es; | |
18602 | struct vmcb_seg cs; | |
18603 | struct vmcb_seg ss; | |
18604 | struct vmcb_seg ds; | |
18605 | struct vmcb_seg fs; | |
18606 | struct vmcb_seg gs; | |
18607 | struct vmcb_seg gdtr; | |
18608 | struct vmcb_seg ldtr; | |
18609 | struct vmcb_seg idtr; | |
18610 | struct vmcb_seg tr; | |
18611 | uint8_t reserved_1[43]; | |
18612 | uint8_t cpl; | |
18613 | uint8_t reserved_2[4]; | |
18614 | uint64_t efer; | |
18615 | uint8_t reserved_3[112]; | |
18616 | uint64_t cr4; | |
18617 | uint64_t cr3; | |
18618 | uint64_t cr0; | |
18619 | uint64_t dr7; | |
18620 | uint64_t dr6; | |
18621 | uint64_t rflags; | |
18622 | uint64_t rip; | |
18623 | uint8_t reserved_4[88]; | |
18624 | uint64_t rsp; | |
18625 | uint8_t reserved_5[24]; | |
18626 | uint64_t rax; | |
18627 | uint64_t star; | |
18628 | uint64_t lstar; | |
18629 | uint64_t cstar; | |
18630 | uint64_t sfmask; | |
18631 | uint64_t kernel_gs_base; | |
18632 | uint64_t sysenter_cs; | |
18633 | uint64_t sysenter_esp; | |
18634 | uint64_t sysenter_eip; | |
18635 | uint64_t cr2; | |
18636 | uint8_t reserved_6[32]; | |
18637 | uint64_t g_pat; | |
18638 | uint64_t dbgctl; | |
18639 | uint64_t br_from; | |
18640 | uint64_t br_to; | |
18641 | uint64_t last_excp_from; | |
18642 | uint64_t last_excp_to; | |
18643 | }; | |
18644 | ||
18645 | struct __attribute__((packed)) vmcb { | |
18646 | struct vmcb_control_area control; | |
18647 | struct vmcb_save_area save; | |
18648 | }; | |
18649 | # 1026 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 | |
18650 | ||
18651 | ||
18652 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/hw/apic.h" 1 | |
18653 | ||
18654 | ||
18655 | ||
18656 | ||
18657 | ||
18658 | ||
18659 | void apic_deliver_irq(uint8_t dest, uint8_t dest_mode, uint8_t delivery_mode, | |
18660 | uint8_t vector_num, uint8_t trigger_mode); | |
18661 | int apic_accept_pic_intr(DeviceState *s); | |
18662 | void apic_deliver_pic_intr(DeviceState *s, int level); | |
18663 | void apic_deliver_nmi(DeviceState *d); | |
18664 | int apic_get_interrupt(DeviceState *s); | |
18665 | void apic_reset_irq_delivered(void); | |
18666 | int apic_get_irq_delivered(void); | |
18667 | void cpu_set_apic_base(DeviceState *s, uint64_t val); | |
18668 | uint64_t cpu_get_apic_base(DeviceState *s); | |
18669 | void cpu_set_apic_tpr(DeviceState *s, uint8_t val); | |
18670 | uint8_t cpu_get_apic_tpr(DeviceState *s); | |
18671 | void apic_init_reset(DeviceState *s); | |
18672 | void apic_sipi(DeviceState *s); | |
18673 | void apic_handle_tpr_access_report(DeviceState *d, target_ulong ip, | |
18674 | TPRAccess access); | |
18675 | ||
18676 | ||
18677 | int cpu_is_bsp(CPUX86State *env); | |
18678 | DeviceState *cpu_get_current_apic(void); | |
18679 | # 1029 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 | |
18680 | ||
18681 | ||
18682 | static __attribute__ (( always_inline )) __inline__ _Bool cpu_has_work(CPUX86State *env) | |
18683 | { | |
18684 | return ((env->interrupt_request & 0x0002) && | |
18685 | (env->eflags & 0x00000200)) || | |
18686 | (env->interrupt_request & (0x0200 | | |
18687 | 0x0400 | | |
18688 | 0x0800 | | |
18689 | 0x1000)); | |
18690 | } | |
18691 | ||
18692 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 1 | |
18693 | # 34 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" | |
18694 | typedef ram_addr_t tb_page_addr_t; | |
18695 | # 43 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" | |
18696 | struct TranslationBlock; | |
18697 | typedef struct TranslationBlock TranslationBlock; | |
18698 | # 73 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" | |
18699 | extern target_ulong gen_opc_pc[640]; | |
18700 | extern uint8_t gen_opc_instr_start[640]; | |
18701 | extern uint16_t gen_opc_icount[640]; | |
18702 | ||
18703 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-log.h" 1 | |
18704 | ||
18705 | ||
18706 | ||
18707 | ||
18708 | extern FILE *logfile; | |
18709 | extern int loglevel; | |
18710 | # 78 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 | |
18711 | ||
18712 | void gen_intermediate_code(struct CPUX86State *env, struct TranslationBlock *tb); | |
18713 | void gen_intermediate_code_pc(struct CPUX86State *env, struct TranslationBlock *tb); | |
18714 | void restore_state_to_opc(struct CPUX86State *env, struct TranslationBlock *tb, | |
18715 | int pc_pos); | |
18716 | ||
18717 | void cpu_gen_init(void); | |
18718 | int cpu_x86_gen_code(struct CPUX86State *env, struct TranslationBlock *tb, | |
18719 | int *gen_code_size_ptr); | |
18720 | int cpu_restore_state(struct TranslationBlock *tb, | |
18721 | struct CPUX86State *env, uintptr_t searched_pc); | |
18722 | void __attribute__ ((__noreturn__)) cpu_resume_from_signal(struct CPUX86State *env1, void *puc); | |
18723 | void __attribute__ ((__noreturn__)) cpu_io_recompile(struct CPUX86State *env, uintptr_t retaddr); | |
18724 | TranslationBlock *tb_gen_code(struct CPUX86State *env, | |
18725 | target_ulong pc, target_ulong cs_base, int flags, | |
18726 | int cflags); | |
18727 | void cpu_exec_init(struct CPUX86State *env); | |
18728 | void __attribute__ ((__noreturn__)) cpu_loop_exit(struct CPUX86State *env1); | |
18729 | int page_unprotect(target_ulong address, uintptr_t pc, void *puc); | |
18730 | void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, | |
18731 | int is_cpu_write_access); | |
18732 | void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end, | |
18733 | int is_cpu_write_access); | |
18734 | ||
18735 | ||
18736 | void tlb_flush_page(struct CPUX86State *env, target_ulong addr); | |
18737 | void tlb_flush(struct CPUX86State *env, int flush_global); | |
18738 | void tlb_set_page(struct CPUX86State *env, target_ulong vaddr, | |
18739 | target_phys_addr_t paddr, int prot, | |
18740 | int mmu_idx, target_ulong size); | |
18741 | void tb_invalidate_phys_addr(target_phys_addr_t addr); | |
18742 | # 141 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" | |
18743 | struct TranslationBlock { | |
18744 | target_ulong pc; | |
18745 | target_ulong cs_base; | |
18746 | uint64_t flags; | |
18747 | uint16_t size; | |
18748 | ||
18749 | uint16_t cflags; | |
18750 | ||
18751 | ||
18752 | ||
18753 | uint8_t *tc_ptr; | |
18754 | ||
18755 | struct TranslationBlock *phys_hash_next; | |
18756 | ||
18757 | ||
18758 | struct TranslationBlock *page_next[2]; | |
18759 | tb_page_addr_t page_addr[2]; | |
18760 | ||
18761 | ||
18762 | ||
18763 | uint16_t tb_next_offset[2]; | |
18764 | ||
18765 | uint16_t tb_jmp_offset[2]; | |
18766 | ||
18767 | ||
18768 | ||
18769 | ||
18770 | ||
18771 | ||
18772 | ||
18773 | struct TranslationBlock *jmp_next[2]; | |
18774 | struct TranslationBlock *jmp_first; | |
18775 | uint32_t icount; | |
18776 | }; | |
18777 | ||
18778 | static __attribute__ (( always_inline )) __inline__ unsigned int tb_jmp_cache_hash_page(target_ulong pc) | |
18779 | { | |
18780 | target_ulong tmp; | |
18781 | tmp = pc ^ (pc >> (12 - (12 / 2))); | |
18782 | return (tmp >> (12 - (12 / 2))) & ((1 << 12) - (1 << (12 / 2))); | |
18783 | } | |
18784 | ||
18785 | static __attribute__ (( always_inline )) __inline__ unsigned int tb_jmp_cache_hash_func(target_ulong pc) | |
18786 | { | |
18787 | target_ulong tmp; | |
18788 | tmp = pc ^ (pc >> (12 - (12 / 2))); | |
18789 | return (((tmp >> (12 - (12 / 2))) & ((1 << 12) - (1 << (12 / 2)))) | |
18790 | | (tmp & ((1 << (12 / 2)) - 1))); | |
18791 | } | |
18792 | ||
18793 | static __attribute__ (( always_inline )) __inline__ unsigned int tb_phys_hash_func(tb_page_addr_t pc) | |
18794 | { | |
18795 | return (pc >> 2) & ((1 << 15) - 1); | |
18796 | } | |
18797 | ||
18798 | void tb_free(TranslationBlock *tb); | |
18799 | void tb_flush(struct CPUX86State *env); | |
18800 | void tb_link_page(TranslationBlock *tb, | |
18801 | tb_page_addr_t phys_pc, tb_page_addr_t phys_page2); | |
18802 | void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr); | |
18803 | ||
18804 | extern TranslationBlock *tb_phys_hash[(1 << 15)]; | |
18805 | # 217 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" | |
18806 | static __attribute__ (( always_inline )) __inline__ void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr) | |
18807 | { | |
18808 | ||
18809 | *(uint32_t *)jmp_addr = addr - (jmp_addr + 4); | |
18810 | ||
18811 | } | |
18812 | # 251 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" | |
18813 | static __attribute__ (( always_inline )) __inline__ void tb_set_jmp_target(TranslationBlock *tb, | |
18814 | int n, uintptr_t addr) | |
18815 | { | |
18816 | uint16_t offset = tb->tb_jmp_offset[n]; | |
18817 | tb_set_jmp_target1((uintptr_t)(tb->tc_ptr + offset), addr); | |
18818 | } | |
18819 | # 269 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" | |
18820 | static __attribute__ (( always_inline )) __inline__ void tb_add_jump(TranslationBlock *tb, int n, | |
18821 | TranslationBlock *tb_next) | |
18822 | { | |
18823 | ||
18824 | if (!tb->jmp_next[n]) { | |
18825 | ||
18826 | tb_set_jmp_target(tb, n, (uintptr_t)tb_next->tc_ptr); | |
18827 | ||
18828 | ||
18829 | tb->jmp_next[n] = tb_next->jmp_first; | |
18830 | tb_next->jmp_first = (TranslationBlock *)((uintptr_t)(tb) | (n)); | |
18831 | } | |
18832 | } | |
18833 | ||
18834 | TranslationBlock *tb_find_pc(uintptr_t pc_ptr); | |
18835 | ||
18836 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-lock.h" 1 | |
18837 | # 38 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-lock.h" | |
18838 | typedef int spinlock_t; | |
18839 | ||
18840 | ||
18841 | static __attribute__ (( always_inline )) __inline__ void spin_lock(spinlock_t *lock) | |
18842 | { | |
18843 | } | |
18844 | ||
18845 | static __attribute__ (( always_inline )) __inline__ void spin_unlock(spinlock_t *lock) | |
18846 | { | |
18847 | } | |
18848 | # 286 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 | |
18849 | ||
18850 | extern spinlock_t tb_lock; | |
18851 | ||
18852 | extern int tb_invalidated_flag; | |
18853 | # 313 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" | |
18854 | struct MemoryRegion *iotlb_to_region(target_phys_addr_t index); | |
18855 | uint64_t io_mem_read(struct MemoryRegion *mr, target_phys_addr_t addr, | |
18856 | unsigned size); | |
18857 | void io_mem_write(struct MemoryRegion *mr, target_phys_addr_t addr, | |
18858 | uint64_t value, unsigned size); | |
18859 | ||
18860 | void tlb_fill(struct CPUX86State *env1, target_ulong addr, int is_write, int mmu_idx, | |
18861 | uintptr_t retaddr); | |
18862 | ||
18863 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_defs.h" 1 | |
18864 | # 13 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_defs.h" | |
18865 | uint8_t __ldb_mmu(target_ulong addr, int mmu_idx); | |
18866 | void __stb_mmu(target_ulong addr, uint8_t val, int mmu_idx); | |
18867 | uint16_t __ldw_mmu(target_ulong addr, int mmu_idx); | |
18868 | void __stw_mmu(target_ulong addr, uint16_t val, int mmu_idx); | |
18869 | uint32_t __ldl_mmu(target_ulong addr, int mmu_idx); | |
18870 | void __stl_mmu(target_ulong addr, uint32_t val, int mmu_idx); | |
18871 | uint64_t __ldq_mmu(target_ulong addr, int mmu_idx); | |
18872 | void __stq_mmu(target_ulong addr, uint64_t val, int mmu_idx); | |
18873 | ||
18874 | uint8_t __ldb_cmmu(target_ulong addr, int mmu_idx); | |
18875 | void __stb_cmmu(target_ulong addr, uint8_t val, int mmu_idx); | |
18876 | uint16_t __ldw_cmmu(target_ulong addr, int mmu_idx); | |
18877 | void __stw_cmmu(target_ulong addr, uint16_t val, int mmu_idx); | |
18878 | uint32_t __ldl_cmmu(target_ulong addr, int mmu_idx); | |
18879 | void __stl_cmmu(target_ulong addr, uint32_t val, int mmu_idx); | |
18880 | uint64_t __ldq_cmmu(target_ulong addr, int mmu_idx); | |
18881 | void __stq_cmmu(target_ulong addr, uint64_t val, int mmu_idx); | |
18882 | # 323 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 | |
18883 | # 331 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" | |
18884 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
18885 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
18886 | static __attribute__ (( always_inline )) __inline__ uint32_t | |
18887 | ldub_code( | |
18888 | target_ulong ptr) | |
18889 | { | |
18890 | int page_index; | |
18891 | uint32_t res; | |
18892 | target_ulong addr; | |
18893 | int mmu_idx; | |
18894 | ||
18895 | addr = ptr; | |
18896 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
18897 | mmu_idx = (cpu_mmu_index(tls__cpu_single_env)); | |
18898 | if (__builtin_expect(!!(tls__cpu_single_env->tlb_table[mmu_idx][page_index].addr_code != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) | |
18899 | ) { | |
18900 | res = __ldb_cmmu( | |
18901 | addr, | |
18902 | mmu_idx); | |
18903 | } else { | |
18904 | uintptr_t hostaddr = addr + tls__cpu_single_env->tlb_table[mmu_idx][page_index].addend; | |
18905 | res = ldub_p((uint8_t *)(intptr_t)((hostaddr))); | |
18906 | } | |
18907 | return res; | |
18908 | } | |
18909 | ||
18910 | ||
18911 | static __attribute__ (( always_inline )) __inline__ int | |
18912 | ldsb_code( | |
18913 | target_ulong ptr) | |
18914 | { | |
18915 | int res, page_index; | |
18916 | target_ulong addr; | |
18917 | int mmu_idx; | |
18918 | ||
18919 | addr = ptr; | |
18920 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
18921 | mmu_idx = (cpu_mmu_index(tls__cpu_single_env)); | |
18922 | if (__builtin_expect(!!(tls__cpu_single_env->tlb_table[mmu_idx][page_index].addr_code != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) | |
18923 | ) { | |
18924 | res = (int8_t) | |
18925 | __ldb_cmmu( addr, mmu_idx); | |
18926 | } else { | |
18927 | uintptr_t hostaddr = addr + tls__cpu_single_env->tlb_table[mmu_idx][page_index].addend; | |
18928 | res = ldsb_p((uint8_t *)(intptr_t)((hostaddr))); | |
18929 | } | |
18930 | return res; | |
18931 | } | |
18932 | # 332 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 | |
18933 | ||
18934 | ||
18935 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
18936 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
18937 | static __attribute__ (( always_inline )) __inline__ uint32_t | |
18938 | lduw_code( | |
18939 | target_ulong ptr) | |
18940 | { | |
18941 | int page_index; | |
18942 | uint32_t res; | |
18943 | target_ulong addr; | |
18944 | int mmu_idx; | |
18945 | ||
18946 | addr = ptr; | |
18947 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
18948 | mmu_idx = (cpu_mmu_index(tls__cpu_single_env)); | |
18949 | if (__builtin_expect(!!(tls__cpu_single_env->tlb_table[mmu_idx][page_index].addr_code != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) | |
18950 | ) { | |
18951 | res = __ldw_cmmu( | |
18952 | addr, | |
18953 | mmu_idx); | |
18954 | } else { | |
18955 | uintptr_t hostaddr = addr + tls__cpu_single_env->tlb_table[mmu_idx][page_index].addend; | |
18956 | res = lduw_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
18957 | } | |
18958 | return res; | |
18959 | } | |
18960 | ||
18961 | ||
18962 | static __attribute__ (( always_inline )) __inline__ int | |
18963 | ldsw_code( | |
18964 | target_ulong ptr) | |
18965 | { | |
18966 | int res, page_index; | |
18967 | target_ulong addr; | |
18968 | int mmu_idx; | |
18969 | ||
18970 | addr = ptr; | |
18971 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
18972 | mmu_idx = (cpu_mmu_index(tls__cpu_single_env)); | |
18973 | if (__builtin_expect(!!(tls__cpu_single_env->tlb_table[mmu_idx][page_index].addr_code != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) | |
18974 | ) { | |
18975 | res = (int16_t) | |
18976 | __ldw_cmmu( addr, mmu_idx); | |
18977 | } else { | |
18978 | uintptr_t hostaddr = addr + tls__cpu_single_env->tlb_table[mmu_idx][page_index].addend; | |
18979 | res = ldsw_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
18980 | } | |
18981 | return res; | |
18982 | } | |
18983 | # 335 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 | |
18984 | ||
18985 | ||
18986 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
18987 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
18988 | static __attribute__ (( always_inline )) __inline__ uint32_t | |
18989 | ldl_code( | |
18990 | target_ulong ptr) | |
18991 | { | |
18992 | int page_index; | |
18993 | uint32_t res; | |
18994 | target_ulong addr; | |
18995 | int mmu_idx; | |
18996 | ||
18997 | addr = ptr; | |
18998 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
18999 | mmu_idx = (cpu_mmu_index(tls__cpu_single_env)); | |
19000 | if (__builtin_expect(!!(tls__cpu_single_env->tlb_table[mmu_idx][page_index].addr_code != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) | |
19001 | ) { | |
19002 | res = __ldl_cmmu( | |
19003 | addr, | |
19004 | mmu_idx); | |
19005 | } else { | |
19006 | uintptr_t hostaddr = addr + tls__cpu_single_env->tlb_table[mmu_idx][page_index].addend; | |
19007 | res = ldl_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
19008 | } | |
19009 | return res; | |
19010 | } | |
19011 | # 338 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 | |
19012 | ||
19013 | ||
19014 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
19015 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
19016 | static __attribute__ (( always_inline )) __inline__ uint64_t | |
19017 | ldq_code( | |
19018 | target_ulong ptr) | |
19019 | { | |
19020 | int page_index; | |
19021 | uint64_t res; | |
19022 | target_ulong addr; | |
19023 | int mmu_idx; | |
19024 | ||
19025 | addr = ptr; | |
19026 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
19027 | mmu_idx = (cpu_mmu_index(tls__cpu_single_env)); | |
19028 | if (__builtin_expect(!!(tls__cpu_single_env->tlb_table[mmu_idx][page_index].addr_code != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) | |
19029 | ) { | |
19030 | res = __ldq_cmmu( | |
19031 | addr, | |
19032 | mmu_idx); | |
19033 | } else { | |
19034 | uintptr_t hostaddr = addr + tls__cpu_single_env->tlb_table[mmu_idx][page_index].addend; | |
19035 | res = ldq_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
19036 | } | |
19037 | return res; | |
19038 | } | |
19039 | # 341 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 | |
19040 | # 355 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" | |
19041 | tb_page_addr_t get_page_addr_code(struct CPUX86State *env1, target_ulong addr); | |
19042 | ||
19043 | ||
19044 | typedef void (CPUDebugExcpHandler)(struct CPUX86State *env); | |
19045 | ||
19046 | CPUDebugExcpHandler *cpu_set_debug_excp_handler(CPUDebugExcpHandler *handler); | |
19047 | ||
19048 | ||
19049 | extern int singlestep; | |
19050 | ||
19051 | ||
19052 | extern volatile sig_atomic_t exit_request; | |
19053 | ||
19054 | ||
19055 | ||
19056 | static __attribute__ (( always_inline )) __inline__ int can_do_io(struct CPUX86State *env) | |
19057 | { | |
19058 | if (!use_icount) { | |
19059 | return 1; | |
19060 | } | |
19061 | ||
19062 | if (!env->current_tb) { | |
19063 | return 1; | |
19064 | } | |
19065 | return env->can_do_io != 0; | |
19066 | } | |
19067 | # 1042 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 | |
19068 | ||
19069 | static __attribute__ (( always_inline )) __inline__ void cpu_pc_from_tb(CPUX86State *env, TranslationBlock *tb) | |
19070 | { | |
19071 | env->eip = tb->pc - tb->cs_base; | |
19072 | } | |
19073 | ||
19074 | static __attribute__ (( always_inline )) __inline__ void cpu_get_tb_cpu_state(CPUX86State *env, target_ulong *pc, | |
19075 | target_ulong *cs_base, int *flags) | |
19076 | { | |
19077 | *cs_base = env->segs[1].base; | |
19078 | *pc = *cs_base + env->eip; | |
19079 | *flags = env->hflags | | |
19080 | (env->eflags & (0x00003000 | 0x00000100 | 0x00010000 | 0x00020000)); | |
19081 | } | |
19082 | ||
19083 | void do_cpu_init(CPUX86State *env); | |
19084 | void do_cpu_sipi(CPUX86State *env); | |
19085 | ||
19086 | ||
19087 | ||
19088 | ||
19089 | void cpu_x86_inject_mce(Monitor *mon, CPUX86State *cenv, int bank, | |
19090 | uint64_t status, uint64_t mcg_status, uint64_t addr, | |
19091 | uint64_t misc, int flags); | |
19092 | ||
19093 | ||
19094 | void do_interrupt(CPUX86State *env); | |
19095 | void do_interrupt_x86_hardirq(CPUX86State *env, int intno, int is_hw); | |
19096 | void __attribute__ ((__noreturn__)) raise_exception_env(int exception_index, CPUX86State *nenv); | |
19097 | void __attribute__ ((__noreturn__)) raise_exception_err_env(CPUX86State *nenv, int exception_index, | |
19098 | int error_code); | |
19099 | ||
19100 | void do_smm_enter(CPUX86State *env1); | |
19101 | ||
19102 | void svm_check_intercept(CPUX86State *env1, uint32_t type); | |
19103 | ||
19104 | uint32_t cpu_cc_compute_all(CPUX86State *env1, int op); | |
19105 | ||
19106 | void cpu_report_tpr_access(CPUX86State *env, TPRAccess access); | |
19107 | # 22 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
19108 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/dyngen-exec.h" 1 | |
19109 | # 64 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/dyngen-exec.h" | |
19110 | register struct CPUX86State *env asm("ebp"); | |
19111 | # 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
19112 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" 1 | |
19113 | # 46 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" | |
19114 | void muls64(uint64_t *phigh, uint64_t *plow, int64_t a, int64_t b); | |
19115 | void mulu64(uint64_t *phigh, uint64_t *plow, uint64_t a, uint64_t b); | |
19116 | ||
19117 | ||
19118 | ||
19119 | ||
19120 | static __attribute__ (( always_inline )) __inline__ int clz32(uint32_t val) | |
19121 | { | |
19122 | ||
19123 | if (val) | |
19124 | return __builtin_clz(val); | |
19125 | else | |
19126 | return 32; | |
19127 | # 87 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" | |
19128 | } | |
19129 | ||
19130 | static __attribute__ (( always_inline )) __inline__ int clo32(uint32_t val) | |
19131 | { | |
19132 | return clz32(~val); | |
19133 | } | |
19134 | ||
19135 | static __attribute__ (( always_inline )) __inline__ int clz64(uint64_t val) | |
19136 | { | |
19137 | ||
19138 | if (val) | |
19139 | return __builtin_clzll(val); | |
19140 | else | |
19141 | return 64; | |
19142 | # 112 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" | |
19143 | } | |
19144 | ||
19145 | static __attribute__ (( always_inline )) __inline__ int clo64(uint64_t val) | |
19146 | { | |
19147 | return clz64(~val); | |
19148 | } | |
19149 | ||
19150 | static __attribute__ (( always_inline )) __inline__ int ctz32(uint32_t val) | |
19151 | { | |
19152 | ||
19153 | if (val) | |
19154 | return __builtin_ctz(val); | |
19155 | else | |
19156 | return 32; | |
19157 | # 156 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" | |
19158 | } | |
19159 | ||
19160 | static __attribute__ (( always_inline )) __inline__ int cto32(uint32_t val) | |
19161 | { | |
19162 | return ctz32(~val); | |
19163 | } | |
19164 | ||
19165 | static __attribute__ (( always_inline )) __inline__ int ctz64(uint64_t val) | |
19166 | { | |
19167 | ||
19168 | if (val) | |
19169 | return __builtin_ctzll(val); | |
19170 | else | |
19171 | return 64; | |
19172 | # 181 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" | |
19173 | } | |
19174 | ||
19175 | static __attribute__ (( always_inline )) __inline__ int cto64(uint64_t val) | |
19176 | { | |
19177 | return ctz64(~val); | |
19178 | } | |
19179 | ||
19180 | static __attribute__ (( always_inline )) __inline__ int ctpop8(uint8_t val) | |
19181 | { | |
19182 | val = (val & 0x55) + ((val >> 1) & 0x55); | |
19183 | val = (val & 0x33) + ((val >> 2) & 0x33); | |
19184 | val = (val & 0x0f) + ((val >> 4) & 0x0f); | |
19185 | ||
19186 | return val; | |
19187 | } | |
19188 | ||
19189 | static __attribute__ (( always_inline )) __inline__ int ctpop16(uint16_t val) | |
19190 | { | |
19191 | val = (val & 0x5555) + ((val >> 1) & 0x5555); | |
19192 | val = (val & 0x3333) + ((val >> 2) & 0x3333); | |
19193 | val = (val & 0x0f0f) + ((val >> 4) & 0x0f0f); | |
19194 | val = (val & 0x00ff) + ((val >> 8) & 0x00ff); | |
19195 | ||
19196 | return val; | |
19197 | } | |
19198 | ||
19199 | static __attribute__ (( always_inline )) __inline__ int ctpop32(uint32_t val) | |
19200 | { | |
19201 | ||
19202 | return __builtin_popcount(val); | |
19203 | # 220 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" | |
19204 | } | |
19205 | ||
19206 | static __attribute__ (( always_inline )) __inline__ int ctpop64(uint64_t val) | |
19207 | { | |
19208 | ||
19209 | return __builtin_popcountll(val); | |
19210 | # 236 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" | |
19211 | } | |
19212 | # 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
19213 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/ioport.h" 1 | |
19214 | # 28 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/ioport.h" | |
19215 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/iorange.h" 1 | |
19216 | ||
19217 | ||
19218 | ||
19219 | ||
19220 | ||
19221 | typedef struct IORange IORange; | |
19222 | typedef struct IORangeOps IORangeOps; | |
19223 | ||
19224 | struct IORangeOps { | |
19225 | void (*read)(IORange *iorange, uint64_t offset, unsigned width, | |
19226 | uint64_t *data); | |
19227 | void (*write)(IORange *iorange, uint64_t offset, unsigned width, | |
19228 | uint64_t data); | |
19229 | void (*destructor)(IORange *iorange); | |
19230 | }; | |
19231 | ||
19232 | struct IORange { | |
19233 | const IORangeOps *ops; | |
19234 | uint64_t base; | |
19235 | uint64_t len; | |
19236 | }; | |
19237 | ||
19238 | static __attribute__ (( always_inline )) __inline__ void iorange_init(IORange *iorange, const IORangeOps *ops, | |
19239 | uint64_t base, uint64_t len) | |
19240 | { | |
19241 | iorange->ops = ops; | |
19242 | iorange->base = base; | |
19243 | iorange->len = len; | |
19244 | } | |
19245 | # 29 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/ioport.h" 2 | |
19246 | ||
19247 | typedef uint32_t pio_addr_t; | |
19248 | ||
19249 | ||
19250 | ||
19251 | ||
19252 | ||
19253 | ||
19254 | typedef void (IOPortWriteFunc)(void *opaque, uint32_t address, uint32_t data); | |
19255 | typedef uint32_t (IOPortReadFunc)(void *opaque, uint32_t address); | |
19256 | typedef void (IOPortDestructor)(void *opaque); | |
19257 | ||
19258 | void ioport_register(IORange *iorange); | |
19259 | int register_ioport_read(pio_addr_t start, int length, int size, | |
19260 | IOPortReadFunc *func, void *opaque); | |
19261 | int register_ioport_write(pio_addr_t start, int length, int size, | |
19262 | IOPortWriteFunc *func, void *opaque); | |
19263 | void isa_unassign_ioport(pio_addr_t start, int length); | |
19264 | _Bool isa_is_ioport_assigned(pio_addr_t start); | |
19265 | ||
19266 | void cpu_outb(pio_addr_t addr, uint8_t val); | |
19267 | void cpu_outw(pio_addr_t addr, uint16_t val); | |
19268 | void cpu_outl(pio_addr_t addr, uint32_t val); | |
19269 | uint8_t cpu_inb(pio_addr_t addr); | |
19270 | uint16_t cpu_inw(pio_addr_t addr); | |
19271 | uint32_t cpu_inl(pio_addr_t addr); | |
19272 | ||
19273 | struct MemoryRegion; | |
19274 | struct MemoryRegionPortio; | |
19275 | ||
19276 | typedef struct PortioList { | |
19277 | const struct MemoryRegionPortio *ports; | |
19278 | struct MemoryRegion *address_space; | |
19279 | unsigned nr; | |
19280 | struct MemoryRegion **regions; | |
19281 | struct MemoryRegion **aliases; | |
19282 | void *opaque; | |
19283 | const char *name; | |
19284 | } PortioList; | |
19285 | ||
19286 | void portio_list_init(PortioList *piolist, | |
19287 | const struct MemoryRegionPortio *callbacks, | |
19288 | void *opaque, const char *name); | |
19289 | void portio_list_destroy(PortioList *piolist); | |
19290 | void portio_list_add(PortioList *piolist, | |
19291 | struct MemoryRegion *address_space, | |
19292 | uint32_t addr); | |
19293 | void portio_list_del(PortioList *piolist); | |
19294 | # 25 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
19295 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-log.h" 1 | |
19296 | # 26 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
19297 | ||
19298 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper.h" 1 | |
19299 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/def-helper.h" 1 | |
19300 | # 2 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper.h" 2 | |
19301 | ||
19302 | uint32_t helper_cc_compute_all (int); | |
19303 | uint32_t helper_cc_compute_c (int); | |
19304 | ||
19305 | void helper_lock (void); | |
19306 | void helper_unlock (void); | |
19307 | void helper_write_eflags (target_ulong, uint32_t); | |
19308 | target_ulong helper_read_eflags (void); | |
19309 | void helper_divb_AL (target_ulong); | |
19310 | void helper_idivb_AL (target_ulong); | |
19311 | void helper_divw_AX (target_ulong); | |
19312 | void helper_idivw_AX (target_ulong); | |
19313 | void helper_divl_EAX (target_ulong); | |
19314 | void helper_idivl_EAX (target_ulong); | |
19315 | # 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper.h" | |
19316 | void helper_aam (int); | |
19317 | void helper_aad (int); | |
19318 | void helper_aaa (void); | |
19319 | void helper_aas (void); | |
19320 | void helper_daa (void); | |
19321 | void helper_das (void); | |
19322 | ||
19323 | target_ulong helper_lsl (target_ulong); | |
19324 | target_ulong helper_lar (target_ulong); | |
19325 | void helper_verr (target_ulong); | |
19326 | void helper_verw (target_ulong); | |
19327 | void helper_lldt (int); | |
19328 | void helper_ltr (int); | |
19329 | void helper_load_seg (int, int); | |
19330 | void helper_ljmp_protected (int, target_ulong, int); | |
19331 | void helper_lcall_real (int, target_ulong, int, int); | |
19332 | void helper_lcall_protected (int, target_ulong, int, int); | |
19333 | void helper_iret_real (int); | |
19334 | void helper_iret_protected (int, int); | |
19335 | void helper_lret_protected (int, int); | |
19336 | target_ulong helper_read_crN (int); | |
19337 | void helper_write_crN (int, target_ulong); | |
19338 | void helper_lmsw (target_ulong); | |
19339 | void helper_clts (void); | |
19340 | void helper_movl_drN_T0 (int, target_ulong); | |
19341 | void helper_invlpg (target_ulong); | |
19342 | ||
19343 | void helper_enter_level (int, int, target_ulong); | |
19344 | ||
19345 | ||
19346 | ||
19347 | void helper_sysenter (void); | |
19348 | void helper_sysexit (int); | |
19349 | ||
19350 | ||
19351 | ||
19352 | ||
19353 | void helper_hlt (int); | |
19354 | void helper_monitor (target_ulong); | |
19355 | void helper_mwait (int); | |
19356 | void helper_debug (void); | |
19357 | void helper_reset_rf (void); | |
19358 | void helper_raise_interrupt (int, int); | |
19359 | void helper_raise_exception (int); | |
19360 | void helper_cli (void); | |
19361 | void helper_sti (void); | |
19362 | void helper_set_inhibit_irq (void); | |
19363 | void helper_reset_inhibit_irq (void); | |
19364 | void helper_boundw (target_ulong, int); | |
19365 | void helper_boundl (target_ulong, int); | |
19366 | void helper_rsm (void); | |
19367 | void helper_into (int); | |
19368 | void helper_cmpxchg8b (target_ulong); | |
19369 | ||
19370 | ||
19371 | ||
19372 | void helper_single_step (void); | |
19373 | void helper_cpuid (void); | |
19374 | void helper_rdtsc (void); | |
19375 | void helper_rdtscp (void); | |
19376 | void helper_rdpmc (void); | |
19377 | void helper_rdmsr (void); | |
19378 | void helper_wrmsr (void); | |
19379 | ||
19380 | void helper_check_iob (uint32_t); | |
19381 | void helper_check_iow (uint32_t); | |
19382 | void helper_check_iol (uint32_t); | |
19383 | void helper_outb (uint32_t, uint32_t); | |
19384 | target_ulong helper_inb (uint32_t); | |
19385 | void helper_outw (uint32_t, uint32_t); | |
19386 | target_ulong helper_inw (uint32_t); | |
19387 | void helper_outl (uint32_t, uint32_t); | |
19388 | target_ulong helper_inl (uint32_t); | |
19389 | ||
19390 | void helper_svm_check_intercept_param (uint32_t, uint64_t); | |
19391 | void helper_vmexit (uint32_t, uint64_t); | |
19392 | void helper_svm_check_io (uint32_t, uint32_t, uint32_t); | |
19393 | void helper_vmrun (int, int); | |
19394 | void helper_vmmcall (void); | |
19395 | void helper_vmload (int); | |
19396 | void helper_vmsave (int); | |
19397 | void helper_stgi (void); | |
19398 | void helper_clgi (void); | |
19399 | void helper_skinit (void); | |
19400 | void helper_invlpga (int); | |
19401 | ||
19402 | ||
19403 | ||
19404 | void helper_flds_FT0 (uint32_t); | |
19405 | void helper_fldl_FT0 (uint64_t); | |
19406 | void helper_fildl_FT0 (int32_t); | |
19407 | void helper_flds_ST0 (uint32_t); | |
19408 | void helper_fldl_ST0 (uint64_t); | |
19409 | void helper_fildl_ST0 (int32_t); | |
19410 | void helper_fildll_ST0 (int64_t); | |
19411 | uint32_t helper_fsts_ST0 (void); | |
19412 | uint64_t helper_fstl_ST0 (void); | |
19413 | int32_t helper_fist_ST0 (void); | |
19414 | int32_t helper_fistl_ST0 (void); | |
19415 | int64_t helper_fistll_ST0 (void); | |
19416 | int32_t helper_fistt_ST0 (void); | |
19417 | int32_t helper_fisttl_ST0 (void); | |
19418 | int64_t helper_fisttll_ST0 (void); | |
19419 | void helper_fldt_ST0 (target_ulong); | |
19420 | void helper_fstt_ST0 (target_ulong); | |
19421 | void helper_fpush (void); | |
19422 | void helper_fpop (void); | |
19423 | void helper_fdecstp (void); | |
19424 | void helper_fincstp (void); | |
19425 | void helper_ffree_STN (int); | |
19426 | void helper_fmov_ST0_FT0 (void); | |
19427 | void helper_fmov_FT0_STN (int); | |
19428 | void helper_fmov_ST0_STN (int); | |
19429 | void helper_fmov_STN_ST0 (int); | |
19430 | void helper_fxchg_ST0_STN (int); | |
19431 | void helper_fcom_ST0_FT0 (void); | |
19432 | void helper_fucom_ST0_FT0 (void); | |
19433 | void helper_fcomi_ST0_FT0 (void); | |
19434 | void helper_fucomi_ST0_FT0 (void); | |
19435 | void helper_fadd_ST0_FT0 (void); | |
19436 | void helper_fmul_ST0_FT0 (void); | |
19437 | void helper_fsub_ST0_FT0 (void); | |
19438 | void helper_fsubr_ST0_FT0 (void); | |
19439 | void helper_fdiv_ST0_FT0 (void); | |
19440 | void helper_fdivr_ST0_FT0 (void); | |
19441 | void helper_fadd_STN_ST0 (int); | |
19442 | void helper_fmul_STN_ST0 (int); | |
19443 | void helper_fsub_STN_ST0 (int); | |
19444 | void helper_fsubr_STN_ST0 (int); | |
19445 | void helper_fdiv_STN_ST0 (int); | |
19446 | void helper_fdivr_STN_ST0 (int); | |
19447 | void helper_fchs_ST0 (void); | |
19448 | void helper_fabs_ST0 (void); | |
19449 | void helper_fxam_ST0 (void); | |
19450 | void helper_fld1_ST0 (void); | |
19451 | void helper_fldl2t_ST0 (void); | |
19452 | void helper_fldl2e_ST0 (void); | |
19453 | void helper_fldpi_ST0 (void); | |
19454 | void helper_fldlg2_ST0 (void); | |
19455 | void helper_fldln2_ST0 (void); | |
19456 | void helper_fldz_ST0 (void); | |
19457 | void helper_fldz_FT0 (void); | |
19458 | uint32_t helper_fnstsw (void); | |
19459 | uint32_t helper_fnstcw (void); | |
19460 | void helper_fldcw (uint32_t); | |
19461 | void helper_fclex (void); | |
19462 | void helper_fwait (void); | |
19463 | void helper_fninit (void); | |
19464 | void helper_fbld_ST0 (target_ulong); | |
19465 | void helper_fbst_ST0 (target_ulong); | |
19466 | void helper_f2xm1 (void); | |
19467 | void helper_fyl2x (void); | |
19468 | void helper_fptan (void); | |
19469 | void helper_fpatan (void); | |
19470 | void helper_fxtract (void); | |
19471 | void helper_fprem1 (void); | |
19472 | void helper_fprem (void); | |
19473 | void helper_fyl2xp1 (void); | |
19474 | void helper_fsqrt (void); | |
19475 | void helper_fsincos (void); | |
19476 | void helper_frndint (void); | |
19477 | void helper_fscale (void); | |
19478 | void helper_fsin (void); | |
19479 | void helper_fcos (void); | |
19480 | void helper_fstenv (target_ulong, int); | |
19481 | void helper_fldenv (target_ulong, int); | |
19482 | void helper_fsave (target_ulong, int); | |
19483 | void helper_frstor (target_ulong, int); | |
19484 | void helper_fxsave (target_ulong, int); | |
19485 | void helper_fxrstor (target_ulong, int); | |
19486 | target_ulong helper_bsf (target_ulong); | |
19487 | target_ulong helper_bsr (target_ulong); | |
19488 | target_ulong helper_lzcnt (target_ulong, int); | |
19489 | ||
19490 | ||
19491 | ||
19492 | void helper_ldmxcsr (uint32_t); | |
19493 | void helper_enter_mmx (void); | |
19494 | void helper_emms (void); | |
19495 | void helper_movq (void *, void *); | |
19496 | ||
19497 | ||
19498 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" 1 | |
19499 | # 37 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" | |
19500 | void helper_psrlw_mmx (MMXReg *, MMXReg *); | |
19501 | void helper_psraw_mmx (MMXReg *, MMXReg *); | |
19502 | void helper_psllw_mmx (MMXReg *, MMXReg *); | |
19503 | void helper_psrld_mmx (MMXReg *, MMXReg *); | |
19504 | void helper_psrad_mmx (MMXReg *, MMXReg *); | |
19505 | void helper_pslld_mmx (MMXReg *, MMXReg *); | |
19506 | void helper_psrlq_mmx (MMXReg *, MMXReg *); | |
19507 | void helper_psllq_mmx (MMXReg *, MMXReg *); | |
19508 | # 63 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" | |
19509 | void helper_paddb_mmx (MMXReg *, MMXReg *); | |
19510 | void helper_paddw_mmx (MMXReg *, MMXReg *); | |
19511 | void helper_paddl_mmx (MMXReg *, MMXReg *); | |
19512 | void helper_paddq_mmx (MMXReg *, MMXReg *); | |
19513 | ||
19514 | void helper_psubb_mmx (MMXReg *, MMXReg *); | |
19515 | void helper_psubw_mmx (MMXReg *, MMXReg *); | |
19516 | void helper_psubl_mmx (MMXReg *, MMXReg *); | |
19517 | void helper_psubq_mmx (MMXReg *, MMXReg *); | |
19518 | ||
19519 | void helper_paddusb_mmx (MMXReg *, MMXReg *); | |
19520 | void helper_paddsb_mmx (MMXReg *, MMXReg *); | |
19521 | void helper_psubusb_mmx (MMXReg *, MMXReg *); | |
19522 | void helper_psubsb_mmx (MMXReg *, MMXReg *); | |
19523 | ||
19524 | void helper_paddusw_mmx (MMXReg *, MMXReg *); | |
19525 | void helper_paddsw_mmx (MMXReg *, MMXReg *); | |
19526 | void helper_psubusw_mmx (MMXReg *, MMXReg *); | |
19527 | void helper_psubsw_mmx (MMXReg *, MMXReg *); | |
19528 | ||
19529 | void helper_pminub_mmx (MMXReg *, MMXReg *); | |
19530 | void helper_pmaxub_mmx (MMXReg *, MMXReg *); | |
19531 | ||
19532 | void helper_pminsw_mmx (MMXReg *, MMXReg *); | |
19533 | void helper_pmaxsw_mmx (MMXReg *, MMXReg *); | |
19534 | ||
19535 | void helper_pand_mmx (MMXReg *, MMXReg *); | |
19536 | void helper_pandn_mmx (MMXReg *, MMXReg *); | |
19537 | void helper_por_mmx (MMXReg *, MMXReg *); | |
19538 | void helper_pxor_mmx (MMXReg *, MMXReg *); | |
19539 | ||
19540 | void helper_pcmpgtb_mmx (MMXReg *, MMXReg *); | |
19541 | void helper_pcmpgtw_mmx (MMXReg *, MMXReg *); | |
19542 | void helper_pcmpgtl_mmx (MMXReg *, MMXReg *); | |
19543 | ||
19544 | void helper_pcmpeqb_mmx (MMXReg *, MMXReg *); | |
19545 | void helper_pcmpeqw_mmx (MMXReg *, MMXReg *); | |
19546 | void helper_pcmpeql_mmx (MMXReg *, MMXReg *); | |
19547 | ||
19548 | void helper_pmullw_mmx (MMXReg *, MMXReg *); | |
19549 | ||
19550 | void helper_pmulhrw_mmx (MMXReg *, MMXReg *); | |
19551 | ||
19552 | void helper_pmulhuw_mmx (MMXReg *, MMXReg *); | |
19553 | void helper_pmulhw_mmx (MMXReg *, MMXReg *); | |
19554 | ||
19555 | void helper_pavgb_mmx (MMXReg *, MMXReg *); | |
19556 | void helper_pavgw_mmx (MMXReg *, MMXReg *); | |
19557 | ||
19558 | void helper_pmuludq_mmx (MMXReg *, MMXReg *); | |
19559 | void helper_pmaddwd_mmx (MMXReg *, MMXReg *); | |
19560 | ||
19561 | void helper_psadbw_mmx (MMXReg *, MMXReg *); | |
19562 | void helper_maskmov_mmx (MMXReg *, MMXReg *, target_ulong); | |
19563 | void helper_movl_mm_T0_mmx (MMXReg *, uint32_t); | |
19564 | ||
19565 | ||
19566 | ||
19567 | ||
19568 | ||
19569 | void helper_pshufw_mmx (MMXReg *, MMXReg *, int); | |
19570 | # 227 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" | |
19571 | uint32_t helper_pmovmskb_mmx (MMXReg *); | |
19572 | void helper_packsswb_mmx (MMXReg *, MMXReg *); | |
19573 | void helper_packuswb_mmx (MMXReg *, MMXReg *); | |
19574 | void helper_packssdw_mmx (MMXReg *, MMXReg *); | |
19575 | ||
19576 | ||
19577 | ||
19578 | ||
19579 | ||
19580 | void helper_punpcklbw_mmx (MMXReg *, MMXReg *); void helper_punpcklwd_mmx (MMXReg *, MMXReg *); void helper_punpckldq_mmx (MMXReg *, MMXReg *); | |
19581 | void helper_punpckhbw_mmx (MMXReg *, MMXReg *); void helper_punpckhwd_mmx (MMXReg *, MMXReg *); void helper_punpckhdq_mmx (MMXReg *, MMXReg *); | |
19582 | # 246 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" | |
19583 | void helper_pi2fd (MMXReg *, MMXReg *); | |
19584 | void helper_pi2fw (MMXReg *, MMXReg *); | |
19585 | void helper_pf2id (MMXReg *, MMXReg *); | |
19586 | void helper_pf2iw (MMXReg *, MMXReg *); | |
19587 | void helper_pfacc (MMXReg *, MMXReg *); | |
19588 | void helper_pfadd (MMXReg *, MMXReg *); | |
19589 | void helper_pfcmpeq (MMXReg *, MMXReg *); | |
19590 | void helper_pfcmpge (MMXReg *, MMXReg *); | |
19591 | void helper_pfcmpgt (MMXReg *, MMXReg *); | |
19592 | void helper_pfmax (MMXReg *, MMXReg *); | |
19593 | void helper_pfmin (MMXReg *, MMXReg *); | |
19594 | void helper_pfmul (MMXReg *, MMXReg *); | |
19595 | void helper_pfnacc (MMXReg *, MMXReg *); | |
19596 | void helper_pfpnacc (MMXReg *, MMXReg *); | |
19597 | void helper_pfrcp (MMXReg *, MMXReg *); | |
19598 | void helper_pfrsqrt (MMXReg *, MMXReg *); | |
19599 | void helper_pfsub (MMXReg *, MMXReg *); | |
19600 | void helper_pfsubr (MMXReg *, MMXReg *); | |
19601 | void helper_pswapd (MMXReg *, MMXReg *); | |
19602 | ||
19603 | ||
19604 | ||
19605 | void helper_phaddw_mmx (MMXReg *, MMXReg *); | |
19606 | void helper_phaddd_mmx (MMXReg *, MMXReg *); | |
19607 | void helper_phaddsw_mmx (MMXReg *, MMXReg *); | |
19608 | void helper_phsubw_mmx (MMXReg *, MMXReg *); | |
19609 | void helper_phsubd_mmx (MMXReg *, MMXReg *); | |
19610 | void helper_phsubsw_mmx (MMXReg *, MMXReg *); | |
19611 | void helper_pabsb_mmx (MMXReg *, MMXReg *); | |
19612 | void helper_pabsw_mmx (MMXReg *, MMXReg *); | |
19613 | void helper_pabsd_mmx (MMXReg *, MMXReg *); | |
19614 | void helper_pmaddubsw_mmx (MMXReg *, MMXReg *); | |
19615 | void helper_pmulhrsw_mmx (MMXReg *, MMXReg *); | |
19616 | void helper_pshufb_mmx (MMXReg *, MMXReg *); | |
19617 | void helper_psignb_mmx (MMXReg *, MMXReg *); | |
19618 | void helper_psignw_mmx (MMXReg *, MMXReg *); | |
19619 | void helper_psignd_mmx (MMXReg *, MMXReg *); | |
19620 | void helper_palignr_mmx (MMXReg *, MMXReg *, int32_t); | |
19621 | # 207 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper.h" 2 | |
19622 | ||
19623 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" 1 | |
19624 | # 37 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" | |
19625 | void helper_psrlw_xmm (XMMReg *, XMMReg *); | |
19626 | void helper_psraw_xmm (XMMReg *, XMMReg *); | |
19627 | void helper_psllw_xmm (XMMReg *, XMMReg *); | |
19628 | void helper_psrld_xmm (XMMReg *, XMMReg *); | |
19629 | void helper_psrad_xmm (XMMReg *, XMMReg *); | |
19630 | void helper_pslld_xmm (XMMReg *, XMMReg *); | |
19631 | void helper_psrlq_xmm (XMMReg *, XMMReg *); | |
19632 | void helper_psllq_xmm (XMMReg *, XMMReg *); | |
19633 | ||
19634 | ||
19635 | void helper_psrldq_xmm (XMMReg *, XMMReg *); | |
19636 | void helper_pslldq_xmm (XMMReg *, XMMReg *); | |
19637 | # 63 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" | |
19638 | void helper_paddb_xmm (XMMReg *, XMMReg *); | |
19639 | void helper_paddw_xmm (XMMReg *, XMMReg *); | |
19640 | void helper_paddl_xmm (XMMReg *, XMMReg *); | |
19641 | void helper_paddq_xmm (XMMReg *, XMMReg *); | |
19642 | ||
19643 | void helper_psubb_xmm (XMMReg *, XMMReg *); | |
19644 | void helper_psubw_xmm (XMMReg *, XMMReg *); | |
19645 | void helper_psubl_xmm (XMMReg *, XMMReg *); | |
19646 | void helper_psubq_xmm (XMMReg *, XMMReg *); | |
19647 | ||
19648 | void helper_paddusb_xmm (XMMReg *, XMMReg *); | |
19649 | void helper_paddsb_xmm (XMMReg *, XMMReg *); | |
19650 | void helper_psubusb_xmm (XMMReg *, XMMReg *); | |
19651 | void helper_psubsb_xmm (XMMReg *, XMMReg *); | |
19652 | ||
19653 | void helper_paddusw_xmm (XMMReg *, XMMReg *); | |
19654 | void helper_paddsw_xmm (XMMReg *, XMMReg *); | |
19655 | void helper_psubusw_xmm (XMMReg *, XMMReg *); | |
19656 | void helper_psubsw_xmm (XMMReg *, XMMReg *); | |
19657 | ||
19658 | void helper_pminub_xmm (XMMReg *, XMMReg *); | |
19659 | void helper_pmaxub_xmm (XMMReg *, XMMReg *); | |
19660 | ||
19661 | void helper_pminsw_xmm (XMMReg *, XMMReg *); | |
19662 | void helper_pmaxsw_xmm (XMMReg *, XMMReg *); | |
19663 | ||
19664 | void helper_pand_xmm (XMMReg *, XMMReg *); | |
19665 | void helper_pandn_xmm (XMMReg *, XMMReg *); | |
19666 | void helper_por_xmm (XMMReg *, XMMReg *); | |
19667 | void helper_pxor_xmm (XMMReg *, XMMReg *); | |
19668 | ||
19669 | void helper_pcmpgtb_xmm (XMMReg *, XMMReg *); | |
19670 | void helper_pcmpgtw_xmm (XMMReg *, XMMReg *); | |
19671 | void helper_pcmpgtl_xmm (XMMReg *, XMMReg *); | |
19672 | ||
19673 | void helper_pcmpeqb_xmm (XMMReg *, XMMReg *); | |
19674 | void helper_pcmpeqw_xmm (XMMReg *, XMMReg *); | |
19675 | void helper_pcmpeql_xmm (XMMReg *, XMMReg *); | |
19676 | ||
19677 | void helper_pmullw_xmm (XMMReg *, XMMReg *); | |
19678 | ||
19679 | ||
19680 | ||
19681 | void helper_pmulhuw_xmm (XMMReg *, XMMReg *); | |
19682 | void helper_pmulhw_xmm (XMMReg *, XMMReg *); | |
19683 | ||
19684 | void helper_pavgb_xmm (XMMReg *, XMMReg *); | |
19685 | void helper_pavgw_xmm (XMMReg *, XMMReg *); | |
19686 | ||
19687 | void helper_pmuludq_xmm (XMMReg *, XMMReg *); | |
19688 | void helper_pmaddwd_xmm (XMMReg *, XMMReg *); | |
19689 | ||
19690 | void helper_psadbw_xmm (XMMReg *, XMMReg *); | |
19691 | void helper_maskmov_xmm (XMMReg *, XMMReg *, target_ulong); | |
19692 | void helper_movl_mm_T0_xmm (XMMReg *, uint32_t); | |
19693 | ||
19694 | ||
19695 | ||
19696 | ||
19697 | ||
19698 | ||
19699 | ||
19700 | void helper_shufps (XMMReg *, XMMReg *, int); | |
19701 | void helper_shufpd (XMMReg *, XMMReg *, int); | |
19702 | void helper_pshufd_xmm (XMMReg *, XMMReg *, int); | |
19703 | void helper_pshuflw_xmm (XMMReg *, XMMReg *, int); | |
19704 | void helper_pshufhw_xmm (XMMReg *, XMMReg *, int); | |
19705 | # 142 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" | |
19706 | void helper_addps (XMMReg *, XMMReg *); void helper_addss (XMMReg *, XMMReg *); void helper_addpd (XMMReg *, XMMReg *); void helper_addsd (XMMReg *, XMMReg *); | |
19707 | void helper_subps (XMMReg *, XMMReg *); void helper_subss (XMMReg *, XMMReg *); void helper_subpd (XMMReg *, XMMReg *); void helper_subsd (XMMReg *, XMMReg *); | |
19708 | void helper_mulps (XMMReg *, XMMReg *); void helper_mulss (XMMReg *, XMMReg *); void helper_mulpd (XMMReg *, XMMReg *); void helper_mulsd (XMMReg *, XMMReg *); | |
19709 | void helper_divps (XMMReg *, XMMReg *); void helper_divss (XMMReg *, XMMReg *); void helper_divpd (XMMReg *, XMMReg *); void helper_divsd (XMMReg *, XMMReg *); | |
19710 | void helper_minps (XMMReg *, XMMReg *); void helper_minss (XMMReg *, XMMReg *); void helper_minpd (XMMReg *, XMMReg *); void helper_minsd (XMMReg *, XMMReg *); | |
19711 | void helper_maxps (XMMReg *, XMMReg *); void helper_maxss (XMMReg *, XMMReg *); void helper_maxpd (XMMReg *, XMMReg *); void helper_maxsd (XMMReg *, XMMReg *); | |
19712 | void helper_sqrtps (XMMReg *, XMMReg *); void helper_sqrtss (XMMReg *, XMMReg *); void helper_sqrtpd (XMMReg *, XMMReg *); void helper_sqrtsd (XMMReg *, XMMReg *); | |
19713 | ||
19714 | ||
19715 | void helper_cvtps2pd (XMMReg *, XMMReg *); | |
19716 | void helper_cvtpd2ps (XMMReg *, XMMReg *); | |
19717 | void helper_cvtss2sd (XMMReg *, XMMReg *); | |
19718 | void helper_cvtsd2ss (XMMReg *, XMMReg *); | |
19719 | void helper_cvtdq2ps (XMMReg *, XMMReg *); | |
19720 | void helper_cvtdq2pd (XMMReg *, XMMReg *); | |
19721 | void helper_cvtpi2ps (XMMReg *, MMXReg *); | |
19722 | void helper_cvtpi2pd (XMMReg *, MMXReg *); | |
19723 | void helper_cvtsi2ss (XMMReg *, uint32_t); | |
19724 | void helper_cvtsi2sd (XMMReg *, uint32_t); | |
19725 | ||
19726 | ||
19727 | ||
19728 | ||
19729 | ||
19730 | ||
19731 | void helper_cvtps2dq (XMMReg *, XMMReg *); | |
19732 | void helper_cvtpd2dq (XMMReg *, XMMReg *); | |
19733 | void helper_cvtps2pi (MMXReg *, XMMReg *); | |
19734 | void helper_cvtpd2pi (MMXReg *, XMMReg *); | |
19735 | int32_t helper_cvtss2si (XMMReg *); | |
19736 | int32_t helper_cvtsd2si (XMMReg *); | |
19737 | ||
19738 | ||
19739 | ||
19740 | ||
19741 | ||
19742 | void helper_cvttps2dq (XMMReg *, XMMReg *); | |
19743 | void helper_cvttpd2dq (XMMReg *, XMMReg *); | |
19744 | void helper_cvttps2pi (MMXReg *, XMMReg *); | |
19745 | void helper_cvttpd2pi (MMXReg *, XMMReg *); | |
19746 | int32_t helper_cvttss2si (XMMReg *); | |
19747 | int32_t helper_cvttsd2si (XMMReg *); | |
19748 | ||
19749 | ||
19750 | ||
19751 | ||
19752 | ||
19753 | void helper_rsqrtps (XMMReg *, XMMReg *); | |
19754 | void helper_rsqrtss (XMMReg *, XMMReg *); | |
19755 | void helper_rcpps (XMMReg *, XMMReg *); | |
19756 | void helper_rcpss (XMMReg *, XMMReg *); | |
19757 | void helper_extrq_r (XMMReg *, XMMReg *); | |
19758 | void helper_extrq_i (XMMReg *, int, int); | |
19759 | void helper_insertq_r (XMMReg *, XMMReg *); | |
19760 | void helper_insertq_i (XMMReg *, int, int); | |
19761 | void helper_haddps (XMMReg *, XMMReg *); | |
19762 | void helper_haddpd (XMMReg *, XMMReg *); | |
19763 | void helper_hsubps (XMMReg *, XMMReg *); | |
19764 | void helper_hsubpd (XMMReg *, XMMReg *); | |
19765 | void helper_addsubps (XMMReg *, XMMReg *); | |
19766 | void helper_addsubpd (XMMReg *, XMMReg *); | |
19767 | ||
19768 | ||
19769 | ||
19770 | ||
19771 | ||
19772 | ||
19773 | ||
19774 | void helper_cmpeqps (XMMReg *, XMMReg *); void helper_cmpeqss (XMMReg *, XMMReg *); void helper_cmpeqpd (XMMReg *, XMMReg *); void helper_cmpeqsd (XMMReg *, XMMReg *); | |
19775 | void helper_cmpltps (XMMReg *, XMMReg *); void helper_cmpltss (XMMReg *, XMMReg *); void helper_cmpltpd (XMMReg *, XMMReg *); void helper_cmpltsd (XMMReg *, XMMReg *); | |
19776 | void helper_cmpleps (XMMReg *, XMMReg *); void helper_cmpless (XMMReg *, XMMReg *); void helper_cmplepd (XMMReg *, XMMReg *); void helper_cmplesd (XMMReg *, XMMReg *); | |
19777 | void helper_cmpunordps (XMMReg *, XMMReg *); void helper_cmpunordss (XMMReg *, XMMReg *); void helper_cmpunordpd (XMMReg *, XMMReg *); void helper_cmpunordsd (XMMReg *, XMMReg *); | |
19778 | void helper_cmpneqps (XMMReg *, XMMReg *); void helper_cmpneqss (XMMReg *, XMMReg *); void helper_cmpneqpd (XMMReg *, XMMReg *); void helper_cmpneqsd (XMMReg *, XMMReg *); | |
19779 | void helper_cmpnltps (XMMReg *, XMMReg *); void helper_cmpnltss (XMMReg *, XMMReg *); void helper_cmpnltpd (XMMReg *, XMMReg *); void helper_cmpnltsd (XMMReg *, XMMReg *); | |
19780 | void helper_cmpnleps (XMMReg *, XMMReg *); void helper_cmpnless (XMMReg *, XMMReg *); void helper_cmpnlepd (XMMReg *, XMMReg *); void helper_cmpnlesd (XMMReg *, XMMReg *); | |
19781 | void helper_cmpordps (XMMReg *, XMMReg *); void helper_cmpordss (XMMReg *, XMMReg *); void helper_cmpordpd (XMMReg *, XMMReg *); void helper_cmpordsd (XMMReg *, XMMReg *); | |
19782 | ||
19783 | void helper_ucomiss (XMMReg *, XMMReg *); | |
19784 | void helper_comiss (XMMReg *, XMMReg *); | |
19785 | void helper_ucomisd (XMMReg *, XMMReg *); | |
19786 | void helper_comisd (XMMReg *, XMMReg *); | |
19787 | uint32_t helper_movmskps (XMMReg *); | |
19788 | uint32_t helper_movmskpd (XMMReg *); | |
19789 | ||
19790 | ||
19791 | uint32_t helper_pmovmskb_xmm (XMMReg *); | |
19792 | void helper_packsswb_xmm (XMMReg *, XMMReg *); | |
19793 | void helper_packuswb_xmm (XMMReg *, XMMReg *); | |
19794 | void helper_packssdw_xmm (XMMReg *, XMMReg *); | |
19795 | ||
19796 | ||
19797 | ||
19798 | ||
19799 | ||
19800 | void helper_punpcklbw_xmm (XMMReg *, XMMReg *); void helper_punpcklwd_xmm (XMMReg *, XMMReg *); void helper_punpckldq_xmm (XMMReg *, XMMReg *); | |
19801 | void helper_punpckhbw_xmm (XMMReg *, XMMReg *); void helper_punpckhwd_xmm (XMMReg *, XMMReg *); void helper_punpckhdq_xmm (XMMReg *, XMMReg *); | |
19802 | ||
19803 | ||
19804 | void helper_punpcklqdq_xmm (XMMReg *, XMMReg *); | |
19805 | void helper_punpckhqdq_xmm (XMMReg *, XMMReg *); | |
19806 | # 268 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" | |
19807 | void helper_phaddw_xmm (XMMReg *, XMMReg *); | |
19808 | void helper_phaddd_xmm (XMMReg *, XMMReg *); | |
19809 | void helper_phaddsw_xmm (XMMReg *, XMMReg *); | |
19810 | void helper_phsubw_xmm (XMMReg *, XMMReg *); | |
19811 | void helper_phsubd_xmm (XMMReg *, XMMReg *); | |
19812 | void helper_phsubsw_xmm (XMMReg *, XMMReg *); | |
19813 | void helper_pabsb_xmm (XMMReg *, XMMReg *); | |
19814 | void helper_pabsw_xmm (XMMReg *, XMMReg *); | |
19815 | void helper_pabsd_xmm (XMMReg *, XMMReg *); | |
19816 | void helper_pmaddubsw_xmm (XMMReg *, XMMReg *); | |
19817 | void helper_pmulhrsw_xmm (XMMReg *, XMMReg *); | |
19818 | void helper_pshufb_xmm (XMMReg *, XMMReg *); | |
19819 | void helper_psignb_xmm (XMMReg *, XMMReg *); | |
19820 | void helper_psignw_xmm (XMMReg *, XMMReg *); | |
19821 | void helper_psignd_xmm (XMMReg *, XMMReg *); | |
19822 | void helper_palignr_xmm (XMMReg *, XMMReg *, int32_t); | |
19823 | ||
19824 | ||
19825 | ||
19826 | void helper_pblendvb_xmm (XMMReg *, XMMReg *); | |
19827 | void helper_blendvps_xmm (XMMReg *, XMMReg *); | |
19828 | void helper_blendvpd_xmm (XMMReg *, XMMReg *); | |
19829 | void helper_ptest_xmm (XMMReg *, XMMReg *); | |
19830 | void helper_pmovsxbw_xmm (XMMReg *, XMMReg *); | |
19831 | void helper_pmovsxbd_xmm (XMMReg *, XMMReg *); | |
19832 | void helper_pmovsxbq_xmm (XMMReg *, XMMReg *); | |
19833 | void helper_pmovsxwd_xmm (XMMReg *, XMMReg *); | |
19834 | void helper_pmovsxwq_xmm (XMMReg *, XMMReg *); | |
19835 | void helper_pmovsxdq_xmm (XMMReg *, XMMReg *); | |
19836 | void helper_pmovzxbw_xmm (XMMReg *, XMMReg *); | |
19837 | void helper_pmovzxbd_xmm (XMMReg *, XMMReg *); | |
19838 | void helper_pmovzxbq_xmm (XMMReg *, XMMReg *); | |
19839 | void helper_pmovzxwd_xmm (XMMReg *, XMMReg *); | |
19840 | void helper_pmovzxwq_xmm (XMMReg *, XMMReg *); | |
19841 | void helper_pmovzxdq_xmm (XMMReg *, XMMReg *); | |
19842 | void helper_pmuldq_xmm (XMMReg *, XMMReg *); | |
19843 | void helper_pcmpeqq_xmm (XMMReg *, XMMReg *); | |
19844 | void helper_packusdw_xmm (XMMReg *, XMMReg *); | |
19845 | void helper_pminsb_xmm (XMMReg *, XMMReg *); | |
19846 | void helper_pminsd_xmm (XMMReg *, XMMReg *); | |
19847 | void helper_pminuw_xmm (XMMReg *, XMMReg *); | |
19848 | void helper_pminud_xmm (XMMReg *, XMMReg *); | |
19849 | void helper_pmaxsb_xmm (XMMReg *, XMMReg *); | |
19850 | void helper_pmaxsd_xmm (XMMReg *, XMMReg *); | |
19851 | void helper_pmaxuw_xmm (XMMReg *, XMMReg *); | |
19852 | void helper_pmaxud_xmm (XMMReg *, XMMReg *); | |
19853 | void helper_pmulld_xmm (XMMReg *, XMMReg *); | |
19854 | void helper_phminposuw_xmm (XMMReg *, XMMReg *); | |
19855 | void helper_roundps_xmm (XMMReg *, XMMReg *, uint32_t); | |
19856 | void helper_roundpd_xmm (XMMReg *, XMMReg *, uint32_t); | |
19857 | void helper_roundss_xmm (XMMReg *, XMMReg *, uint32_t); | |
19858 | void helper_roundsd_xmm (XMMReg *, XMMReg *, uint32_t); | |
19859 | void helper_blendps_xmm (XMMReg *, XMMReg *, uint32_t); | |
19860 | void helper_blendpd_xmm (XMMReg *, XMMReg *, uint32_t); | |
19861 | void helper_pblendw_xmm (XMMReg *, XMMReg *, uint32_t); | |
19862 | void helper_dpps_xmm (XMMReg *, XMMReg *, uint32_t); | |
19863 | void helper_dppd_xmm (XMMReg *, XMMReg *, uint32_t); | |
19864 | void helper_mpsadbw_xmm (XMMReg *, XMMReg *, uint32_t); | |
19865 | ||
19866 | ||
19867 | ||
19868 | ||
19869 | void helper_pcmpgtq_xmm (XMMReg *, XMMReg *); | |
19870 | void helper_pcmpestri_xmm (XMMReg *, XMMReg *, uint32_t); | |
19871 | void helper_pcmpestrm_xmm (XMMReg *, XMMReg *, uint32_t); | |
19872 | void helper_pcmpistri_xmm (XMMReg *, XMMReg *, uint32_t); | |
19873 | void helper_pcmpistrm_xmm (XMMReg *, XMMReg *, uint32_t); | |
19874 | target_ulong helper_crc32 (uint32_t, target_ulong, uint32_t); | |
19875 | target_ulong helper_popcnt (target_ulong, uint32_t); | |
19876 | # 209 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper.h" 2 | |
19877 | ||
19878 | target_ulong helper_rclb (target_ulong, target_ulong); | |
19879 | target_ulong helper_rclw (target_ulong, target_ulong); | |
19880 | target_ulong helper_rcll (target_ulong, target_ulong); | |
19881 | target_ulong helper_rcrb (target_ulong, target_ulong); | |
19882 | target_ulong helper_rcrw (target_ulong, target_ulong); | |
19883 | target_ulong helper_rcrl (target_ulong, target_ulong); | |
19884 | ||
19885 | ||
19886 | ||
19887 | ||
19888 | ||
19889 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/def-helper.h" 1 | |
19890 | # 221 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper.h" 2 | |
19891 | # 28 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
19892 | ||
19893 | ||
19894 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 1 | |
19895 | # 27 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" | |
19896 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
19897 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
19898 | static __attribute__ (( always_inline )) __inline__ uint32_t | |
19899 | ldub_kernel( | |
19900 | target_ulong ptr) | |
19901 | { | |
19902 | int page_index; | |
19903 | uint32_t res; | |
19904 | target_ulong addr; | |
19905 | int mmu_idx; | |
19906 | ||
19907 | addr = ptr; | |
19908 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
19909 | mmu_idx = 0; | |
19910 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) | |
19911 | ) { | |
19912 | res = __ldb_mmu( | |
19913 | addr, | |
19914 | mmu_idx); | |
19915 | } else { | |
19916 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
19917 | res = ldub_p((uint8_t *)(intptr_t)((hostaddr))); | |
19918 | } | |
19919 | return res; | |
19920 | } | |
19921 | ||
19922 | ||
19923 | static __attribute__ (( always_inline )) __inline__ int | |
19924 | ldsb_kernel( | |
19925 | target_ulong ptr) | |
19926 | { | |
19927 | int res, page_index; | |
19928 | target_ulong addr; | |
19929 | int mmu_idx; | |
19930 | ||
19931 | addr = ptr; | |
19932 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
19933 | mmu_idx = 0; | |
19934 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) | |
19935 | ) { | |
19936 | res = (int8_t) | |
19937 | __ldb_mmu( addr, mmu_idx); | |
19938 | } else { | |
19939 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
19940 | res = ldsb_p((uint8_t *)(intptr_t)((hostaddr))); | |
19941 | } | |
19942 | return res; | |
19943 | } | |
19944 | ||
19945 | ||
19946 | ||
19947 | ||
19948 | ||
19949 | ||
19950 | static __attribute__ (( always_inline )) __inline__ void | |
19951 | stb_kernel( target_ulong ptr, | |
19952 | uint32_t v) | |
19953 | { | |
19954 | int page_index; | |
19955 | target_ulong addr; | |
19956 | int mmu_idx; | |
19957 | ||
19958 | addr = ptr; | |
19959 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
19960 | mmu_idx = 0; | |
19961 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) | |
19962 | ) { | |
19963 | __stb_mmu( addr, v, | |
19964 | mmu_idx); | |
19965 | } else { | |
19966 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
19967 | stb_p((uint8_t *)(intptr_t)((hostaddr)), v); | |
19968 | } | |
19969 | } | |
19970 | # 28 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 | |
19971 | ||
19972 | ||
19973 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
19974 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
19975 | static __attribute__ (( always_inline )) __inline__ uint32_t | |
19976 | lduw_kernel( | |
19977 | target_ulong ptr) | |
19978 | { | |
19979 | int page_index; | |
19980 | uint32_t res; | |
19981 | target_ulong addr; | |
19982 | int mmu_idx; | |
19983 | ||
19984 | addr = ptr; | |
19985 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
19986 | mmu_idx = 0; | |
19987 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) | |
19988 | ) { | |
19989 | res = __ldw_mmu( | |
19990 | addr, | |
19991 | mmu_idx); | |
19992 | } else { | |
19993 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
19994 | res = lduw_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
19995 | } | |
19996 | return res; | |
19997 | } | |
19998 | ||
19999 | ||
20000 | static __attribute__ (( always_inline )) __inline__ int | |
20001 | ldsw_kernel( | |
20002 | target_ulong ptr) | |
20003 | { | |
20004 | int res, page_index; | |
20005 | target_ulong addr; | |
20006 | int mmu_idx; | |
20007 | ||
20008 | addr = ptr; | |
20009 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20010 | mmu_idx = 0; | |
20011 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) | |
20012 | ) { | |
20013 | res = (int16_t) | |
20014 | __ldw_mmu( addr, mmu_idx); | |
20015 | } else { | |
20016 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20017 | res = ldsw_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
20018 | } | |
20019 | return res; | |
20020 | } | |
20021 | ||
20022 | ||
20023 | ||
20024 | ||
20025 | ||
20026 | ||
20027 | static __attribute__ (( always_inline )) __inline__ void | |
20028 | stw_kernel( target_ulong ptr, | |
20029 | uint32_t v) | |
20030 | { | |
20031 | int page_index; | |
20032 | target_ulong addr; | |
20033 | int mmu_idx; | |
20034 | ||
20035 | addr = ptr; | |
20036 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20037 | mmu_idx = 0; | |
20038 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) | |
20039 | ) { | |
20040 | __stw_mmu( addr, v, | |
20041 | mmu_idx); | |
20042 | } else { | |
20043 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20044 | stw_le_p((uint8_t *)(intptr_t)((hostaddr)), v); | |
20045 | } | |
20046 | } | |
20047 | # 31 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 | |
20048 | ||
20049 | ||
20050 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
20051 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20052 | static __attribute__ (( always_inline )) __inline__ uint32_t | |
20053 | ldl_kernel( | |
20054 | target_ulong ptr) | |
20055 | { | |
20056 | int page_index; | |
20057 | uint32_t res; | |
20058 | target_ulong addr; | |
20059 | int mmu_idx; | |
20060 | ||
20061 | addr = ptr; | |
20062 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20063 | mmu_idx = 0; | |
20064 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) | |
20065 | ) { | |
20066 | res = __ldl_mmu( | |
20067 | addr, | |
20068 | mmu_idx); | |
20069 | } else { | |
20070 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20071 | res = ldl_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
20072 | } | |
20073 | return res; | |
20074 | } | |
20075 | # 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20076 | static __attribute__ (( always_inline )) __inline__ void | |
20077 | stl_kernel( target_ulong ptr, | |
20078 | uint32_t v) | |
20079 | { | |
20080 | int page_index; | |
20081 | target_ulong addr; | |
20082 | int mmu_idx; | |
20083 | ||
20084 | addr = ptr; | |
20085 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20086 | mmu_idx = 0; | |
20087 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) | |
20088 | ) { | |
20089 | __stl_mmu( addr, v, | |
20090 | mmu_idx); | |
20091 | } else { | |
20092 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20093 | stl_le_p((uint8_t *)(intptr_t)((hostaddr)), v); | |
20094 | } | |
20095 | } | |
20096 | # 198 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20097 | static __attribute__ (( always_inline )) __inline__ float32 ldfl_kernel( | |
20098 | target_ulong ptr) | |
20099 | { | |
20100 | union { | |
20101 | float32 f; | |
20102 | uint32_t i; | |
20103 | } u; | |
20104 | u.i = ldl_kernel( ptr); | |
20105 | return u.f; | |
20106 | } | |
20107 | ||
20108 | static __attribute__ (( always_inline )) __inline__ void stfl_kernel( | |
20109 | target_ulong ptr, | |
20110 | float32 v) | |
20111 | { | |
20112 | union { | |
20113 | float32 f; | |
20114 | uint32_t i; | |
20115 | } u; | |
20116 | u.f = v; | |
20117 | stl_kernel( ptr, u.i); | |
20118 | } | |
20119 | # 34 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 | |
20120 | ||
20121 | ||
20122 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
20123 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20124 | static __attribute__ (( always_inline )) __inline__ uint64_t | |
20125 | ldq_kernel( | |
20126 | target_ulong ptr) | |
20127 | { | |
20128 | int page_index; | |
20129 | uint64_t res; | |
20130 | target_ulong addr; | |
20131 | int mmu_idx; | |
20132 | ||
20133 | addr = ptr; | |
20134 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20135 | mmu_idx = 0; | |
20136 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) | |
20137 | ) { | |
20138 | res = __ldq_mmu( | |
20139 | addr, | |
20140 | mmu_idx); | |
20141 | } else { | |
20142 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20143 | res = ldq_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
20144 | } | |
20145 | return res; | |
20146 | } | |
20147 | # 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20148 | static __attribute__ (( always_inline )) __inline__ void | |
20149 | stq_kernel( target_ulong ptr, | |
20150 | uint64_t v) | |
20151 | { | |
20152 | int page_index; | |
20153 | target_ulong addr; | |
20154 | int mmu_idx; | |
20155 | ||
20156 | addr = ptr; | |
20157 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20158 | mmu_idx = 0; | |
20159 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) | |
20160 | ) { | |
20161 | __stq_mmu( addr, v, | |
20162 | mmu_idx); | |
20163 | } else { | |
20164 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20165 | stq_le_p((uint8_t *)(intptr_t)((hostaddr)), v); | |
20166 | } | |
20167 | } | |
20168 | ||
20169 | ||
20170 | ||
20171 | ||
20172 | ||
20173 | ||
20174 | static __attribute__ (( always_inline )) __inline__ float64 ldfq_kernel( | |
20175 | target_ulong ptr) | |
20176 | { | |
20177 | union { | |
20178 | float64 d; | |
20179 | uint64_t i; | |
20180 | } u; | |
20181 | u.i = ldq_kernel( ptr); | |
20182 | return u.d; | |
20183 | } | |
20184 | ||
20185 | static __attribute__ (( always_inline )) __inline__ void stfq_kernel( | |
20186 | target_ulong ptr, | |
20187 | float64 v) | |
20188 | { | |
20189 | union { | |
20190 | float64 d; | |
20191 | uint64_t i; | |
20192 | } u; | |
20193 | u.d = v; | |
20194 | stq_kernel( ptr, u.i); | |
20195 | } | |
20196 | # 37 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 | |
20197 | ||
20198 | ||
20199 | ||
20200 | ||
20201 | ||
20202 | ||
20203 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
20204 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20205 | static __attribute__ (( always_inline )) __inline__ uint32_t | |
20206 | ldub_user( | |
20207 | target_ulong ptr) | |
20208 | { | |
20209 | int page_index; | |
20210 | uint32_t res; | |
20211 | target_ulong addr; | |
20212 | int mmu_idx; | |
20213 | ||
20214 | addr = ptr; | |
20215 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20216 | mmu_idx = 1; | |
20217 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) | |
20218 | ) { | |
20219 | res = __ldb_mmu( | |
20220 | addr, | |
20221 | mmu_idx); | |
20222 | } else { | |
20223 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20224 | res = ldub_p((uint8_t *)(intptr_t)((hostaddr))); | |
20225 | } | |
20226 | return res; | |
20227 | } | |
20228 | ||
20229 | ||
20230 | static __attribute__ (( always_inline )) __inline__ int | |
20231 | ldsb_user( | |
20232 | target_ulong ptr) | |
20233 | { | |
20234 | int res, page_index; | |
20235 | target_ulong addr; | |
20236 | int mmu_idx; | |
20237 | ||
20238 | addr = ptr; | |
20239 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20240 | mmu_idx = 1; | |
20241 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) | |
20242 | ) { | |
20243 | res = (int8_t) | |
20244 | __ldb_mmu( addr, mmu_idx); | |
20245 | } else { | |
20246 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20247 | res = ldsb_p((uint8_t *)(intptr_t)((hostaddr))); | |
20248 | } | |
20249 | return res; | |
20250 | } | |
20251 | ||
20252 | ||
20253 | ||
20254 | ||
20255 | ||
20256 | ||
20257 | static __attribute__ (( always_inline )) __inline__ void | |
20258 | stb_user( target_ulong ptr, | |
20259 | uint32_t v) | |
20260 | { | |
20261 | int page_index; | |
20262 | target_ulong addr; | |
20263 | int mmu_idx; | |
20264 | ||
20265 | addr = ptr; | |
20266 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20267 | mmu_idx = 1; | |
20268 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) | |
20269 | ) { | |
20270 | __stb_mmu( addr, v, | |
20271 | mmu_idx); | |
20272 | } else { | |
20273 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20274 | stb_p((uint8_t *)(intptr_t)((hostaddr)), v); | |
20275 | } | |
20276 | } | |
20277 | # 44 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 | |
20278 | ||
20279 | ||
20280 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
20281 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20282 | static __attribute__ (( always_inline )) __inline__ uint32_t | |
20283 | lduw_user( | |
20284 | target_ulong ptr) | |
20285 | { | |
20286 | int page_index; | |
20287 | uint32_t res; | |
20288 | target_ulong addr; | |
20289 | int mmu_idx; | |
20290 | ||
20291 | addr = ptr; | |
20292 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20293 | mmu_idx = 1; | |
20294 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) | |
20295 | ) { | |
20296 | res = __ldw_mmu( | |
20297 | addr, | |
20298 | mmu_idx); | |
20299 | } else { | |
20300 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20301 | res = lduw_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
20302 | } | |
20303 | return res; | |
20304 | } | |
20305 | ||
20306 | ||
20307 | static __attribute__ (( always_inline )) __inline__ int | |
20308 | ldsw_user( | |
20309 | target_ulong ptr) | |
20310 | { | |
20311 | int res, page_index; | |
20312 | target_ulong addr; | |
20313 | int mmu_idx; | |
20314 | ||
20315 | addr = ptr; | |
20316 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20317 | mmu_idx = 1; | |
20318 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) | |
20319 | ) { | |
20320 | res = (int16_t) | |
20321 | __ldw_mmu( addr, mmu_idx); | |
20322 | } else { | |
20323 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20324 | res = ldsw_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
20325 | } | |
20326 | return res; | |
20327 | } | |
20328 | ||
20329 | ||
20330 | ||
20331 | ||
20332 | ||
20333 | ||
20334 | static __attribute__ (( always_inline )) __inline__ void | |
20335 | stw_user( target_ulong ptr, | |
20336 | uint32_t v) | |
20337 | { | |
20338 | int page_index; | |
20339 | target_ulong addr; | |
20340 | int mmu_idx; | |
20341 | ||
20342 | addr = ptr; | |
20343 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20344 | mmu_idx = 1; | |
20345 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) | |
20346 | ) { | |
20347 | __stw_mmu( addr, v, | |
20348 | mmu_idx); | |
20349 | } else { | |
20350 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20351 | stw_le_p((uint8_t *)(intptr_t)((hostaddr)), v); | |
20352 | } | |
20353 | } | |
20354 | # 47 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 | |
20355 | ||
20356 | ||
20357 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
20358 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20359 | static __attribute__ (( always_inline )) __inline__ uint32_t | |
20360 | ldl_user( | |
20361 | target_ulong ptr) | |
20362 | { | |
20363 | int page_index; | |
20364 | uint32_t res; | |
20365 | target_ulong addr; | |
20366 | int mmu_idx; | |
20367 | ||
20368 | addr = ptr; | |
20369 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20370 | mmu_idx = 1; | |
20371 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) | |
20372 | ) { | |
20373 | res = __ldl_mmu( | |
20374 | addr, | |
20375 | mmu_idx); | |
20376 | } else { | |
20377 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20378 | res = ldl_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
20379 | } | |
20380 | return res; | |
20381 | } | |
20382 | # 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20383 | static __attribute__ (( always_inline )) __inline__ void | |
20384 | stl_user( target_ulong ptr, | |
20385 | uint32_t v) | |
20386 | { | |
20387 | int page_index; | |
20388 | target_ulong addr; | |
20389 | int mmu_idx; | |
20390 | ||
20391 | addr = ptr; | |
20392 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20393 | mmu_idx = 1; | |
20394 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) | |
20395 | ) { | |
20396 | __stl_mmu( addr, v, | |
20397 | mmu_idx); | |
20398 | } else { | |
20399 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20400 | stl_le_p((uint8_t *)(intptr_t)((hostaddr)), v); | |
20401 | } | |
20402 | } | |
20403 | # 198 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20404 | static __attribute__ (( always_inline )) __inline__ float32 ldfl_user( | |
20405 | target_ulong ptr) | |
20406 | { | |
20407 | union { | |
20408 | float32 f; | |
20409 | uint32_t i; | |
20410 | } u; | |
20411 | u.i = ldl_user( ptr); | |
20412 | return u.f; | |
20413 | } | |
20414 | ||
20415 | static __attribute__ (( always_inline )) __inline__ void stfl_user( | |
20416 | target_ulong ptr, | |
20417 | float32 v) | |
20418 | { | |
20419 | union { | |
20420 | float32 f; | |
20421 | uint32_t i; | |
20422 | } u; | |
20423 | u.f = v; | |
20424 | stl_user( ptr, u.i); | |
20425 | } | |
20426 | # 50 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 | |
20427 | ||
20428 | ||
20429 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
20430 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20431 | static __attribute__ (( always_inline )) __inline__ uint64_t | |
20432 | ldq_user( | |
20433 | target_ulong ptr) | |
20434 | { | |
20435 | int page_index; | |
20436 | uint64_t res; | |
20437 | target_ulong addr; | |
20438 | int mmu_idx; | |
20439 | ||
20440 | addr = ptr; | |
20441 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20442 | mmu_idx = 1; | |
20443 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) | |
20444 | ) { | |
20445 | res = __ldq_mmu( | |
20446 | addr, | |
20447 | mmu_idx); | |
20448 | } else { | |
20449 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20450 | res = ldq_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
20451 | } | |
20452 | return res; | |
20453 | } | |
20454 | # 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20455 | static __attribute__ (( always_inline )) __inline__ void | |
20456 | stq_user( target_ulong ptr, | |
20457 | uint64_t v) | |
20458 | { | |
20459 | int page_index; | |
20460 | target_ulong addr; | |
20461 | int mmu_idx; | |
20462 | ||
20463 | addr = ptr; | |
20464 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20465 | mmu_idx = 1; | |
20466 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) | |
20467 | ) { | |
20468 | __stq_mmu( addr, v, | |
20469 | mmu_idx); | |
20470 | } else { | |
20471 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20472 | stq_le_p((uint8_t *)(intptr_t)((hostaddr)), v); | |
20473 | } | |
20474 | } | |
20475 | ||
20476 | ||
20477 | ||
20478 | ||
20479 | ||
20480 | ||
20481 | static __attribute__ (( always_inline )) __inline__ float64 ldfq_user( | |
20482 | target_ulong ptr) | |
20483 | { | |
20484 | union { | |
20485 | float64 d; | |
20486 | uint64_t i; | |
20487 | } u; | |
20488 | u.i = ldq_user( ptr); | |
20489 | return u.d; | |
20490 | } | |
20491 | ||
20492 | static __attribute__ (( always_inline )) __inline__ void stfq_user( | |
20493 | target_ulong ptr, | |
20494 | float64 v) | |
20495 | { | |
20496 | union { | |
20497 | float64 d; | |
20498 | uint64_t i; | |
20499 | } u; | |
20500 | u.d = v; | |
20501 | stq_user( ptr, u.i); | |
20502 | } | |
20503 | # 53 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 | |
20504 | # 140 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" | |
20505 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
20506 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20507 | static __attribute__ (( always_inline )) __inline__ uint32_t | |
20508 | ldub_data( | |
20509 | target_ulong ptr) | |
20510 | { | |
20511 | int page_index; | |
20512 | uint32_t res; | |
20513 | target_ulong addr; | |
20514 | int mmu_idx; | |
20515 | ||
20516 | addr = ptr; | |
20517 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20518 | mmu_idx = (cpu_mmu_index(env)); | |
20519 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) | |
20520 | ) { | |
20521 | res = __ldb_mmu( | |
20522 | addr, | |
20523 | mmu_idx); | |
20524 | } else { | |
20525 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20526 | res = ldub_p((uint8_t *)(intptr_t)((hostaddr))); | |
20527 | } | |
20528 | return res; | |
20529 | } | |
20530 | ||
20531 | ||
20532 | static __attribute__ (( always_inline )) __inline__ int | |
20533 | ldsb_data( | |
20534 | target_ulong ptr) | |
20535 | { | |
20536 | int res, page_index; | |
20537 | target_ulong addr; | |
20538 | int mmu_idx; | |
20539 | ||
20540 | addr = ptr; | |
20541 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20542 | mmu_idx = (cpu_mmu_index(env)); | |
20543 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) | |
20544 | ) { | |
20545 | res = (int8_t) | |
20546 | __ldb_mmu( addr, mmu_idx); | |
20547 | } else { | |
20548 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20549 | res = ldsb_p((uint8_t *)(intptr_t)((hostaddr))); | |
20550 | } | |
20551 | return res; | |
20552 | } | |
20553 | ||
20554 | ||
20555 | ||
20556 | ||
20557 | ||
20558 | ||
20559 | static __attribute__ (( always_inline )) __inline__ void | |
20560 | stb_data( target_ulong ptr, | |
20561 | uint32_t v) | |
20562 | { | |
20563 | int page_index; | |
20564 | target_ulong addr; | |
20565 | int mmu_idx; | |
20566 | ||
20567 | addr = ptr; | |
20568 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20569 | mmu_idx = (cpu_mmu_index(env)); | |
20570 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) | |
20571 | ) { | |
20572 | __stb_mmu( addr, v, | |
20573 | mmu_idx); | |
20574 | } else { | |
20575 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20576 | stb_p((uint8_t *)(intptr_t)((hostaddr)), v); | |
20577 | } | |
20578 | } | |
20579 | # 141 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 | |
20580 | ||
20581 | ||
20582 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
20583 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20584 | static __attribute__ (( always_inline )) __inline__ uint32_t | |
20585 | lduw_data( | |
20586 | target_ulong ptr) | |
20587 | { | |
20588 | int page_index; | |
20589 | uint32_t res; | |
20590 | target_ulong addr; | |
20591 | int mmu_idx; | |
20592 | ||
20593 | addr = ptr; | |
20594 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20595 | mmu_idx = (cpu_mmu_index(env)); | |
20596 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) | |
20597 | ) { | |
20598 | res = __ldw_mmu( | |
20599 | addr, | |
20600 | mmu_idx); | |
20601 | } else { | |
20602 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20603 | res = lduw_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
20604 | } | |
20605 | return res; | |
20606 | } | |
20607 | ||
20608 | ||
20609 | static __attribute__ (( always_inline )) __inline__ int | |
20610 | ldsw_data( | |
20611 | target_ulong ptr) | |
20612 | { | |
20613 | int res, page_index; | |
20614 | target_ulong addr; | |
20615 | int mmu_idx; | |
20616 | ||
20617 | addr = ptr; | |
20618 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20619 | mmu_idx = (cpu_mmu_index(env)); | |
20620 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) | |
20621 | ) { | |
20622 | res = (int16_t) | |
20623 | __ldw_mmu( addr, mmu_idx); | |
20624 | } else { | |
20625 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20626 | res = ldsw_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
20627 | } | |
20628 | return res; | |
20629 | } | |
20630 | ||
20631 | ||
20632 | ||
20633 | ||
20634 | ||
20635 | ||
20636 | static __attribute__ (( always_inline )) __inline__ void | |
20637 | stw_data( target_ulong ptr, | |
20638 | uint32_t v) | |
20639 | { | |
20640 | int page_index; | |
20641 | target_ulong addr; | |
20642 | int mmu_idx; | |
20643 | ||
20644 | addr = ptr; | |
20645 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20646 | mmu_idx = (cpu_mmu_index(env)); | |
20647 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) | |
20648 | ) { | |
20649 | __stw_mmu( addr, v, | |
20650 | mmu_idx); | |
20651 | } else { | |
20652 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20653 | stw_le_p((uint8_t *)(intptr_t)((hostaddr)), v); | |
20654 | } | |
20655 | } | |
20656 | # 144 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 | |
20657 | ||
20658 | ||
20659 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
20660 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20661 | static __attribute__ (( always_inline )) __inline__ uint32_t | |
20662 | ldl_data( | |
20663 | target_ulong ptr) | |
20664 | { | |
20665 | int page_index; | |
20666 | uint32_t res; | |
20667 | target_ulong addr; | |
20668 | int mmu_idx; | |
20669 | ||
20670 | addr = ptr; | |
20671 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20672 | mmu_idx = (cpu_mmu_index(env)); | |
20673 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) | |
20674 | ) { | |
20675 | res = __ldl_mmu( | |
20676 | addr, | |
20677 | mmu_idx); | |
20678 | } else { | |
20679 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20680 | res = ldl_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
20681 | } | |
20682 | return res; | |
20683 | } | |
20684 | # 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20685 | static __attribute__ (( always_inline )) __inline__ void | |
20686 | stl_data( target_ulong ptr, | |
20687 | uint32_t v) | |
20688 | { | |
20689 | int page_index; | |
20690 | target_ulong addr; | |
20691 | int mmu_idx; | |
20692 | ||
20693 | addr = ptr; | |
20694 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20695 | mmu_idx = (cpu_mmu_index(env)); | |
20696 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) | |
20697 | ) { | |
20698 | __stl_mmu( addr, v, | |
20699 | mmu_idx); | |
20700 | } else { | |
20701 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20702 | stl_le_p((uint8_t *)(intptr_t)((hostaddr)), v); | |
20703 | } | |
20704 | } | |
20705 | # 198 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20706 | static __attribute__ (( always_inline )) __inline__ float32 ldfl_data( | |
20707 | target_ulong ptr) | |
20708 | { | |
20709 | union { | |
20710 | float32 f; | |
20711 | uint32_t i; | |
20712 | } u; | |
20713 | u.i = ldl_data( ptr); | |
20714 | return u.f; | |
20715 | } | |
20716 | ||
20717 | static __attribute__ (( always_inline )) __inline__ void stfl_data( | |
20718 | target_ulong ptr, | |
20719 | float32 v) | |
20720 | { | |
20721 | union { | |
20722 | float32 f; | |
20723 | uint32_t i; | |
20724 | } u; | |
20725 | u.f = v; | |
20726 | stl_data( ptr, u.i); | |
20727 | } | |
20728 | # 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 | |
20729 | ||
20730 | ||
20731 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 | |
20732 | # 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20733 | static __attribute__ (( always_inline )) __inline__ uint64_t | |
20734 | ldq_data( | |
20735 | target_ulong ptr) | |
20736 | { | |
20737 | int page_index; | |
20738 | uint64_t res; | |
20739 | target_ulong addr; | |
20740 | int mmu_idx; | |
20741 | ||
20742 | addr = ptr; | |
20743 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20744 | mmu_idx = (cpu_mmu_index(env)); | |
20745 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) | |
20746 | ) { | |
20747 | res = __ldq_mmu( | |
20748 | addr, | |
20749 | mmu_idx); | |
20750 | } else { | |
20751 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20752 | res = ldq_le_p((uint8_t *)(intptr_t)((hostaddr))); | |
20753 | } | |
20754 | return res; | |
20755 | } | |
20756 | # 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" | |
20757 | static __attribute__ (( always_inline )) __inline__ void | |
20758 | stq_data( target_ulong ptr, | |
20759 | uint64_t v) | |
20760 | { | |
20761 | int page_index; | |
20762 | target_ulong addr; | |
20763 | int mmu_idx; | |
20764 | ||
20765 | addr = ptr; | |
20766 | page_index = (addr >> 12) & ((1 << 8) - 1); | |
20767 | mmu_idx = (cpu_mmu_index(env)); | |
20768 | if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) | |
20769 | ) { | |
20770 | __stq_mmu( addr, v, | |
20771 | mmu_idx); | |
20772 | } else { | |
20773 | uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; | |
20774 | stq_le_p((uint8_t *)(intptr_t)((hostaddr)), v); | |
20775 | } | |
20776 | } | |
20777 | ||
20778 | ||
20779 | ||
20780 | ||
20781 | ||
20782 | ||
20783 | static __attribute__ (( always_inline )) __inline__ float64 ldfq_data( | |
20784 | target_ulong ptr) | |
20785 | { | |
20786 | union { | |
20787 | float64 d; | |
20788 | uint64_t i; | |
20789 | } u; | |
20790 | u.i = ldq_data( ptr); | |
20791 | return u.d; | |
20792 | } | |
20793 | ||
20794 | static __attribute__ (( always_inline )) __inline__ void stfq_data( | |
20795 | target_ulong ptr, | |
20796 | float64 v) | |
20797 | { | |
20798 | union { | |
20799 | float64 d; | |
20800 | uint64_t i; | |
20801 | } u; | |
20802 | u.d = v; | |
20803 | stq_data( ptr, u.i); | |
20804 | } | |
20805 | # 150 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 | |
20806 | # 31 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
20807 | # 45 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
20808 | static __attribute__ (( always_inline )) __inline__ target_long lshift(target_long x, int n) | |
20809 | { | |
20810 | if (n >= 0) { | |
20811 | return x << n; | |
20812 | } else { | |
20813 | return x >> (-n); | |
20814 | } | |
20815 | } | |
20816 | # 70 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
20817 | static __attribute__ (( always_inline )) __inline__ void fpush(void) | |
20818 | { | |
20819 | env->fpstt = (env->fpstt - 1) & 7; | |
20820 | env->fptags[env->fpstt] = 0; | |
20821 | } | |
20822 | ||
20823 | static __attribute__ (( always_inline )) __inline__ void fpop(void) | |
20824 | { | |
20825 | env->fptags[env->fpstt] = 1; | |
20826 | env->fpstt = (env->fpstt + 1) & 7; | |
20827 | } | |
20828 | ||
20829 | static __attribute__ (( always_inline )) __inline__ floatx80 helper_fldt(target_ulong ptr) | |
20830 | { | |
20831 | CPU_LDoubleU temp; | |
20832 | ||
20833 | temp.l.lower = ldq_data(ptr); | |
20834 | temp.l.upper = lduw_data(ptr + 8); | |
20835 | return temp.d; | |
20836 | } | |
20837 | ||
20838 | static __attribute__ (( always_inline )) __inline__ void helper_fstt(floatx80 f, target_ulong ptr) | |
20839 | { | |
20840 | CPU_LDoubleU temp; | |
20841 | ||
20842 | temp.d = f; | |
20843 | stq_data(ptr, temp.l.lower); | |
20844 | stw_data(ptr + 8, temp.l.upper); | |
20845 | } | |
20846 | # 112 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
20847 | static __attribute__ (( always_inline )) __inline__ uint32_t compute_eflags(void) | |
20848 | { | |
20849 | return env->eflags | helper_cc_compute_all((env->cc_op)) | ((env->df) & 0x00000400); | |
20850 | } | |
20851 | ||
20852 | ||
20853 | static __attribute__ (( always_inline )) __inline__ void load_eflags(int eflags, int update_mask) | |
20854 | { | |
20855 | (env->cc_src) = eflags & (0x0800 | 0x0080 | 0x0040 | 0x0010 | 0x0004 | 0x0001); | |
20856 | (env->df) = 1 - (2 * ((eflags >> 10) & 1)); | |
20857 | env->eflags = (env->eflags & ~update_mask) | | |
20858 | (eflags & update_mask) | 0x2; | |
20859 | } | |
20860 | ||
20861 | ||
20862 | ||
20863 | static __attribute__ (( always_inline )) __inline__ void cpu_load_efer(CPUX86State *env, uint64_t val) | |
20864 | { | |
20865 | env->efer = val; | |
20866 | env->hflags &= ~((1 << 14) | (1 << 20)); | |
20867 | if (env->efer & (1 << 10)) { | |
20868 | env->hflags |= (1 << 14); | |
20869 | } | |
20870 | if (env->efer & (1 << 12)) { | |
20871 | env->hflags |= (1 << 20); | |
20872 | } | |
20873 | } | |
20874 | # 148 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
20875 | static void __attribute__ ((__noreturn__)) raise_exception_err(int exception_index, | |
20876 | int error_code); | |
20877 | ||
20878 | static const uint8_t parity_table[256] = { | |
20879 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20880 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20881 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20882 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20883 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20884 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20885 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20886 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20887 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20888 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20889 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20890 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20891 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20892 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20893 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20894 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20895 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20896 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20897 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20898 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20899 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20900 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20901 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20902 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20903 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20904 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20905 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20906 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20907 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20908 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20909 | 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, | |
20910 | 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, | |
20911 | }; | |
20912 | ||
20913 | ||
20914 | static const uint8_t rclw_table[32] = { | |
20915 | 0, 1, 2, 3, 4, 5, 6, 7, | |
20916 | 8, 9,10,11,12,13,14,15, | |
20917 | 16, 0, 1, 2, 3, 4, 5, 6, | |
20918 | 7, 8, 9,10,11,12,13,14, | |
20919 | }; | |
20920 | ||
20921 | ||
20922 | static const uint8_t rclb_table[32] = { | |
20923 | 0, 1, 2, 3, 4, 5, 6, 7, | |
20924 | 8, 0, 1, 2, 3, 4, 5, 6, | |
20925 | 7, 8, 0, 1, 2, 3, 4, 5, | |
20926 | 6, 7, 8, 0, 1, 2, 3, 4, | |
20927 | }; | |
20928 | ||
20929 | ||
20930 | ||
20931 | ||
20932 | ||
20933 | ||
20934 | ||
20935 | static spinlock_t global_cpu_lock = 0; | |
20936 | ||
20937 | void helper_lock(void) | |
20938 | { | |
20939 | spin_lock(&global_cpu_lock); | |
20940 | } | |
20941 | ||
20942 | void helper_unlock(void) | |
20943 | { | |
20944 | spin_unlock(&global_cpu_lock); | |
20945 | } | |
20946 | ||
20947 | void helper_write_eflags(target_ulong t0, uint32_t update_mask) | |
20948 | { | |
20949 | load_eflags(t0, update_mask); | |
20950 | } | |
20951 | ||
20952 | target_ulong helper_read_eflags(void) | |
20953 | { | |
20954 | uint32_t eflags; | |
20955 | eflags = helper_cc_compute_all((env->cc_op)); | |
20956 | eflags |= ((env->df) & 0x00000400); | |
20957 | eflags |= env->eflags & ~(0x00020000 | 0x00010000); | |
20958 | return eflags; | |
20959 | } | |
20960 | ||
20961 | ||
20962 | static __attribute__ (( always_inline )) __inline__ int load_segment(uint32_t *e1_ptr, uint32_t *e2_ptr, | |
20963 | int selector) | |
20964 | { | |
20965 | SegmentCache *dt; | |
20966 | int index; | |
20967 | target_ulong ptr; | |
20968 | ||
20969 | if (selector & 0x4) | |
20970 | dt = &env->ldt; | |
20971 | else | |
20972 | dt = &env->gdt; | |
20973 | index = selector & ~7; | |
20974 | if ((index + 7) > dt->limit) | |
20975 | return -1; | |
20976 | ptr = dt->base + index; | |
20977 | *e1_ptr = ldl_kernel(ptr); | |
20978 | *e2_ptr = ldl_kernel(ptr + 4); | |
20979 | return 0; | |
20980 | } | |
20981 | ||
20982 | static __attribute__ (( always_inline )) __inline__ unsigned int get_seg_limit(uint32_t e1, uint32_t e2) | |
20983 | { | |
20984 | unsigned int limit; | |
20985 | limit = (e1 & 0xffff) | (e2 & 0x000f0000); | |
20986 | if (e2 & (1 << 23)) | |
20987 | limit = (limit << 12) | 0xfff; | |
20988 | return limit; | |
20989 | } | |
20990 | ||
20991 | static __attribute__ (( always_inline )) __inline__ uint32_t get_seg_base(uint32_t e1, uint32_t e2) | |
20992 | { | |
20993 | return ((e1 >> 16) | ((e2 & 0xff) << 16) | (e2 & 0xff000000)); | |
20994 | } | |
20995 | ||
20996 | static __attribute__ (( always_inline )) __inline__ void load_seg_cache_raw_dt(SegmentCache *sc, uint32_t e1, uint32_t e2) | |
20997 | { | |
20998 | sc->base = get_seg_base(e1, e2); | |
20999 | sc->limit = get_seg_limit(e1, e2); | |
21000 | sc->flags = e2; | |
21001 | } | |
21002 | ||
21003 | ||
21004 | static __attribute__ (( always_inline )) __inline__ void load_seg_vm(int seg, int selector) | |
21005 | { | |
21006 | selector &= 0xffff; | |
21007 | cpu_x86_load_seg_cache(env, seg, selector, | |
21008 | (selector << 4), 0xffff, 0); | |
21009 | } | |
21010 | ||
21011 | static __attribute__ (( always_inline )) __inline__ void get_ss_esp_from_tss(uint32_t *ss_ptr, | |
21012 | uint32_t *esp_ptr, int dpl) | |
21013 | { | |
21014 | int type, index, shift; | |
21015 | # 301 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
21016 | if (!(env->tr.flags & (1 << 15))) | |
21017 | cpu_abort(env, "invalid tss"); | |
21018 | type = (env->tr.flags >> 8) & 0xf; | |
21019 | if ((type & 7) != 1) | |
21020 | cpu_abort(env, "invalid tss type"); | |
21021 | shift = type >> 3; | |
21022 | index = (dpl * 4 + 2) << shift; | |
21023 | if (index + (4 << shift) - 1 > env->tr.limit) | |
21024 | raise_exception_err(10, env->tr.selector & 0xfffc); | |
21025 | if (shift == 0) { | |
21026 | *esp_ptr = lduw_kernel(env->tr.base + index); | |
21027 | *ss_ptr = lduw_kernel(env->tr.base + index + 2); | |
21028 | } else { | |
21029 | *esp_ptr = ldl_kernel(env->tr.base + index); | |
21030 | *ss_ptr = lduw_kernel(env->tr.base + index + 4); | |
21031 | } | |
21032 | } | |
21033 | ||
21034 | ||
21035 | static void tss_load_seg(int seg_reg, int selector) | |
21036 | { | |
21037 | uint32_t e1, e2; | |
21038 | int rpl, dpl, cpl; | |
21039 | ||
21040 | if ((selector & 0xfffc) != 0) { | |
21041 | if (load_segment(&e1, &e2, selector) != 0) | |
21042 | raise_exception_err(10, selector & 0xfffc); | |
21043 | if (!(e2 & (1 << 12))) | |
21044 | raise_exception_err(10, selector & 0xfffc); | |
21045 | rpl = selector & 3; | |
21046 | dpl = (e2 >> 13) & 3; | |
21047 | cpl = env->hflags & (3 << 0); | |
21048 | if (seg_reg == 1) { | |
21049 | if (!(e2 & (1 << 11))) | |
21050 | raise_exception_err(10, selector & 0xfffc); | |
21051 | ||
21052 | if (dpl != rpl) | |
21053 | raise_exception_err(10, selector & 0xfffc); | |
21054 | if ((e2 & (1 << 10)) && dpl > rpl) | |
21055 | raise_exception_err(10, selector & 0xfffc); | |
21056 | } else if (seg_reg == 2) { | |
21057 | ||
21058 | if ((e2 & (1 << 11)) || !(e2 & (1 << 9))) | |
21059 | raise_exception_err(10, selector & 0xfffc); | |
21060 | if (dpl != cpl || dpl != rpl) | |
21061 | raise_exception_err(10, selector & 0xfffc); | |
21062 | } else { | |
21063 | ||
21064 | if ((e2 & (1 << 11)) && !(e2 & (1 << 9))) | |
21065 | raise_exception_err(10, selector & 0xfffc); | |
21066 | ||
21067 | if (((e2 >> 8) & 0xf) < 12) { | |
21068 | if (dpl < cpl || dpl < rpl) | |
21069 | raise_exception_err(10, selector & 0xfffc); | |
21070 | } | |
21071 | } | |
21072 | if (!(e2 & (1 << 15))) | |
21073 | raise_exception_err(11, selector & 0xfffc); | |
21074 | cpu_x86_load_seg_cache(env, seg_reg, selector, | |
21075 | get_seg_base(e1, e2), | |
21076 | get_seg_limit(e1, e2), | |
21077 | e2); | |
21078 | } else { | |
21079 | if (seg_reg == 2 || seg_reg == 1) | |
21080 | raise_exception_err(10, selector & 0xfffc); | |
21081 | } | |
21082 | } | |
21083 | ||
21084 | ||
21085 | ||
21086 | ||
21087 | ||
21088 | ||
21089 | static void switch_tss(int tss_selector, | |
21090 | uint32_t e1, uint32_t e2, int source, | |
21091 | uint32_t next_eip) | |
21092 | { | |
21093 | int tss_limit, tss_limit_max, type, old_tss_limit_max, old_type, v1, v2, i; | |
21094 | target_ulong tss_base; | |
21095 | uint32_t new_regs[8], new_segs[6]; | |
21096 | uint32_t new_eflags, new_eip, new_cr3, new_ldt, new_trap; | |
21097 | uint32_t old_eflags, eflags_mask; | |
21098 | SegmentCache *dt; | |
21099 | int index; | |
21100 | target_ulong ptr; | |
21101 | ||
21102 | type = (e2 >> 8) & 0xf; | |
21103 | do { } while (0); | |
21104 | ||
21105 | ||
21106 | if (type == 5) { | |
21107 | if (!(e2 & (1 << 15))) | |
21108 | raise_exception_err(11, tss_selector & 0xfffc); | |
21109 | tss_selector = e1 >> 16; | |
21110 | if (tss_selector & 4) | |
21111 | raise_exception_err(10, tss_selector & 0xfffc); | |
21112 | if (load_segment(&e1, &e2, tss_selector) != 0) | |
21113 | raise_exception_err(13, tss_selector & 0xfffc); | |
21114 | if (e2 & (1 << 12)) | |
21115 | raise_exception_err(13, tss_selector & 0xfffc); | |
21116 | type = (e2 >> 8) & 0xf; | |
21117 | if ((type & 7) != 1) | |
21118 | raise_exception_err(13, tss_selector & 0xfffc); | |
21119 | } | |
21120 | ||
21121 | if (!(e2 & (1 << 15))) | |
21122 | raise_exception_err(11, tss_selector & 0xfffc); | |
21123 | ||
21124 | if (type & 8) | |
21125 | tss_limit_max = 103; | |
21126 | else | |
21127 | tss_limit_max = 43; | |
21128 | tss_limit = get_seg_limit(e1, e2); | |
21129 | tss_base = get_seg_base(e1, e2); | |
21130 | if ((tss_selector & 4) != 0 || | |
21131 | tss_limit < tss_limit_max) | |
21132 | raise_exception_err(10, tss_selector & 0xfffc); | |
21133 | old_type = (env->tr.flags >> 8) & 0xf; | |
21134 | if (old_type & 8) | |
21135 | old_tss_limit_max = 103; | |
21136 | else | |
21137 | old_tss_limit_max = 43; | |
21138 | ||
21139 | ||
21140 | if (type & 8) { | |
21141 | ||
21142 | new_cr3 = ldl_kernel(tss_base + 0x1c); | |
21143 | new_eip = ldl_kernel(tss_base + 0x20); | |
21144 | new_eflags = ldl_kernel(tss_base + 0x24); | |
21145 | for(i = 0; i < 8; i++) | |
21146 | new_regs[i] = ldl_kernel(tss_base + (0x28 + i * 4)); | |
21147 | for(i = 0; i < 6; i++) | |
21148 | new_segs[i] = lduw_kernel(tss_base + (0x48 + i * 4)); | |
21149 | new_ldt = lduw_kernel(tss_base + 0x60); | |
21150 | new_trap = ldl_kernel(tss_base + 0x64); | |
21151 | } else { | |
21152 | ||
21153 | new_cr3 = 0; | |
21154 | new_eip = lduw_kernel(tss_base + 0x0e); | |
21155 | new_eflags = lduw_kernel(tss_base + 0x10); | |
21156 | for(i = 0; i < 8; i++) | |
21157 | new_regs[i] = lduw_kernel(tss_base + (0x12 + i * 2)) | 0xffff0000; | |
21158 | for(i = 0; i < 4; i++) | |
21159 | new_segs[i] = lduw_kernel(tss_base + (0x22 + i * 4)); | |
21160 | new_ldt = lduw_kernel(tss_base + 0x2a); | |
21161 | new_segs[4] = 0; | |
21162 | new_segs[5] = 0; | |
21163 | new_trap = 0; | |
21164 | } | |
21165 | ||
21166 | ||
21167 | ||
21168 | (void)new_trap; | |
21169 | ||
21170 | ||
21171 | ||
21172 | ||
21173 | ||
21174 | ||
21175 | v1 = ldub_kernel(env->tr.base); | |
21176 | v2 = ldub_kernel(env->tr.base + old_tss_limit_max); | |
21177 | stb_kernel(env->tr.base, v1); | |
21178 | stb_kernel(env->tr.base + old_tss_limit_max, v2); | |
21179 | ||
21180 | ||
21181 | if (source == 0 || source == 1) { | |
21182 | target_ulong ptr; | |
21183 | uint32_t e2; | |
21184 | ptr = env->gdt.base + (env->tr.selector & ~7); | |
21185 | e2 = ldl_kernel(ptr + 4); | |
21186 | e2 &= ~(1 << 9); | |
21187 | stl_kernel(ptr + 4, e2); | |
21188 | } | |
21189 | old_eflags = compute_eflags(); | |
21190 | if (source == 1) | |
21191 | old_eflags &= ~0x00004000; | |
21192 | ||
21193 | ||
21194 | if (type & 8) { | |
21195 | ||
21196 | stl_kernel(env->tr.base + 0x20, next_eip); | |
21197 | stl_kernel(env->tr.base + 0x24, old_eflags); | |
21198 | stl_kernel(env->tr.base + (0x28 + 0 * 4), (env->regs[0])); | |
21199 | stl_kernel(env->tr.base + (0x28 + 1 * 4), (env->regs[1])); | |
21200 | stl_kernel(env->tr.base + (0x28 + 2 * 4), (env->regs[2])); | |
21201 | stl_kernel(env->tr.base + (0x28 + 3 * 4), (env->regs[3])); | |
21202 | stl_kernel(env->tr.base + (0x28 + 4 * 4), (env->regs[4])); | |
21203 | stl_kernel(env->tr.base + (0x28 + 5 * 4), (env->regs[5])); | |
21204 | stl_kernel(env->tr.base + (0x28 + 6 * 4), (env->regs[6])); | |
21205 | stl_kernel(env->tr.base + (0x28 + 7 * 4), (env->regs[7])); | |
21206 | for(i = 0; i < 6; i++) | |
21207 | stw_kernel(env->tr.base + (0x48 + i * 4), env->segs[i].selector); | |
21208 | } else { | |
21209 | ||
21210 | stw_kernel(env->tr.base + 0x0e, next_eip); | |
21211 | stw_kernel(env->tr.base + 0x10, old_eflags); | |
21212 | stw_kernel(env->tr.base + (0x12 + 0 * 2), (env->regs[0])); | |
21213 | stw_kernel(env->tr.base + (0x12 + 1 * 2), (env->regs[1])); | |
21214 | stw_kernel(env->tr.base + (0x12 + 2 * 2), (env->regs[2])); | |
21215 | stw_kernel(env->tr.base + (0x12 + 3 * 2), (env->regs[3])); | |
21216 | stw_kernel(env->tr.base + (0x12 + 4 * 2), (env->regs[4])); | |
21217 | stw_kernel(env->tr.base + (0x12 + 5 * 2), (env->regs[5])); | |
21218 | stw_kernel(env->tr.base + (0x12 + 6 * 2), (env->regs[6])); | |
21219 | stw_kernel(env->tr.base + (0x12 + 7 * 2), (env->regs[7])); | |
21220 | for(i = 0; i < 4; i++) | |
21221 | stw_kernel(env->tr.base + (0x22 + i * 4), env->segs[i].selector); | |
21222 | } | |
21223 | ||
21224 | ||
21225 | ||
21226 | ||
21227 | if (source == 2) { | |
21228 | stw_kernel(tss_base, env->tr.selector); | |
21229 | new_eflags |= 0x00004000; | |
21230 | } | |
21231 | ||
21232 | ||
21233 | if (source == 0 || source == 2) { | |
21234 | target_ulong ptr; | |
21235 | uint32_t e2; | |
21236 | ptr = env->gdt.base + (tss_selector & ~7); | |
21237 | e2 = ldl_kernel(ptr + 4); | |
21238 | e2 |= (1 << 9); | |
21239 | stl_kernel(ptr + 4, e2); | |
21240 | } | |
21241 | ||
21242 | ||
21243 | ||
21244 | env->cr[0] |= (1 << 3); | |
21245 | env->hflags |= (1 << 11); | |
21246 | env->tr.selector = tss_selector; | |
21247 | env->tr.base = tss_base; | |
21248 | env->tr.limit = tss_limit; | |
21249 | env->tr.flags = e2 & ~(1 << 9); | |
21250 | ||
21251 | if ((type & 8) && (env->cr[0] & (1 << 31))) { | |
21252 | cpu_x86_update_cr3(env, new_cr3); | |
21253 | } | |
21254 | ||
21255 | ||
21256 | ||
21257 | env->eip = new_eip; | |
21258 | eflags_mask = 0x00000100 | 0x00040000 | 0x00200000 | | |
21259 | 0x00000200 | 0x00003000 | 0x00020000 | 0x00010000 | 0x00004000; | |
21260 | if (!(type & 8)) | |
21261 | eflags_mask &= 0xffff; | |
21262 | load_eflags(new_eflags, eflags_mask); | |
21263 | ||
21264 | (env->regs[0]) = new_regs[0]; | |
21265 | (env->regs[1]) = new_regs[1]; | |
21266 | (env->regs[2]) = new_regs[2]; | |
21267 | (env->regs[3]) = new_regs[3]; | |
21268 | (env->regs[4]) = new_regs[4]; | |
21269 | (env->regs[5]) = new_regs[5]; | |
21270 | (env->regs[6]) = new_regs[6]; | |
21271 | (env->regs[7]) = new_regs[7]; | |
21272 | if (new_eflags & 0x00020000) { | |
21273 | for(i = 0; i < 6; i++) | |
21274 | load_seg_vm(i, new_segs[i]); | |
21275 | ||
21276 | cpu_x86_set_cpl(env, 3); | |
21277 | } else { | |
21278 | ||
21279 | cpu_x86_set_cpl(env, new_segs[1] & 3); | |
21280 | ||
21281 | for(i = 0; i < 6; i++) | |
21282 | cpu_x86_load_seg_cache(env, i, new_segs[i], 0, 0, 0); | |
21283 | } | |
21284 | ||
21285 | env->ldt.selector = new_ldt & ~4; | |
21286 | env->ldt.base = 0; | |
21287 | env->ldt.limit = 0; | |
21288 | env->ldt.flags = 0; | |
21289 | ||
21290 | ||
21291 | if (new_ldt & 4) | |
21292 | raise_exception_err(10, new_ldt & 0xfffc); | |
21293 | ||
21294 | if ((new_ldt & 0xfffc) != 0) { | |
21295 | dt = &env->gdt; | |
21296 | index = new_ldt & ~7; | |
21297 | if ((index + 7) > dt->limit) | |
21298 | raise_exception_err(10, new_ldt & 0xfffc); | |
21299 | ptr = dt->base + index; | |
21300 | e1 = ldl_kernel(ptr); | |
21301 | e2 = ldl_kernel(ptr + 4); | |
21302 | if ((e2 & (1 << 12)) || ((e2 >> 8) & 0xf) != 2) | |
21303 | raise_exception_err(10, new_ldt & 0xfffc); | |
21304 | if (!(e2 & (1 << 15))) | |
21305 | raise_exception_err(10, new_ldt & 0xfffc); | |
21306 | load_seg_cache_raw_dt(&env->ldt, e1, e2); | |
21307 | } | |
21308 | ||
21309 | ||
21310 | if (!(new_eflags & 0x00020000)) { | |
21311 | tss_load_seg(1, new_segs[1]); | |
21312 | tss_load_seg(2, new_segs[2]); | |
21313 | tss_load_seg(0, new_segs[0]); | |
21314 | tss_load_seg(3, new_segs[3]); | |
21315 | tss_load_seg(4, new_segs[4]); | |
21316 | tss_load_seg(5, new_segs[5]); | |
21317 | } | |
21318 | ||
21319 | ||
21320 | if (new_eip > env->segs[1].limit) { | |
21321 | ||
21322 | raise_exception_err(13, 0); | |
21323 | } | |
21324 | ||
21325 | ||
21326 | ||
21327 | if (env->dr[7] & 0x55) { | |
21328 | for (i = 0; i < 4; i++) { | |
21329 | if (hw_breakpoint_enabled(env->dr[7], i) == 0x1) | |
21330 | hw_breakpoint_remove(env, i); | |
21331 | } | |
21332 | env->dr[7] &= ~0x55; | |
21333 | } | |
21334 | ||
21335 | } | |
21336 | ||
21337 | ||
21338 | static __attribute__ (( always_inline )) __inline__ void check_io(int addr, int size) | |
21339 | { | |
21340 | int io_offset, val, mask; | |
21341 | ||
21342 | ||
21343 | if (!(env->tr.flags & (1 << 15)) || | |
21344 | ((env->tr.flags >> 8) & 0xf) != 9 || | |
21345 | env->tr.limit < 103) | |
21346 | goto fail; | |
21347 | io_offset = lduw_kernel(env->tr.base + 0x66); | |
21348 | io_offset += (addr >> 3); | |
21349 | ||
21350 | if ((io_offset + 1) > env->tr.limit) | |
21351 | goto fail; | |
21352 | val = lduw_kernel(env->tr.base + io_offset); | |
21353 | val >>= (addr & 7); | |
21354 | mask = (1 << size) - 1; | |
21355 | ||
21356 | if ((val & mask) != 0) { | |
21357 | fail: | |
21358 | raise_exception_err(13, 0); | |
21359 | } | |
21360 | } | |
21361 | ||
21362 | void helper_check_iob(uint32_t t0) | |
21363 | { | |
21364 | check_io(t0, 1); | |
21365 | } | |
21366 | ||
21367 | void helper_check_iow(uint32_t t0) | |
21368 | { | |
21369 | check_io(t0, 2); | |
21370 | } | |
21371 | ||
21372 | void helper_check_iol(uint32_t t0) | |
21373 | { | |
21374 | check_io(t0, 4); | |
21375 | } | |
21376 | ||
21377 | void helper_outb(uint32_t port, uint32_t data) | |
21378 | { | |
21379 | cpu_outb(port, data & 0xff); | |
21380 | } | |
21381 | ||
21382 | target_ulong helper_inb(uint32_t port) | |
21383 | { | |
21384 | return cpu_inb(port); | |
21385 | } | |
21386 | ||
21387 | void helper_outw(uint32_t port, uint32_t data) | |
21388 | { | |
21389 | cpu_outw(port, data & 0xffff); | |
21390 | } | |
21391 | ||
21392 | target_ulong helper_inw(uint32_t port) | |
21393 | { | |
21394 | return cpu_inw(port); | |
21395 | } | |
21396 | ||
21397 | void helper_outl(uint32_t port, uint32_t data) | |
21398 | { | |
21399 | cpu_outl(port, data); | |
21400 | } | |
21401 | ||
21402 | target_ulong helper_inl(uint32_t port) | |
21403 | { | |
21404 | return cpu_inl(port); | |
21405 | } | |
21406 | ||
21407 | static __attribute__ (( always_inline )) __inline__ unsigned int get_sp_mask(unsigned int e2) | |
21408 | { | |
21409 | if (e2 & (1 << 22)) | |
21410 | return 0xffffffff; | |
21411 | else | |
21412 | return 0xffff; | |
21413 | } | |
21414 | ||
21415 | static int exeption_has_error_code(int intno) | |
21416 | { | |
21417 | switch(intno) { | |
21418 | case 8: | |
21419 | case 10: | |
21420 | case 11: | |
21421 | case 12: | |
21422 | case 13: | |
21423 | case 14: | |
21424 | case 17: | |
21425 | return 1; | |
21426 | } | |
21427 | return 0; | |
21428 | } | |
21429 | # 759 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
21430 | static void do_interrupt_protected(int intno, int is_int, int error_code, | |
21431 | unsigned int next_eip, int is_hw) | |
21432 | { | |
21433 | SegmentCache *dt; | |
21434 | target_ulong ptr, ssp; | |
21435 | int type, dpl, selector, ss_dpl, cpl; | |
21436 | int has_error_code, new_stack, shift; | |
21437 | uint32_t e1, e2, offset, ss = 0, esp, ss_e1 = 0, ss_e2 = 0; | |
21438 | uint32_t old_eip, sp_mask; | |
21439 | ||
21440 | has_error_code = 0; | |
21441 | if (!is_int && !is_hw) | |
21442 | has_error_code = exeption_has_error_code(intno); | |
21443 | if (is_int) | |
21444 | old_eip = next_eip; | |
21445 | else | |
21446 | old_eip = env->eip; | |
21447 | ||
21448 | dt = &env->idt; | |
21449 | if (intno * 8 + 7 > dt->limit) | |
21450 | raise_exception_err(13, intno * 8 + 2); | |
21451 | ptr = dt->base + intno * 8; | |
21452 | e1 = ldl_kernel(ptr); | |
21453 | e2 = ldl_kernel(ptr + 4); | |
21454 | ||
21455 | type = (e2 >> 8) & 0x1f; | |
21456 | switch(type) { | |
21457 | case 5: | |
21458 | ||
21459 | if (!(e2 & (1 << 15))) | |
21460 | raise_exception_err(11, intno * 8 + 2); | |
21461 | switch_tss(intno * 8, e1, e2, 2, old_eip); | |
21462 | if (has_error_code) { | |
21463 | int type; | |
21464 | uint32_t mask; | |
21465 | ||
21466 | type = (env->tr.flags >> 8) & 0xf; | |
21467 | shift = type >> 3; | |
21468 | if (env->segs[2].flags & (1 << 22)) | |
21469 | mask = 0xffffffff; | |
21470 | else | |
21471 | mask = 0xffff; | |
21472 | esp = ((env->regs[4]) - (2 << shift)) & mask; | |
21473 | ssp = env->segs[2].base + esp; | |
21474 | if (shift) | |
21475 | stl_kernel(ssp, error_code); | |
21476 | else | |
21477 | stw_kernel(ssp, error_code); | |
21478 | (env->regs[4]) = ((env->regs[4]) & ~(mask)) | ((esp) & (mask)); | |
21479 | } | |
21480 | return; | |
21481 | case 6: | |
21482 | case 7: | |
21483 | case 14: | |
21484 | case 15: | |
21485 | break; | |
21486 | default: | |
21487 | raise_exception_err(13, intno * 8 + 2); | |
21488 | break; | |
21489 | } | |
21490 | dpl = (e2 >> 13) & 3; | |
21491 | cpl = env->hflags & (3 << 0); | |
21492 | ||
21493 | if (is_int && dpl < cpl) | |
21494 | raise_exception_err(13, intno * 8 + 2); | |
21495 | ||
21496 | if (!(e2 & (1 << 15))) | |
21497 | raise_exception_err(11, intno * 8 + 2); | |
21498 | selector = e1 >> 16; | |
21499 | offset = (e2 & 0xffff0000) | (e1 & 0x0000ffff); | |
21500 | if ((selector & 0xfffc) == 0) | |
21501 | raise_exception_err(13, 0); | |
21502 | ||
21503 | if (load_segment(&e1, &e2, selector) != 0) | |
21504 | raise_exception_err(13, selector & 0xfffc); | |
21505 | if (!(e2 & (1 << 12)) || !(e2 & ((1 << 11)))) | |
21506 | raise_exception_err(13, selector & 0xfffc); | |
21507 | dpl = (e2 >> 13) & 3; | |
21508 | if (dpl > cpl) | |
21509 | raise_exception_err(13, selector & 0xfffc); | |
21510 | if (!(e2 & (1 << 15))) | |
21511 | raise_exception_err(11, selector & 0xfffc); | |
21512 | if (!(e2 & (1 << 10)) && dpl < cpl) { | |
21513 | ||
21514 | get_ss_esp_from_tss(&ss, &esp, dpl); | |
21515 | if ((ss & 0xfffc) == 0) | |
21516 | raise_exception_err(10, ss & 0xfffc); | |
21517 | if ((ss & 3) != dpl) | |
21518 | raise_exception_err(10, ss & 0xfffc); | |
21519 | if (load_segment(&ss_e1, &ss_e2, ss) != 0) | |
21520 | raise_exception_err(10, ss & 0xfffc); | |
21521 | ss_dpl = (ss_e2 >> 13) & 3; | |
21522 | if (ss_dpl != dpl) | |
21523 | raise_exception_err(10, ss & 0xfffc); | |
21524 | if (!(ss_e2 & (1 << 12)) || | |
21525 | (ss_e2 & (1 << 11)) || | |
21526 | !(ss_e2 & (1 << 9))) | |
21527 | raise_exception_err(10, ss & 0xfffc); | |
21528 | if (!(ss_e2 & (1 << 15))) | |
21529 | raise_exception_err(10, ss & 0xfffc); | |
21530 | new_stack = 1; | |
21531 | sp_mask = get_sp_mask(ss_e2); | |
21532 | ssp = get_seg_base(ss_e1, ss_e2); | |
21533 | } else if ((e2 & (1 << 10)) || dpl == cpl) { | |
21534 | ||
21535 | if (env->eflags & 0x00020000) | |
21536 | raise_exception_err(13, selector & 0xfffc); | |
21537 | new_stack = 0; | |
21538 | sp_mask = get_sp_mask(env->segs[2].flags); | |
21539 | ssp = env->segs[2].base; | |
21540 | esp = (env->regs[4]); | |
21541 | dpl = cpl; | |
21542 | } else { | |
21543 | raise_exception_err(13, selector & 0xfffc); | |
21544 | new_stack = 0; | |
21545 | sp_mask = 0; | |
21546 | ssp = 0; | |
21547 | esp = 0; | |
21548 | } | |
21549 | ||
21550 | shift = type >> 3; | |
21551 | # 888 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
21552 | if (shift == 1) { | |
21553 | if (new_stack) { | |
21554 | if (env->eflags & 0x00020000) { | |
21555 | { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(env->segs[5].selector));}; | |
21556 | { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(env->segs[4].selector));}; | |
21557 | { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(env->segs[3].selector));}; | |
21558 | { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(env->segs[0].selector));}; | |
21559 | } | |
21560 | { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(env->segs[2].selector));}; | |
21561 | { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)((env->regs[4])));}; | |
21562 | } | |
21563 | { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(compute_eflags()));}; | |
21564 | { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(env->segs[1].selector));}; | |
21565 | { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(old_eip));}; | |
21566 | if (has_error_code) { | |
21567 | { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(error_code));}; | |
21568 | } | |
21569 | } else { | |
21570 | if (new_stack) { | |
21571 | if (env->eflags & 0x00020000) { | |
21572 | { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (env->segs[5].selector));}; | |
21573 | { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (env->segs[4].selector));}; | |
21574 | { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (env->segs[3].selector));}; | |
21575 | { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (env->segs[0].selector));}; | |
21576 | } | |
21577 | { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (env->segs[2].selector));}; | |
21578 | { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), ((env->regs[4])));}; | |
21579 | } | |
21580 | { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (compute_eflags()));}; | |
21581 | { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (env->segs[1].selector));}; | |
21582 | { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (old_eip));}; | |
21583 | if (has_error_code) { | |
21584 | { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (error_code));}; | |
21585 | } | |
21586 | } | |
21587 | ||
21588 | if (new_stack) { | |
21589 | if (env->eflags & 0x00020000) { | |
21590 | cpu_x86_load_seg_cache(env, 0, 0, 0, 0, 0); | |
21591 | cpu_x86_load_seg_cache(env, 3, 0, 0, 0, 0); | |
21592 | cpu_x86_load_seg_cache(env, 4, 0, 0, 0, 0); | |
21593 | cpu_x86_load_seg_cache(env, 5, 0, 0, 0, 0); | |
21594 | } | |
21595 | ss = (ss & ~3) | dpl; | |
21596 | cpu_x86_load_seg_cache(env, 2, ss, | |
21597 | ssp, get_seg_limit(ss_e1, ss_e2), ss_e2); | |
21598 | } | |
21599 | (env->regs[4]) = ((env->regs[4]) & ~(sp_mask)) | ((esp) & (sp_mask)); | |
21600 | ||
21601 | selector = (selector & ~3) | dpl; | |
21602 | cpu_x86_load_seg_cache(env, 1, selector, | |
21603 | get_seg_base(e1, e2), | |
21604 | get_seg_limit(e1, e2), | |
21605 | e2); | |
21606 | cpu_x86_set_cpl(env, dpl); | |
21607 | env->eip = offset; | |
21608 | ||
21609 | ||
21610 | if ((type & 1) == 0) { | |
21611 | env->eflags &= ~0x00000200; | |
21612 | } | |
21613 | env->eflags &= ~(0x00000100 | 0x00020000 | 0x00010000 | 0x00004000); | |
21614 | } | |
21615 | # 1221 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
21616 | static void do_interrupt_real(int intno, int is_int, int error_code, | |
21617 | unsigned int next_eip) | |
21618 | { | |
21619 | SegmentCache *dt; | |
21620 | target_ulong ptr, ssp; | |
21621 | int selector; | |
21622 | uint32_t offset, esp; | |
21623 | uint32_t old_cs, old_eip; | |
21624 | ||
21625 | ||
21626 | dt = &env->idt; | |
21627 | if (intno * 4 + 3 > dt->limit) | |
21628 | raise_exception_err(13, intno * 8 + 2); | |
21629 | ptr = dt->base + intno * 4; | |
21630 | offset = lduw_kernel(ptr); | |
21631 | selector = lduw_kernel(ptr + 2); | |
21632 | esp = (env->regs[4]); | |
21633 | ssp = env->segs[2].base; | |
21634 | if (is_int) | |
21635 | old_eip = next_eip; | |
21636 | else | |
21637 | old_eip = env->eip; | |
21638 | old_cs = env->segs[1].selector; | |
21639 | ||
21640 | { esp -= 2; stw_kernel((ssp) + (esp & (0xffff)), (compute_eflags()));}; | |
21641 | { esp -= 2; stw_kernel((ssp) + (esp & (0xffff)), (old_cs));}; | |
21642 | { esp -= 2; stw_kernel((ssp) + (esp & (0xffff)), (old_eip));}; | |
21643 | ||
21644 | ||
21645 | (env->regs[4]) = ((env->regs[4]) & ~0xffff) | (esp & 0xffff); | |
21646 | env->eip = offset; | |
21647 | env->segs[1].selector = selector; | |
21648 | env->segs[1].base = (selector << 4); | |
21649 | env->eflags &= ~(0x00000200 | 0x00000100 | 0x00040000 | 0x00010000); | |
21650 | } | |
21651 | # 1291 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
21652 | static void handle_even_inj(int intno, int is_int, int error_code, | |
21653 | int is_hw, int rm) | |
21654 | { | |
21655 | uint32_t event_inj = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj)); | |
21656 | if (!(event_inj & (1 << 31))) { | |
21657 | int type; | |
21658 | if (is_int) | |
21659 | type = (4 << 8); | |
21660 | else | |
21661 | type = (3 << 8); | |
21662 | event_inj = intno | type | (1 << 31); | |
21663 | if (!rm && exeption_has_error_code(intno)) { | |
21664 | event_inj |= (1 << 11); | |
21665 | stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj_err), error_code); | |
21666 | } | |
21667 | stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj), event_inj); | |
21668 | } | |
21669 | } | |
21670 | ||
21671 | ||
21672 | ||
21673 | ||
21674 | ||
21675 | ||
21676 | ||
21677 | static void do_interrupt_all(int intno, int is_int, int error_code, | |
21678 | target_ulong next_eip, int is_hw) | |
21679 | { | |
21680 | if (((loglevel & ((1 << 4))) != 0)) { | |
21681 | if ((env->cr[0] & (1 << 0))) { | |
21682 | static int count; | |
21683 | do { if (logfile) fprintf(logfile,"%6d: v=%02x e=%04x i=%d cpl=%d IP=%04x:" "%08x" " pc=" "%08x" " SP=%04x:" "%08x", count, intno, error_code, is_int, env->hflags & (3 << 0), env->segs[1].selector, (env->eip), (int)env->segs[1].base + (env->eip), env->segs[2].selector, (env->regs[4])); } while (0) | |
21684 | ||
21685 | ||
21686 | ||
21687 | ||
21688 | ; | |
21689 | if (intno == 0x0e) { | |
21690 | do { if (logfile) fprintf(logfile," CR2=" "%08x", env->cr[2]); } while (0); | |
21691 | } else { | |
21692 | do { if (logfile) fprintf(logfile," EAX=" "%08x", (env->regs[0])); } while (0); | |
21693 | } | |
21694 | do { if (logfile) fprintf(logfile,"\n"); } while (0); | |
21695 | cpu_dump_state((env), logfile, fprintf, (0x0002));; | |
21696 | # 1347 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
21697 | count++; | |
21698 | } | |
21699 | } | |
21700 | if (env->cr[0] & (1 << 0)) { | |
21701 | ||
21702 | if (env->hflags & (1 << 21)) | |
21703 | handle_even_inj(intno, is_int, error_code, is_hw, 0); | |
21704 | ||
21705 | ||
21706 | ||
21707 | ||
21708 | ||
21709 | ||
21710 | { | |
21711 | do_interrupt_protected(intno, is_int, error_code, next_eip, is_hw); | |
21712 | } | |
21713 | } else { | |
21714 | ||
21715 | if (env->hflags & (1 << 21)) | |
21716 | handle_even_inj(intno, is_int, error_code, is_hw, 1); | |
21717 | ||
21718 | do_interrupt_real(intno, is_int, error_code, next_eip); | |
21719 | } | |
21720 | ||
21721 | ||
21722 | if (env->hflags & (1 << 21)) { | |
21723 | uint32_t event_inj = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj)); | |
21724 | stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj), event_inj & ~(1 << 31)); | |
21725 | } | |
21726 | ||
21727 | } | |
21728 | ||
21729 | void do_interrupt(CPUX86State *env1) | |
21730 | { | |
21731 | CPUX86State *saved_env; | |
21732 | ||
21733 | saved_env = env; | |
21734 | env = env1; | |
21735 | # 1399 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
21736 | do_interrupt_all(env->exception_index, | |
21737 | env->exception_is_int, | |
21738 | env->error_code, | |
21739 | env->exception_next_eip, 0); | |
21740 | ||
21741 | env->old_exception = -1; | |
21742 | ||
21743 | env = saved_env; | |
21744 | } | |
21745 | ||
21746 | void do_interrupt_x86_hardirq(CPUX86State *env1, int intno, int is_hw) | |
21747 | { | |
21748 | CPUX86State *saved_env; | |
21749 | ||
21750 | saved_env = env; | |
21751 | env = env1; | |
21752 | do_interrupt_all(intno, 0, 0, 0, is_hw); | |
21753 | env = saved_env; | |
21754 | } | |
21755 | ||
21756 | ||
21757 | void qemu_system_reset_request(void); | |
21758 | ||
21759 | ||
21760 | ||
21761 | ||
21762 | ||
21763 | ||
21764 | static int check_exception(int intno, int *error_code) | |
21765 | { | |
21766 | int first_contributory = env->old_exception == 0 || | |
21767 | (env->old_exception >= 10 && | |
21768 | env->old_exception <= 13); | |
21769 | int second_contributory = intno == 0 || | |
21770 | (intno >= 10 && intno <= 13); | |
21771 | ||
21772 | do { if (loglevel & ((1 << 4))) fprintf(logfile, "check_exception old: 0x%x new 0x%x\n", env->old_exception, intno); } while (0) | |
21773 | ; | |
21774 | ||
21775 | ||
21776 | if (env->old_exception == 8) { | |
21777 | if (env->hflags & (1 << 21)) | |
21778 | helper_vmexit(0x07f, 0); | |
21779 | ||
21780 | do { if (loglevel & ((1 << 9))) fprintf(logfile, "Triple fault\n"); } while (0); | |
21781 | ||
21782 | qemu_system_reset_request(); | |
21783 | return 0x10001; | |
21784 | } | |
21785 | ||
21786 | ||
21787 | if ((first_contributory && second_contributory) | |
21788 | || (env->old_exception == 14 && | |
21789 | (second_contributory || (intno == 14)))) { | |
21790 | intno = 8; | |
21791 | *error_code = 0; | |
21792 | } | |
21793 | ||
21794 | if (second_contributory || (intno == 14) || | |
21795 | (intno == 8)) | |
21796 | env->old_exception = intno; | |
21797 | ||
21798 | return intno; | |
21799 | } | |
21800 | ||
21801 | ||
21802 | ||
21803 | ||
21804 | ||
21805 | ||
21806 | ||
21807 | static void __attribute__ ((__noreturn__)) raise_interrupt(int intno, int is_int, int error_code, | |
21808 | int next_eip_addend) | |
21809 | { | |
21810 | if (!is_int) { | |
21811 | helper_svm_check_intercept_param(0x040 + intno, error_code); | |
21812 | intno = check_exception(intno, &error_code); | |
21813 | } else { | |
21814 | helper_svm_check_intercept_param(0x075, 0); | |
21815 | } | |
21816 | ||
21817 | env->exception_index = intno; | |
21818 | env->error_code = error_code; | |
21819 | env->exception_is_int = is_int; | |
21820 | env->exception_next_eip = env->eip + next_eip_addend; | |
21821 | cpu_loop_exit(env); | |
21822 | } | |
21823 | ||
21824 | ||
21825 | ||
21826 | static void __attribute__ ((__noreturn__)) raise_exception_err(int exception_index, | |
21827 | int error_code) | |
21828 | { | |
21829 | raise_interrupt(exception_index, 0, error_code, 0); | |
21830 | } | |
21831 | ||
21832 | void raise_exception_err_env(CPUX86State *nenv, int exception_index, | |
21833 | int error_code) | |
21834 | { | |
21835 | env = nenv; | |
21836 | raise_interrupt(exception_index, 0, error_code, 0); | |
21837 | } | |
21838 | ||
21839 | static void __attribute__ ((__noreturn__)) raise_exception(int exception_index) | |
21840 | { | |
21841 | raise_interrupt(exception_index, 0, 0, 0); | |
21842 | } | |
21843 | ||
21844 | void raise_exception_env(int exception_index, CPUX86State *nenv) | |
21845 | { | |
21846 | env = nenv; | |
21847 | raise_exception(exception_index); | |
21848 | } | |
21849 | # 1532 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
21850 | void do_smm_enter(CPUX86State *env1) | |
21851 | { | |
21852 | target_ulong sm_state; | |
21853 | SegmentCache *dt; | |
21854 | int i, offset; | |
21855 | CPUX86State *saved_env; | |
21856 | ||
21857 | saved_env = env; | |
21858 | env = env1; | |
21859 | ||
21860 | do { if (loglevel & ((1 << 4))) fprintf(logfile, "SMM: enter\n"); } while (0); | |
21861 | do { if (loglevel & ((1 << 4))) cpu_dump_state(((env)), logfile, fprintf, ((0x0002)));; } while (0); | |
21862 | ||
21863 | env->hflags |= (1 << 19); | |
21864 | cpu_smm_update(env); | |
21865 | ||
21866 | sm_state = env->smbase + 0x8000; | |
21867 | # 1600 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
21868 | stl_phys(sm_state + 0x7ffc, env->cr[0]); | |
21869 | stl_phys(sm_state + 0x7ff8, env->cr[3]); | |
21870 | stl_phys(sm_state + 0x7ff4, compute_eflags()); | |
21871 | stl_phys(sm_state + 0x7ff0, env->eip); | |
21872 | stl_phys(sm_state + 0x7fec, (env->regs[7])); | |
21873 | stl_phys(sm_state + 0x7fe8, (env->regs[6])); | |
21874 | stl_phys(sm_state + 0x7fe4, (env->regs[5])); | |
21875 | stl_phys(sm_state + 0x7fe0, (env->regs[4])); | |
21876 | stl_phys(sm_state + 0x7fdc, (env->regs[3])); | |
21877 | stl_phys(sm_state + 0x7fd8, (env->regs[2])); | |
21878 | stl_phys(sm_state + 0x7fd4, (env->regs[1])); | |
21879 | stl_phys(sm_state + 0x7fd0, (env->regs[0])); | |
21880 | stl_phys(sm_state + 0x7fcc, env->dr[6]); | |
21881 | stl_phys(sm_state + 0x7fc8, env->dr[7]); | |
21882 | ||
21883 | stl_phys(sm_state + 0x7fc4, env->tr.selector); | |
21884 | stl_phys(sm_state + 0x7f64, env->tr.base); | |
21885 | stl_phys(sm_state + 0x7f60, env->tr.limit); | |
21886 | stl_phys(sm_state + 0x7f5c, (env->tr.flags >> 8) & 0xf0ff); | |
21887 | ||
21888 | stl_phys(sm_state + 0x7fc0, env->ldt.selector); | |
21889 | stl_phys(sm_state + 0x7f80, env->ldt.base); | |
21890 | stl_phys(sm_state + 0x7f7c, env->ldt.limit); | |
21891 | stl_phys(sm_state + 0x7f78, (env->ldt.flags >> 8) & 0xf0ff); | |
21892 | ||
21893 | stl_phys(sm_state + 0x7f74, env->gdt.base); | |
21894 | stl_phys(sm_state + 0x7f70, env->gdt.limit); | |
21895 | ||
21896 | stl_phys(sm_state + 0x7f58, env->idt.base); | |
21897 | stl_phys(sm_state + 0x7f54, env->idt.limit); | |
21898 | ||
21899 | for(i = 0; i < 6; i++) { | |
21900 | dt = &env->segs[i]; | |
21901 | if (i < 3) | |
21902 | offset = 0x7f84 + i * 12; | |
21903 | else | |
21904 | offset = 0x7f2c + (i - 3) * 12; | |
21905 | stl_phys(sm_state + 0x7fa8 + i * 4, dt->selector); | |
21906 | stl_phys(sm_state + offset + 8, dt->base); | |
21907 | stl_phys(sm_state + offset + 4, dt->limit); | |
21908 | stl_phys(sm_state + offset, (dt->flags >> 8) & 0xf0ff); | |
21909 | } | |
21910 | stl_phys(sm_state + 0x7f14, env->cr[4]); | |
21911 | ||
21912 | stl_phys(sm_state + 0x7efc, 0x00020000); | |
21913 | stl_phys(sm_state + 0x7ef8, env->smbase); | |
21914 | ||
21915 | ||
21916 | ||
21917 | ||
21918 | ||
21919 | ||
21920 | load_eflags(0, ~(0x0800 | 0x0080 | 0x0040 | 0x0010 | 0x0004 | 0x0001 | 0x00000400)); | |
21921 | env->eip = 0x00008000; | |
21922 | cpu_x86_load_seg_cache(env, 1, (env->smbase >> 4) & 0xffff, env->smbase, | |
21923 | 0xffffffff, 0); | |
21924 | cpu_x86_load_seg_cache(env, 3, 0, 0, 0xffffffff, 0); | |
21925 | cpu_x86_load_seg_cache(env, 0, 0, 0, 0xffffffff, 0); | |
21926 | cpu_x86_load_seg_cache(env, 2, 0, 0, 0xffffffff, 0); | |
21927 | cpu_x86_load_seg_cache(env, 4, 0, 0, 0xffffffff, 0); | |
21928 | cpu_x86_load_seg_cache(env, 5, 0, 0, 0xffffffff, 0); | |
21929 | ||
21930 | cpu_x86_update_cr0(env, | |
21931 | env->cr[0] & ~((1 << 0) | (1 << 2) | (1 << 3) | (1 << 31))); | |
21932 | cpu_x86_update_cr4(env, 0); | |
21933 | env->dr[7] = 0x00000400; | |
21934 | (env->cc_op) = CC_OP_EFLAGS; | |
21935 | env = saved_env; | |
21936 | } | |
21937 | ||
21938 | void helper_rsm(void) | |
21939 | { | |
21940 | target_ulong sm_state; | |
21941 | int i, offset; | |
21942 | uint32_t val; | |
21943 | ||
21944 | sm_state = env->smbase + 0x8000; | |
21945 | # 1730 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
21946 | cpu_x86_update_cr0(env, ldl_phys(sm_state + 0x7ffc)); | |
21947 | cpu_x86_update_cr3(env, ldl_phys(sm_state + 0x7ff8)); | |
21948 | load_eflags(ldl_phys(sm_state + 0x7ff4), | |
21949 | ~(0x0800 | 0x0080 | 0x0040 | 0x0010 | 0x0004 | 0x0001 | 0x00000400)); | |
21950 | env->eip = ldl_phys(sm_state + 0x7ff0); | |
21951 | (env->regs[7]) = ldl_phys(sm_state + 0x7fec); | |
21952 | (env->regs[6]) = ldl_phys(sm_state + 0x7fe8); | |
21953 | (env->regs[5]) = ldl_phys(sm_state + 0x7fe4); | |
21954 | (env->regs[4]) = ldl_phys(sm_state + 0x7fe0); | |
21955 | (env->regs[3]) = ldl_phys(sm_state + 0x7fdc); | |
21956 | (env->regs[2]) = ldl_phys(sm_state + 0x7fd8); | |
21957 | (env->regs[1]) = ldl_phys(sm_state + 0x7fd4); | |
21958 | (env->regs[0]) = ldl_phys(sm_state + 0x7fd0); | |
21959 | env->dr[6] = ldl_phys(sm_state + 0x7fcc); | |
21960 | env->dr[7] = ldl_phys(sm_state + 0x7fc8); | |
21961 | ||
21962 | env->tr.selector = ldl_phys(sm_state + 0x7fc4) & 0xffff; | |
21963 | env->tr.base = ldl_phys(sm_state + 0x7f64); | |
21964 | env->tr.limit = ldl_phys(sm_state + 0x7f60); | |
21965 | env->tr.flags = (ldl_phys(sm_state + 0x7f5c) & 0xf0ff) << 8; | |
21966 | ||
21967 | env->ldt.selector = ldl_phys(sm_state + 0x7fc0) & 0xffff; | |
21968 | env->ldt.base = ldl_phys(sm_state + 0x7f80); | |
21969 | env->ldt.limit = ldl_phys(sm_state + 0x7f7c); | |
21970 | env->ldt.flags = (ldl_phys(sm_state + 0x7f78) & 0xf0ff) << 8; | |
21971 | ||
21972 | env->gdt.base = ldl_phys(sm_state + 0x7f74); | |
21973 | env->gdt.limit = ldl_phys(sm_state + 0x7f70); | |
21974 | ||
21975 | env->idt.base = ldl_phys(sm_state + 0x7f58); | |
21976 | env->idt.limit = ldl_phys(sm_state + 0x7f54); | |
21977 | ||
21978 | for(i = 0; i < 6; i++) { | |
21979 | if (i < 3) | |
21980 | offset = 0x7f84 + i * 12; | |
21981 | else | |
21982 | offset = 0x7f2c + (i - 3) * 12; | |
21983 | cpu_x86_load_seg_cache(env, i, | |
21984 | ldl_phys(sm_state + 0x7fa8 + i * 4) & 0xffff, | |
21985 | ldl_phys(sm_state + offset + 8), | |
21986 | ldl_phys(sm_state + offset + 4), | |
21987 | (ldl_phys(sm_state + offset) & 0xf0ff) << 8); | |
21988 | } | |
21989 | cpu_x86_update_cr4(env, ldl_phys(sm_state + 0x7f14)); | |
21990 | ||
21991 | val = ldl_phys(sm_state + 0x7efc); | |
21992 | if (val & 0x20000) { | |
21993 | env->smbase = ldl_phys(sm_state + 0x7ef8) & ~0x7fff; | |
21994 | } | |
21995 | ||
21996 | (env->cc_op) = CC_OP_EFLAGS; | |
21997 | env->hflags &= ~(1 << 19); | |
21998 | cpu_smm_update(env); | |
21999 | ||
22000 | do { if (loglevel & ((1 << 4))) fprintf(logfile, "SMM: after RSM\n"); } while (0); | |
22001 | do { if (loglevel & ((1 << 4))) cpu_dump_state(((env)), logfile, fprintf, ((0x0002)));; } while (0); | |
22002 | } | |
22003 | ||
22004 | ||
22005 | ||
22006 | ||
22007 | ||
22008 | ||
22009 | void helper_divb_AL(target_ulong t0) | |
22010 | { | |
22011 | unsigned int num, den, q, r; | |
22012 | ||
22013 | num = ((env->regs[0]) & 0xffff); | |
22014 | den = (t0 & 0xff); | |
22015 | if (den == 0) { | |
22016 | raise_exception(0); | |
22017 | } | |
22018 | q = (num / den); | |
22019 | if (q > 0xff) | |
22020 | raise_exception(0); | |
22021 | q &= 0xff; | |
22022 | r = (num % den) & 0xff; | |
22023 | (env->regs[0]) = ((env->regs[0]) & ~0xffff) | (r << 8) | q; | |
22024 | } | |
22025 | ||
22026 | void helper_idivb_AL(target_ulong t0) | |
22027 | { | |
22028 | int num, den, q, r; | |
22029 | ||
22030 | num = (int16_t)(env->regs[0]); | |
22031 | den = (int8_t)t0; | |
22032 | if (den == 0) { | |
22033 | raise_exception(0); | |
22034 | } | |
22035 | q = (num / den); | |
22036 | if (q != (int8_t)q) | |
22037 | raise_exception(0); | |
22038 | q &= 0xff; | |
22039 | r = (num % den) & 0xff; | |
22040 | (env->regs[0]) = ((env->regs[0]) & ~0xffff) | (r << 8) | q; | |
22041 | } | |
22042 | ||
22043 | void helper_divw_AX(target_ulong t0) | |
22044 | { | |
22045 | unsigned int num, den, q, r; | |
22046 | ||
22047 | num = ((env->regs[0]) & 0xffff) | (((env->regs[2]) & 0xffff) << 16); | |
22048 | den = (t0 & 0xffff); | |
22049 | if (den == 0) { | |
22050 | raise_exception(0); | |
22051 | } | |
22052 | q = (num / den); | |
22053 | if (q > 0xffff) | |
22054 | raise_exception(0); | |
22055 | q &= 0xffff; | |
22056 | r = (num % den) & 0xffff; | |
22057 | (env->regs[0]) = ((env->regs[0]) & ~0xffff) | q; | |
22058 | (env->regs[2]) = ((env->regs[2]) & ~0xffff) | r; | |
22059 | } | |
22060 | ||
22061 | void helper_idivw_AX(target_ulong t0) | |
22062 | { | |
22063 | int num, den, q, r; | |
22064 | ||
22065 | num = ((env->regs[0]) & 0xffff) | (((env->regs[2]) & 0xffff) << 16); | |
22066 | den = (int16_t)t0; | |
22067 | if (den == 0) { | |
22068 | raise_exception(0); | |
22069 | } | |
22070 | q = (num / den); | |
22071 | if (q != (int16_t)q) | |
22072 | raise_exception(0); | |
22073 | q &= 0xffff; | |
22074 | r = (num % den) & 0xffff; | |
22075 | (env->regs[0]) = ((env->regs[0]) & ~0xffff) | q; | |
22076 | (env->regs[2]) = ((env->regs[2]) & ~0xffff) | r; | |
22077 | } | |
22078 | ||
22079 | void helper_divl_EAX(target_ulong t0) | |
22080 | { | |
22081 | unsigned int den, r; | |
22082 | uint64_t num, q; | |
22083 | ||
22084 | num = ((uint32_t)(env->regs[0])) | ((uint64_t)((uint32_t)(env->regs[2])) << 32); | |
22085 | den = t0; | |
22086 | if (den == 0) { | |
22087 | raise_exception(0); | |
22088 | } | |
22089 | q = (num / den); | |
22090 | r = (num % den); | |
22091 | if (q > 0xffffffff) | |
22092 | raise_exception(0); | |
22093 | (env->regs[0]) = (uint32_t)q; | |
22094 | (env->regs[2]) = (uint32_t)r; | |
22095 | } | |
22096 | ||
22097 | void helper_idivl_EAX(target_ulong t0) | |
22098 | { | |
22099 | int den, r; | |
22100 | int64_t num, q; | |
22101 | ||
22102 | num = ((uint32_t)(env->regs[0])) | ((uint64_t)((uint32_t)(env->regs[2])) << 32); | |
22103 | den = t0; | |
22104 | if (den == 0) { | |
22105 | raise_exception(0); | |
22106 | } | |
22107 | q = (num / den); | |
22108 | r = (num % den); | |
22109 | if (q != (int32_t)q) | |
22110 | raise_exception(0); | |
22111 | (env->regs[0]) = (uint32_t)q; | |
22112 | (env->regs[2]) = (uint32_t)r; | |
22113 | } | |
22114 | ||
22115 | ||
22116 | ||
22117 | ||
22118 | void helper_aam(int base) | |
22119 | { | |
22120 | int al, ah; | |
22121 | al = (env->regs[0]) & 0xff; | |
22122 | ah = al / base; | |
22123 | al = al % base; | |
22124 | (env->regs[0]) = ((env->regs[0]) & ~0xffff) | al | (ah << 8); | |
22125 | (env->cc_dst) = al; | |
22126 | } | |
22127 | ||
22128 | void helper_aad(int base) | |
22129 | { | |
22130 | int al, ah; | |
22131 | al = (env->regs[0]) & 0xff; | |
22132 | ah = ((env->regs[0]) >> 8) & 0xff; | |
22133 | al = ((ah * base) + al) & 0xff; | |
22134 | (env->regs[0]) = ((env->regs[0]) & ~0xffff) | al; | |
22135 | (env->cc_dst) = al; | |
22136 | } | |
22137 | ||
22138 | void helper_aaa(void) | |
22139 | { | |
22140 | int icarry; | |
22141 | int al, ah, af; | |
22142 | int eflags; | |
22143 | ||
22144 | eflags = helper_cc_compute_all((env->cc_op)); | |
22145 | af = eflags & 0x0010; | |
22146 | al = (env->regs[0]) & 0xff; | |
22147 | ah = ((env->regs[0]) >> 8) & 0xff; | |
22148 | ||
22149 | icarry = (al > 0xf9); | |
22150 | if (((al & 0x0f) > 9 ) || af) { | |
22151 | al = (al + 6) & 0x0f; | |
22152 | ah = (ah + 1 + icarry) & 0xff; | |
22153 | eflags |= 0x0001 | 0x0010; | |
22154 | } else { | |
22155 | eflags &= ~(0x0001 | 0x0010); | |
22156 | al &= 0x0f; | |
22157 | } | |
22158 | (env->regs[0]) = ((env->regs[0]) & ~0xffff) | al | (ah << 8); | |
22159 | (env->cc_src) = eflags; | |
22160 | } | |
22161 | ||
22162 | void helper_aas(void) | |
22163 | { | |
22164 | int icarry; | |
22165 | int al, ah, af; | |
22166 | int eflags; | |
22167 | ||
22168 | eflags = helper_cc_compute_all((env->cc_op)); | |
22169 | af = eflags & 0x0010; | |
22170 | al = (env->regs[0]) & 0xff; | |
22171 | ah = ((env->regs[0]) >> 8) & 0xff; | |
22172 | ||
22173 | icarry = (al < 6); | |
22174 | if (((al & 0x0f) > 9 ) || af) { | |
22175 | al = (al - 6) & 0x0f; | |
22176 | ah = (ah - 1 - icarry) & 0xff; | |
22177 | eflags |= 0x0001 | 0x0010; | |
22178 | } else { | |
22179 | eflags &= ~(0x0001 | 0x0010); | |
22180 | al &= 0x0f; | |
22181 | } | |
22182 | (env->regs[0]) = ((env->regs[0]) & ~0xffff) | al | (ah << 8); | |
22183 | (env->cc_src) = eflags; | |
22184 | } | |
22185 | ||
22186 | void helper_daa(void) | |
22187 | { | |
22188 | int old_al, al, af, cf; | |
22189 | int eflags; | |
22190 | ||
22191 | eflags = helper_cc_compute_all((env->cc_op)); | |
22192 | cf = eflags & 0x0001; | |
22193 | af = eflags & 0x0010; | |
22194 | old_al = al = (env->regs[0]) & 0xff; | |
22195 | ||
22196 | eflags = 0; | |
22197 | if (((al & 0x0f) > 9 ) || af) { | |
22198 | al = (al + 6) & 0xff; | |
22199 | eflags |= 0x0010; | |
22200 | } | |
22201 | if ((old_al > 0x99) || cf) { | |
22202 | al = (al + 0x60) & 0xff; | |
22203 | eflags |= 0x0001; | |
22204 | } | |
22205 | (env->regs[0]) = ((env->regs[0]) & ~0xff) | al; | |
22206 | ||
22207 | eflags |= (al == 0) << 6; | |
22208 | eflags |= parity_table[al]; | |
22209 | eflags |= (al & 0x80); | |
22210 | (env->cc_src) = eflags; | |
22211 | } | |
22212 | ||
22213 | void helper_das(void) | |
22214 | { | |
22215 | int al, al1, af, cf; | |
22216 | int eflags; | |
22217 | ||
22218 | eflags = helper_cc_compute_all((env->cc_op)); | |
22219 | cf = eflags & 0x0001; | |
22220 | af = eflags & 0x0010; | |
22221 | al = (env->regs[0]) & 0xff; | |
22222 | ||
22223 | eflags = 0; | |
22224 | al1 = al; | |
22225 | if (((al & 0x0f) > 9 ) || af) { | |
22226 | eflags |= 0x0010; | |
22227 | if (al < 6 || cf) | |
22228 | eflags |= 0x0001; | |
22229 | al = (al - 6) & 0xff; | |
22230 | } | |
22231 | if ((al1 > 0x99) || cf) { | |
22232 | al = (al - 0x60) & 0xff; | |
22233 | eflags |= 0x0001; | |
22234 | } | |
22235 | (env->regs[0]) = ((env->regs[0]) & ~0xff) | al; | |
22236 | ||
22237 | eflags |= (al == 0) << 6; | |
22238 | eflags |= parity_table[al]; | |
22239 | eflags |= (al & 0x80); | |
22240 | (env->cc_src) = eflags; | |
22241 | } | |
22242 | ||
22243 | void helper_into(int next_eip_addend) | |
22244 | { | |
22245 | int eflags; | |
22246 | eflags = helper_cc_compute_all((env->cc_op)); | |
22247 | if (eflags & 0x0800) { | |
22248 | raise_interrupt(4, 1, 0, next_eip_addend); | |
22249 | } | |
22250 | } | |
22251 | ||
22252 | void helper_cmpxchg8b(target_ulong a0) | |
22253 | { | |
22254 | uint64_t d; | |
22255 | int eflags; | |
22256 | ||
22257 | eflags = helper_cc_compute_all((env->cc_op)); | |
22258 | d = ldq_data(a0); | |
22259 | if (d == (((uint64_t)(env->regs[2]) << 32) | (uint32_t)(env->regs[0]))) { | |
22260 | stq_data(a0, ((uint64_t)(env->regs[1]) << 32) | (uint32_t)(env->regs[3])); | |
22261 | eflags |= 0x0040; | |
22262 | } else { | |
22263 | ||
22264 | stq_data(a0, d); | |
22265 | (env->regs[2]) = (uint32_t)(d >> 32); | |
22266 | (env->regs[0]) = (uint32_t)d; | |
22267 | eflags &= ~0x0040; | |
22268 | } | |
22269 | (env->cc_src) = eflags; | |
22270 | } | |
22271 | # 2083 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
22272 | void helper_single_step(void) | |
22273 | { | |
22274 | ||
22275 | check_hw_breakpoints(env, 1); | |
22276 | env->dr[6] |= (1 << 14); | |
22277 | ||
22278 | raise_exception(1); | |
22279 | } | |
22280 | ||
22281 | void helper_cpuid(void) | |
22282 | { | |
22283 | uint32_t eax, ebx, ecx, edx; | |
22284 | ||
22285 | helper_svm_check_intercept_param(0x072, 0); | |
22286 | ||
22287 | cpu_x86_cpuid(env, (uint32_t)(env->regs[0]), (uint32_t)(env->regs[1]), &eax, &ebx, &ecx, &edx); | |
22288 | (env->regs[0]) = eax; | |
22289 | (env->regs[3]) = ebx; | |
22290 | (env->regs[1]) = ecx; | |
22291 | (env->regs[2]) = edx; | |
22292 | } | |
22293 | ||
22294 | void helper_enter_level(int level, int data32, target_ulong t1) | |
22295 | { | |
22296 | target_ulong ssp; | |
22297 | uint32_t esp_mask, esp, ebp; | |
22298 | ||
22299 | esp_mask = get_sp_mask(env->segs[2].flags); | |
22300 | ssp = env->segs[2].base; | |
22301 | ebp = (env->regs[5]); | |
22302 | esp = (env->regs[4]); | |
22303 | if (data32) { | |
22304 | ||
22305 | esp -= 4; | |
22306 | while (--level) { | |
22307 | esp -= 4; | |
22308 | ebp -= 4; | |
22309 | stl_data(ssp + (esp & esp_mask), ldl_data(ssp + (ebp & esp_mask))); | |
22310 | } | |
22311 | esp -= 4; | |
22312 | stl_data(ssp + (esp & esp_mask), t1); | |
22313 | } else { | |
22314 | ||
22315 | esp -= 2; | |
22316 | while (--level) { | |
22317 | esp -= 2; | |
22318 | ebp -= 2; | |
22319 | stw_data(ssp + (esp & esp_mask), lduw_data(ssp + (ebp & esp_mask))); | |
22320 | } | |
22321 | esp -= 2; | |
22322 | stw_data(ssp + (esp & esp_mask), t1); | |
22323 | } | |
22324 | } | |
22325 | # 2168 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
22326 | void helper_lldt(int selector) | |
22327 | { | |
22328 | SegmentCache *dt; | |
22329 | uint32_t e1, e2; | |
22330 | int index, entry_limit; | |
22331 | target_ulong ptr; | |
22332 | ||
22333 | selector &= 0xffff; | |
22334 | if ((selector & 0xfffc) == 0) { | |
22335 | ||
22336 | env->ldt.base = 0; | |
22337 | env->ldt.limit = 0; | |
22338 | } else { | |
22339 | if (selector & 0x4) | |
22340 | raise_exception_err(13, selector & 0xfffc); | |
22341 | dt = &env->gdt; | |
22342 | index = selector & ~7; | |
22343 | ||
22344 | ||
22345 | ||
22346 | ||
22347 | ||
22348 | entry_limit = 7; | |
22349 | if ((index + entry_limit) > dt->limit) | |
22350 | raise_exception_err(13, selector & 0xfffc); | |
22351 | ptr = dt->base + index; | |
22352 | e1 = ldl_kernel(ptr); | |
22353 | e2 = ldl_kernel(ptr + 4); | |
22354 | if ((e2 & (1 << 12)) || ((e2 >> 8) & 0xf) != 2) | |
22355 | raise_exception_err(13, selector & 0xfffc); | |
22356 | if (!(e2 & (1 << 15))) | |
22357 | raise_exception_err(11, selector & 0xfffc); | |
22358 | # 2208 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
22359 | { | |
22360 | load_seg_cache_raw_dt(&env->ldt, e1, e2); | |
22361 | } | |
22362 | } | |
22363 | env->ldt.selector = selector; | |
22364 | } | |
22365 | ||
22366 | void helper_ltr(int selector) | |
22367 | { | |
22368 | SegmentCache *dt; | |
22369 | uint32_t e1, e2; | |
22370 | int index, type, entry_limit; | |
22371 | target_ulong ptr; | |
22372 | ||
22373 | selector &= 0xffff; | |
22374 | if ((selector & 0xfffc) == 0) { | |
22375 | ||
22376 | env->tr.base = 0; | |
22377 | env->tr.limit = 0; | |
22378 | env->tr.flags = 0; | |
22379 | } else { | |
22380 | if (selector & 0x4) | |
22381 | raise_exception_err(13, selector & 0xfffc); | |
22382 | dt = &env->gdt; | |
22383 | index = selector & ~7; | |
22384 | ||
22385 | ||
22386 | ||
22387 | ||
22388 | ||
22389 | entry_limit = 7; | |
22390 | if ((index + entry_limit) > dt->limit) | |
22391 | raise_exception_err(13, selector & 0xfffc); | |
22392 | ptr = dt->base + index; | |
22393 | e1 = ldl_kernel(ptr); | |
22394 | e2 = ldl_kernel(ptr + 4); | |
22395 | type = (e2 >> 8) & 0xf; | |
22396 | if ((e2 & (1 << 12)) || | |
22397 | (type != 1 && type != 9)) | |
22398 | raise_exception_err(13, selector & 0xfffc); | |
22399 | if (!(e2 & (1 << 15))) | |
22400 | raise_exception_err(11, selector & 0xfffc); | |
22401 | # 2261 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
22402 | { | |
22403 | load_seg_cache_raw_dt(&env->tr, e1, e2); | |
22404 | } | |
22405 | e2 |= (1 << 9); | |
22406 | stl_kernel(ptr + 4, e2); | |
22407 | } | |
22408 | env->tr.selector = selector; | |
22409 | } | |
22410 | ||
22411 | ||
22412 | void helper_load_seg(int seg_reg, int selector) | |
22413 | { | |
22414 | uint32_t e1, e2; | |
22415 | int cpl, dpl, rpl; | |
22416 | SegmentCache *dt; | |
22417 | int index; | |
22418 | target_ulong ptr; | |
22419 | ||
22420 | selector &= 0xffff; | |
22421 | cpl = env->hflags & (3 << 0); | |
22422 | if ((selector & 0xfffc) == 0) { | |
22423 | ||
22424 | if (seg_reg == 2 | |
22425 | ||
22426 | ||
22427 | ||
22428 | ) | |
22429 | raise_exception_err(13, 0); | |
22430 | cpu_x86_load_seg_cache(env, seg_reg, selector, 0, 0, 0); | |
22431 | } else { | |
22432 | ||
22433 | if (selector & 0x4) | |
22434 | dt = &env->ldt; | |
22435 | else | |
22436 | dt = &env->gdt; | |
22437 | index = selector & ~7; | |
22438 | if ((index + 7) > dt->limit) | |
22439 | raise_exception_err(13, selector & 0xfffc); | |
22440 | ptr = dt->base + index; | |
22441 | e1 = ldl_kernel(ptr); | |
22442 | e2 = ldl_kernel(ptr + 4); | |
22443 | ||
22444 | if (!(e2 & (1 << 12))) | |
22445 | raise_exception_err(13, selector & 0xfffc); | |
22446 | rpl = selector & 3; | |
22447 | dpl = (e2 >> 13) & 3; | |
22448 | if (seg_reg == 2) { | |
22449 | ||
22450 | if ((e2 & (1 << 11)) || !(e2 & (1 << 9))) | |
22451 | raise_exception_err(13, selector & 0xfffc); | |
22452 | if (rpl != cpl || dpl != cpl) | |
22453 | raise_exception_err(13, selector & 0xfffc); | |
22454 | } else { | |
22455 | ||
22456 | if ((e2 & ((1 << 11) | (1 << 9))) == (1 << 11)) | |
22457 | raise_exception_err(13, selector & 0xfffc); | |
22458 | ||
22459 | if (!(e2 & (1 << 11)) || !(e2 & (1 << 10))) { | |
22460 | ||
22461 | if (dpl < cpl || dpl < rpl) | |
22462 | raise_exception_err(13, selector & 0xfffc); | |
22463 | } | |
22464 | } | |
22465 | ||
22466 | if (!(e2 & (1 << 15))) { | |
22467 | if (seg_reg == 2) | |
22468 | raise_exception_err(12, selector & 0xfffc); | |
22469 | else | |
22470 | raise_exception_err(11, selector & 0xfffc); | |
22471 | } | |
22472 | ||
22473 | ||
22474 | if (!(e2 & (1 << 8))) { | |
22475 | e2 |= (1 << 8); | |
22476 | stl_kernel(ptr + 4, e2); | |
22477 | } | |
22478 | ||
22479 | cpu_x86_load_seg_cache(env, seg_reg, selector, | |
22480 | get_seg_base(e1, e2), | |
22481 | get_seg_limit(e1, e2), | |
22482 | e2); | |
22483 | ||
22484 | ||
22485 | ||
22486 | ||
22487 | } | |
22488 | } | |
22489 | ||
22490 | ||
22491 | void helper_ljmp_protected(int new_cs, target_ulong new_eip, | |
22492 | int next_eip_addend) | |
22493 | { | |
22494 | int gate_cs, type; | |
22495 | uint32_t e1, e2, cpl, dpl, rpl, limit; | |
22496 | target_ulong next_eip; | |
22497 | ||
22498 | if ((new_cs & 0xfffc) == 0) | |
22499 | raise_exception_err(13, 0); | |
22500 | if (load_segment(&e1, &e2, new_cs) != 0) | |
22501 | raise_exception_err(13, new_cs & 0xfffc); | |
22502 | cpl = env->hflags & (3 << 0); | |
22503 | if (e2 & (1 << 12)) { | |
22504 | if (!(e2 & (1 << 11))) | |
22505 | raise_exception_err(13, new_cs & 0xfffc); | |
22506 | dpl = (e2 >> 13) & 3; | |
22507 | if (e2 & (1 << 10)) { | |
22508 | ||
22509 | if (dpl > cpl) | |
22510 | raise_exception_err(13, new_cs & 0xfffc); | |
22511 | } else { | |
22512 | ||
22513 | rpl = new_cs & 3; | |
22514 | if (rpl > cpl) | |
22515 | raise_exception_err(13, new_cs & 0xfffc); | |
22516 | if (dpl != cpl) | |
22517 | raise_exception_err(13, new_cs & 0xfffc); | |
22518 | } | |
22519 | if (!(e2 & (1 << 15))) | |
22520 | raise_exception_err(11, new_cs & 0xfffc); | |
22521 | limit = get_seg_limit(e1, e2); | |
22522 | if (new_eip > limit && | |
22523 | !(env->hflags & (1 << 14)) && !(e2 & (1 << 21))) | |
22524 | raise_exception_err(13, new_cs & 0xfffc); | |
22525 | cpu_x86_load_seg_cache(env, 1, (new_cs & 0xfffc) | cpl, | |
22526 | get_seg_base(e1, e2), limit, e2); | |
22527 | (env->eip) = new_eip; | |
22528 | } else { | |
22529 | ||
22530 | dpl = (e2 >> 13) & 3; | |
22531 | rpl = new_cs & 3; | |
22532 | cpl = env->hflags & (3 << 0); | |
22533 | type = (e2 >> 8) & 0xf; | |
22534 | switch(type) { | |
22535 | case 1: | |
22536 | case 9: | |
22537 | case 5: | |
22538 | if (dpl < cpl || dpl < rpl) | |
22539 | raise_exception_err(13, new_cs & 0xfffc); | |
22540 | next_eip = env->eip + next_eip_addend; | |
22541 | switch_tss(new_cs, e1, e2, 0, next_eip); | |
22542 | (env->cc_op) = CC_OP_EFLAGS; | |
22543 | break; | |
22544 | case 4: | |
22545 | case 12: | |
22546 | if ((dpl < cpl) || (dpl < rpl)) | |
22547 | raise_exception_err(13, new_cs & 0xfffc); | |
22548 | if (!(e2 & (1 << 15))) | |
22549 | raise_exception_err(11, new_cs & 0xfffc); | |
22550 | gate_cs = e1 >> 16; | |
22551 | new_eip = (e1 & 0xffff); | |
22552 | if (type == 12) | |
22553 | new_eip |= (e2 & 0xffff0000); | |
22554 | if (load_segment(&e1, &e2, gate_cs) != 0) | |
22555 | raise_exception_err(13, gate_cs & 0xfffc); | |
22556 | dpl = (e2 >> 13) & 3; | |
22557 | ||
22558 | if (((e2 & ((1 << 12) | (1 << 11))) != | |
22559 | ((1 << 12) | (1 << 11)))) | |
22560 | raise_exception_err(13, gate_cs & 0xfffc); | |
22561 | if (((e2 & (1 << 10)) && (dpl > cpl)) || | |
22562 | (!(e2 & (1 << 10)) && (dpl != cpl))) | |
22563 | raise_exception_err(13, gate_cs & 0xfffc); | |
22564 | if (!(e2 & (1 << 15))) | |
22565 | raise_exception_err(13, gate_cs & 0xfffc); | |
22566 | limit = get_seg_limit(e1, e2); | |
22567 | if (new_eip > limit) | |
22568 | raise_exception_err(13, 0); | |
22569 | cpu_x86_load_seg_cache(env, 1, (gate_cs & 0xfffc) | cpl, | |
22570 | get_seg_base(e1, e2), limit, e2); | |
22571 | (env->eip) = new_eip; | |
22572 | break; | |
22573 | default: | |
22574 | raise_exception_err(13, new_cs & 0xfffc); | |
22575 | break; | |
22576 | } | |
22577 | } | |
22578 | } | |
22579 | ||
22580 | ||
22581 | void helper_lcall_real(int new_cs, target_ulong new_eip1, | |
22582 | int shift, int next_eip) | |
22583 | { | |
22584 | int new_eip; | |
22585 | uint32_t esp, esp_mask; | |
22586 | target_ulong ssp; | |
22587 | ||
22588 | new_eip = new_eip1; | |
22589 | esp = (env->regs[4]); | |
22590 | esp_mask = get_sp_mask(env->segs[2].flags); | |
22591 | ssp = env->segs[2].base; | |
22592 | if (shift) { | |
22593 | { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (esp_mask)))), (uint32_t)(env->segs[1].selector));}; | |
22594 | { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (esp_mask)))), (uint32_t)(next_eip));}; | |
22595 | } else { | |
22596 | { esp -= 2; stw_kernel((ssp) + (esp & (esp_mask)), (env->segs[1].selector));}; | |
22597 | { esp -= 2; stw_kernel((ssp) + (esp & (esp_mask)), (next_eip));}; | |
22598 | } | |
22599 | ||
22600 | (env->regs[4]) = ((env->regs[4]) & ~(esp_mask)) | ((esp) & (esp_mask)); | |
22601 | env->eip = new_eip; | |
22602 | env->segs[1].selector = new_cs; | |
22603 | env->segs[1].base = (new_cs << 4); | |
22604 | } | |
22605 | ||
22606 | ||
22607 | void helper_lcall_protected(int new_cs, target_ulong new_eip, | |
22608 | int shift, int next_eip_addend) | |
22609 | { | |
22610 | int new_stack, i; | |
22611 | uint32_t e1, e2, cpl, dpl, rpl, selector, offset, param_count; | |
22612 | uint32_t ss = 0, ss_e1 = 0, ss_e2 = 0, sp, type, ss_dpl, sp_mask; | |
22613 | uint32_t val, limit, old_sp_mask; | |
22614 | target_ulong ssp, old_ssp, next_eip; | |
22615 | ||
22616 | next_eip = env->eip + next_eip_addend; | |
22617 | do { } while (0); | |
22618 | do { } while (0); | |
22619 | if ((new_cs & 0xfffc) == 0) | |
22620 | raise_exception_err(13, 0); | |
22621 | if (load_segment(&e1, &e2, new_cs) != 0) | |
22622 | raise_exception_err(13, new_cs & 0xfffc); | |
22623 | cpl = env->hflags & (3 << 0); | |
22624 | do { } while (0); | |
22625 | if (e2 & (1 << 12)) { | |
22626 | if (!(e2 & (1 << 11))) | |
22627 | raise_exception_err(13, new_cs & 0xfffc); | |
22628 | dpl = (e2 >> 13) & 3; | |
22629 | if (e2 & (1 << 10)) { | |
22630 | ||
22631 | if (dpl > cpl) | |
22632 | raise_exception_err(13, new_cs & 0xfffc); | |
22633 | } else { | |
22634 | ||
22635 | rpl = new_cs & 3; | |
22636 | if (rpl > cpl) | |
22637 | raise_exception_err(13, new_cs & 0xfffc); | |
22638 | if (dpl != cpl) | |
22639 | raise_exception_err(13, new_cs & 0xfffc); | |
22640 | } | |
22641 | if (!(e2 & (1 << 15))) | |
22642 | raise_exception_err(11, new_cs & 0xfffc); | |
22643 | # 2519 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
22644 | { | |
22645 | sp = (env->regs[4]); | |
22646 | sp_mask = get_sp_mask(env->segs[2].flags); | |
22647 | ssp = env->segs[2].base; | |
22648 | if (shift) { | |
22649 | { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)(env->segs[1].selector));}; | |
22650 | { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)(next_eip));}; | |
22651 | } else { | |
22652 | { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), (env->segs[1].selector));}; | |
22653 | { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), (next_eip));}; | |
22654 | } | |
22655 | ||
22656 | limit = get_seg_limit(e1, e2); | |
22657 | if (new_eip > limit) | |
22658 | raise_exception_err(13, new_cs & 0xfffc); | |
22659 | ||
22660 | (env->regs[4]) = ((env->regs[4]) & ~(sp_mask)) | ((sp) & (sp_mask)); | |
22661 | cpu_x86_load_seg_cache(env, 1, (new_cs & 0xfffc) | cpl, | |
22662 | get_seg_base(e1, e2), limit, e2); | |
22663 | (env->eip) = new_eip; | |
22664 | } | |
22665 | } else { | |
22666 | ||
22667 | type = (e2 >> 8) & 0x1f; | |
22668 | dpl = (e2 >> 13) & 3; | |
22669 | rpl = new_cs & 3; | |
22670 | switch(type) { | |
22671 | case 1: | |
22672 | case 9: | |
22673 | case 5: | |
22674 | if (dpl < cpl || dpl < rpl) | |
22675 | raise_exception_err(13, new_cs & 0xfffc); | |
22676 | switch_tss(new_cs, e1, e2, 2, next_eip); | |
22677 | (env->cc_op) = CC_OP_EFLAGS; | |
22678 | return; | |
22679 | case 4: | |
22680 | case 12: | |
22681 | break; | |
22682 | default: | |
22683 | raise_exception_err(13, new_cs & 0xfffc); | |
22684 | break; | |
22685 | } | |
22686 | shift = type >> 3; | |
22687 | ||
22688 | if (dpl < cpl || dpl < rpl) | |
22689 | raise_exception_err(13, new_cs & 0xfffc); | |
22690 | ||
22691 | if (!(e2 & (1 << 15))) | |
22692 | raise_exception_err(11, new_cs & 0xfffc); | |
22693 | selector = e1 >> 16; | |
22694 | offset = (e2 & 0xffff0000) | (e1 & 0x0000ffff); | |
22695 | param_count = e2 & 0x1f; | |
22696 | if ((selector & 0xfffc) == 0) | |
22697 | raise_exception_err(13, 0); | |
22698 | ||
22699 | if (load_segment(&e1, &e2, selector) != 0) | |
22700 | raise_exception_err(13, selector & 0xfffc); | |
22701 | if (!(e2 & (1 << 12)) || !(e2 & ((1 << 11)))) | |
22702 | raise_exception_err(13, selector & 0xfffc); | |
22703 | dpl = (e2 >> 13) & 3; | |
22704 | if (dpl > cpl) | |
22705 | raise_exception_err(13, selector & 0xfffc); | |
22706 | if (!(e2 & (1 << 15))) | |
22707 | raise_exception_err(11, selector & 0xfffc); | |
22708 | ||
22709 | if (!(e2 & (1 << 10)) && dpl < cpl) { | |
22710 | ||
22711 | get_ss_esp_from_tss(&ss, &sp, dpl); | |
22712 | do { } while (0) | |
22713 | ; | |
22714 | if ((ss & 0xfffc) == 0) | |
22715 | raise_exception_err(10, ss & 0xfffc); | |
22716 | if ((ss & 3) != dpl) | |
22717 | raise_exception_err(10, ss & 0xfffc); | |
22718 | if (load_segment(&ss_e1, &ss_e2, ss) != 0) | |
22719 | raise_exception_err(10, ss & 0xfffc); | |
22720 | ss_dpl = (ss_e2 >> 13) & 3; | |
22721 | if (ss_dpl != dpl) | |
22722 | raise_exception_err(10, ss & 0xfffc); | |
22723 | if (!(ss_e2 & (1 << 12)) || | |
22724 | (ss_e2 & (1 << 11)) || | |
22725 | !(ss_e2 & (1 << 9))) | |
22726 | raise_exception_err(10, ss & 0xfffc); | |
22727 | if (!(ss_e2 & (1 << 15))) | |
22728 | raise_exception_err(10, ss & 0xfffc); | |
22729 | ||
22730 | ||
22731 | ||
22732 | old_sp_mask = get_sp_mask(env->segs[2].flags); | |
22733 | old_ssp = env->segs[2].base; | |
22734 | ||
22735 | sp_mask = get_sp_mask(ss_e2); | |
22736 | ssp = get_seg_base(ss_e1, ss_e2); | |
22737 | if (shift) { | |
22738 | { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)(env->segs[2].selector));}; | |
22739 | { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)((env->regs[4])));}; | |
22740 | for(i = param_count - 1; i >= 0; i--) { | |
22741 | val = ldl_kernel(old_ssp + (((env->regs[4]) + i * 4) & old_sp_mask)); | |
22742 | { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)(val));}; | |
22743 | } | |
22744 | } else { | |
22745 | { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), (env->segs[2].selector));}; | |
22746 | { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), ((env->regs[4])));}; | |
22747 | for(i = param_count - 1; i >= 0; i--) { | |
22748 | val = lduw_kernel(old_ssp + (((env->regs[4]) + i * 2) & old_sp_mask)); | |
22749 | { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), (val));}; | |
22750 | } | |
22751 | } | |
22752 | new_stack = 1; | |
22753 | } else { | |
22754 | ||
22755 | sp = (env->regs[4]); | |
22756 | sp_mask = get_sp_mask(env->segs[2].flags); | |
22757 | ssp = env->segs[2].base; | |
22758 | ||
22759 | new_stack = 0; | |
22760 | } | |
22761 | ||
22762 | if (shift) { | |
22763 | { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)(env->segs[1].selector));}; | |
22764 | { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)(next_eip));}; | |
22765 | } else { | |
22766 | { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), (env->segs[1].selector));}; | |
22767 | { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), (next_eip));}; | |
22768 | } | |
22769 | ||
22770 | ||
22771 | ||
22772 | if (new_stack) { | |
22773 | ss = (ss & ~3) | dpl; | |
22774 | cpu_x86_load_seg_cache(env, 2, ss, | |
22775 | ssp, | |
22776 | get_seg_limit(ss_e1, ss_e2), | |
22777 | ss_e2); | |
22778 | } | |
22779 | ||
22780 | selector = (selector & ~3) | dpl; | |
22781 | cpu_x86_load_seg_cache(env, 1, selector, | |
22782 | get_seg_base(e1, e2), | |
22783 | get_seg_limit(e1, e2), | |
22784 | e2); | |
22785 | cpu_x86_set_cpl(env, dpl); | |
22786 | (env->regs[4]) = ((env->regs[4]) & ~(sp_mask)) | ((sp) & (sp_mask)); | |
22787 | (env->eip) = offset; | |
22788 | } | |
22789 | } | |
22790 | ||
22791 | ||
22792 | void helper_iret_real(int shift) | |
22793 | { | |
22794 | uint32_t sp, new_cs, new_eip, new_eflags, sp_mask; | |
22795 | target_ulong ssp; | |
22796 | int eflags_mask; | |
22797 | ||
22798 | sp_mask = 0xffff; | |
22799 | sp = (env->regs[4]); | |
22800 | ssp = env->segs[2].base; | |
22801 | if (shift == 1) { | |
22802 | ||
22803 | { new_eip = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
22804 | { new_cs = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
22805 | new_cs &= 0xffff; | |
22806 | { new_eflags = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
22807 | } else { | |
22808 | ||
22809 | { new_eip = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; | |
22810 | { new_cs = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; | |
22811 | { new_eflags = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; | |
22812 | } | |
22813 | (env->regs[4]) = ((env->regs[4]) & ~sp_mask) | (sp & sp_mask); | |
22814 | env->segs[1].selector = new_cs; | |
22815 | env->segs[1].base = (new_cs << 4); | |
22816 | env->eip = new_eip; | |
22817 | if (env->eflags & 0x00020000) | |
22818 | eflags_mask = 0x00000100 | 0x00040000 | 0x00200000 | 0x00000200 | 0x00010000 | 0x00004000; | |
22819 | else | |
22820 | eflags_mask = 0x00000100 | 0x00040000 | 0x00200000 | 0x00000200 | 0x00003000 | 0x00010000 | 0x00004000; | |
22821 | if (shift == 0) | |
22822 | eflags_mask &= 0xffff; | |
22823 | load_eflags(new_eflags, eflags_mask); | |
22824 | env->hflags2 &= ~(1 << 2); | |
22825 | } | |
22826 | ||
22827 | static __attribute__ (( always_inline )) __inline__ void validate_seg(int seg_reg, int cpl) | |
22828 | { | |
22829 | int dpl; | |
22830 | uint32_t e2; | |
22831 | ||
22832 | ||
22833 | ||
22834 | ||
22835 | if ((seg_reg == 4 || seg_reg == 5) && | |
22836 | (env->segs[seg_reg].selector & 0xfffc) == 0) | |
22837 | return; | |
22838 | ||
22839 | e2 = env->segs[seg_reg].flags; | |
22840 | dpl = (e2 >> 13) & 3; | |
22841 | if (!(e2 & (1 << 11)) || !(e2 & (1 << 10))) { | |
22842 | ||
22843 | if (dpl < cpl) { | |
22844 | cpu_x86_load_seg_cache(env, seg_reg, 0, 0, 0, 0); | |
22845 | } | |
22846 | } | |
22847 | } | |
22848 | ||
22849 | ||
22850 | static __attribute__ (( always_inline )) __inline__ void helper_ret_protected(int shift, int is_iret, int addend) | |
22851 | { | |
22852 | uint32_t new_cs, new_eflags, new_ss; | |
22853 | uint32_t new_es, new_ds, new_fs, new_gs; | |
22854 | uint32_t e1, e2, ss_e1, ss_e2; | |
22855 | int cpl, dpl, rpl, eflags_mask, iopl; | |
22856 | target_ulong ssp, sp, new_eip, new_esp, sp_mask; | |
22857 | ||
22858 | ||
22859 | ||
22860 | ||
22861 | ||
22862 | ||
22863 | sp_mask = get_sp_mask(env->segs[2].flags); | |
22864 | sp = (env->regs[4]); | |
22865 | ssp = env->segs[2].base; | |
22866 | new_eflags = 0; | |
22867 | # 2752 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
22868 | if (shift == 1) { | |
22869 | ||
22870 | { new_eip = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
22871 | { new_cs = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
22872 | new_cs &= 0xffff; | |
22873 | if (is_iret) { | |
22874 | { new_eflags = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
22875 | if (new_eflags & 0x00020000) | |
22876 | goto return_to_vm86; | |
22877 | } | |
22878 | } else { | |
22879 | ||
22880 | { new_eip = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; | |
22881 | { new_cs = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; | |
22882 | if (is_iret) | |
22883 | { new_eflags = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; | |
22884 | } | |
22885 | do { } while (0) | |
22886 | ; | |
22887 | do { } while (0); | |
22888 | if ((new_cs & 0xfffc) == 0) | |
22889 | raise_exception_err(13, new_cs & 0xfffc); | |
22890 | if (load_segment(&e1, &e2, new_cs) != 0) | |
22891 | raise_exception_err(13, new_cs & 0xfffc); | |
22892 | if (!(e2 & (1 << 12)) || | |
22893 | !(e2 & (1 << 11))) | |
22894 | raise_exception_err(13, new_cs & 0xfffc); | |
22895 | cpl = env->hflags & (3 << 0); | |
22896 | rpl = new_cs & 3; | |
22897 | if (rpl < cpl) | |
22898 | raise_exception_err(13, new_cs & 0xfffc); | |
22899 | dpl = (e2 >> 13) & 3; | |
22900 | if (e2 & (1 << 10)) { | |
22901 | if (dpl > rpl) | |
22902 | raise_exception_err(13, new_cs & 0xfffc); | |
22903 | } else { | |
22904 | if (dpl != rpl) | |
22905 | raise_exception_err(13, new_cs & 0xfffc); | |
22906 | } | |
22907 | if (!(e2 & (1 << 15))) | |
22908 | raise_exception_err(11, new_cs & 0xfffc); | |
22909 | ||
22910 | sp += addend; | |
22911 | if (rpl == cpl && (!(env->hflags & (1 << 15)) || | |
22912 | ((env->hflags & (1 << 15)) && !is_iret))) { | |
22913 | ||
22914 | cpu_x86_load_seg_cache(env, 1, new_cs, | |
22915 | get_seg_base(e1, e2), | |
22916 | get_seg_limit(e1, e2), | |
22917 | e2); | |
22918 | } else { | |
22919 | # 2811 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
22920 | if (shift == 1) { | |
22921 | ||
22922 | { new_esp = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
22923 | { new_ss = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
22924 | new_ss &= 0xffff; | |
22925 | } else { | |
22926 | ||
22927 | { new_esp = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; | |
22928 | { new_ss = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; | |
22929 | } | |
22930 | do { } while (0) | |
22931 | ; | |
22932 | if ((new_ss & 0xfffc) == 0) { | |
22933 | # 2836 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
22934 | { | |
22935 | raise_exception_err(13, 0); | |
22936 | } | |
22937 | } else { | |
22938 | if ((new_ss & 3) != rpl) | |
22939 | raise_exception_err(13, new_ss & 0xfffc); | |
22940 | if (load_segment(&ss_e1, &ss_e2, new_ss) != 0) | |
22941 | raise_exception_err(13, new_ss & 0xfffc); | |
22942 | if (!(ss_e2 & (1 << 12)) || | |
22943 | (ss_e2 & (1 << 11)) || | |
22944 | !(ss_e2 & (1 << 9))) | |
22945 | raise_exception_err(13, new_ss & 0xfffc); | |
22946 | dpl = (ss_e2 >> 13) & 3; | |
22947 | if (dpl != rpl) | |
22948 | raise_exception_err(13, new_ss & 0xfffc); | |
22949 | if (!(ss_e2 & (1 << 15))) | |
22950 | raise_exception_err(11, new_ss & 0xfffc); | |
22951 | cpu_x86_load_seg_cache(env, 2, new_ss, | |
22952 | get_seg_base(ss_e1, ss_e2), | |
22953 | get_seg_limit(ss_e1, ss_e2), | |
22954 | ss_e2); | |
22955 | } | |
22956 | ||
22957 | cpu_x86_load_seg_cache(env, 1, new_cs, | |
22958 | get_seg_base(e1, e2), | |
22959 | get_seg_limit(e1, e2), | |
22960 | e2); | |
22961 | cpu_x86_set_cpl(env, rpl); | |
22962 | sp = new_esp; | |
22963 | ||
22964 | ||
22965 | ||
22966 | ||
22967 | ||
22968 | sp_mask = get_sp_mask(ss_e2); | |
22969 | ||
22970 | ||
22971 | validate_seg(0, rpl); | |
22972 | validate_seg(3, rpl); | |
22973 | validate_seg(4, rpl); | |
22974 | validate_seg(5, rpl); | |
22975 | ||
22976 | sp += addend; | |
22977 | } | |
22978 | (env->regs[4]) = ((env->regs[4]) & ~(sp_mask)) | ((sp) & (sp_mask)); | |
22979 | env->eip = new_eip; | |
22980 | if (is_iret) { | |
22981 | ||
22982 | eflags_mask = 0x00000100 | 0x00040000 | 0x00200000 | 0x00010000 | 0x00004000; | |
22983 | if (cpl == 0) | |
22984 | eflags_mask |= 0x00003000; | |
22985 | iopl = (env->eflags >> 12) & 3; | |
22986 | if (cpl <= iopl) | |
22987 | eflags_mask |= 0x00000200; | |
22988 | if (shift == 0) | |
22989 | eflags_mask &= 0xffff; | |
22990 | load_eflags(new_eflags, eflags_mask); | |
22991 | } | |
22992 | return; | |
22993 | ||
22994 | return_to_vm86: | |
22995 | { new_esp = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
22996 | { new_ss = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
22997 | { new_es = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
22998 | { new_ds = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
22999 | { new_fs = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
23000 | { new_gs = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; | |
23001 | ||
23002 | ||
23003 | load_eflags(new_eflags, 0x00000100 | 0x00040000 | 0x00200000 | | |
23004 | 0x00000200 | 0x00003000 | 0x00020000 | 0x00004000 | 0x00080000 | 0x00100000); | |
23005 | load_seg_vm(1, new_cs & 0xffff); | |
23006 | cpu_x86_set_cpl(env, 3); | |
23007 | load_seg_vm(2, new_ss & 0xffff); | |
23008 | load_seg_vm(0, new_es & 0xffff); | |
23009 | load_seg_vm(3, new_ds & 0xffff); | |
23010 | load_seg_vm(4, new_fs & 0xffff); | |
23011 | load_seg_vm(5, new_gs & 0xffff); | |
23012 | ||
23013 | env->eip = new_eip & 0xffff; | |
23014 | (env->regs[4]) = new_esp; | |
23015 | } | |
23016 | ||
23017 | void helper_iret_protected(int shift, int next_eip) | |
23018 | { | |
23019 | int tss_selector, type; | |
23020 | uint32_t e1, e2; | |
23021 | ||
23022 | ||
23023 | if (env->eflags & 0x00004000) { | |
23024 | ||
23025 | ||
23026 | ||
23027 | ||
23028 | tss_selector = lduw_kernel(env->tr.base + 0); | |
23029 | if (tss_selector & 4) | |
23030 | raise_exception_err(10, tss_selector & 0xfffc); | |
23031 | if (load_segment(&e1, &e2, tss_selector) != 0) | |
23032 | raise_exception_err(10, tss_selector & 0xfffc); | |
23033 | type = (e2 >> 8) & 0x17; | |
23034 | ||
23035 | if (type != 3) | |
23036 | raise_exception_err(10, tss_selector & 0xfffc); | |
23037 | switch_tss(tss_selector, e1, e2, 1, next_eip); | |
23038 | } else { | |
23039 | helper_ret_protected(shift, 1, 0); | |
23040 | } | |
23041 | env->hflags2 &= ~(1 << 2); | |
23042 | } | |
23043 | ||
23044 | void helper_lret_protected(int shift, int addend) | |
23045 | { | |
23046 | helper_ret_protected(shift, 0, addend); | |
23047 | } | |
23048 | ||
23049 | void helper_sysenter(void) | |
23050 | { | |
23051 | if (env->sysenter_cs == 0) { | |
23052 | raise_exception_err(13, 0); | |
23053 | } | |
23054 | env->eflags &= ~(0x00020000 | 0x00000200 | 0x00010000); | |
23055 | cpu_x86_set_cpl(env, 0); | |
23056 | # 2968 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
23057 | { | |
23058 | cpu_x86_load_seg_cache(env, 1, env->sysenter_cs & 0xfffc, | |
23059 | 0, 0xffffffff, | |
23060 | (1 << 23) | (1 << 22) | (1 << 15) | | |
23061 | (1 << 12) | | |
23062 | (1 << 11) | (1 << 9) | (1 << 8)); | |
23063 | } | |
23064 | cpu_x86_load_seg_cache(env, 2, (env->sysenter_cs + 8) & 0xfffc, | |
23065 | 0, 0xffffffff, | |
23066 | (1 << 23) | (1 << 22) | (1 << 15) | | |
23067 | (1 << 12) | | |
23068 | (1 << 9) | (1 << 8)); | |
23069 | (env->regs[4]) = env->sysenter_esp; | |
23070 | (env->eip) = env->sysenter_eip; | |
23071 | } | |
23072 | ||
23073 | void helper_sysexit(int dflag) | |
23074 | { | |
23075 | int cpl; | |
23076 | ||
23077 | cpl = env->hflags & (3 << 0); | |
23078 | if (env->sysenter_cs == 0 || cpl != 0) { | |
23079 | raise_exception_err(13, 0); | |
23080 | } | |
23081 | cpu_x86_set_cpl(env, 3); | |
23082 | # 3007 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
23083 | { | |
23084 | cpu_x86_load_seg_cache(env, 1, ((env->sysenter_cs + 16) & 0xfffc) | 3, | |
23085 | 0, 0xffffffff, | |
23086 | (1 << 23) | (1 << 22) | (1 << 15) | | |
23087 | (1 << 12) | (3 << 13) | | |
23088 | (1 << 11) | (1 << 9) | (1 << 8)); | |
23089 | cpu_x86_load_seg_cache(env, 2, ((env->sysenter_cs + 24) & 0xfffc) | 3, | |
23090 | 0, 0xffffffff, | |
23091 | (1 << 23) | (1 << 22) | (1 << 15) | | |
23092 | (1 << 12) | (3 << 13) | | |
23093 | (1 << 9) | (1 << 8)); | |
23094 | } | |
23095 | (env->regs[4]) = (env->regs[1]); | |
23096 | (env->eip) = (env->regs[2]); | |
23097 | } | |
23098 | # 3037 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
23099 | target_ulong helper_read_crN(int reg) | |
23100 | { | |
23101 | target_ulong val; | |
23102 | ||
23103 | helper_svm_check_intercept_param(0x000 + reg, 0); | |
23104 | switch(reg) { | |
23105 | default: | |
23106 | val = env->cr[reg]; | |
23107 | break; | |
23108 | case 8: | |
23109 | if (!(env->hflags2 & (1 << 3))) { | |
23110 | val = cpu_get_apic_tpr(env->apic_state); | |
23111 | } else { | |
23112 | val = env->v_tpr; | |
23113 | } | |
23114 | break; | |
23115 | } | |
23116 | return val; | |
23117 | } | |
23118 | ||
23119 | void helper_write_crN(int reg, target_ulong t0) | |
23120 | { | |
23121 | helper_svm_check_intercept_param(0x010 + reg, 0); | |
23122 | switch(reg) { | |
23123 | case 0: | |
23124 | cpu_x86_update_cr0(env, t0); | |
23125 | break; | |
23126 | case 3: | |
23127 | cpu_x86_update_cr3(env, t0); | |
23128 | break; | |
23129 | case 4: | |
23130 | cpu_x86_update_cr4(env, t0); | |
23131 | break; | |
23132 | case 8: | |
23133 | if (!(env->hflags2 & (1 << 3))) { | |
23134 | cpu_set_apic_tpr(env->apic_state, t0); | |
23135 | } | |
23136 | env->v_tpr = t0 & 0x0f; | |
23137 | break; | |
23138 | default: | |
23139 | env->cr[reg] = t0; | |
23140 | break; | |
23141 | } | |
23142 | } | |
23143 | ||
23144 | void helper_movl_drN_T0(int reg, target_ulong t0) | |
23145 | { | |
23146 | int i; | |
23147 | ||
23148 | if (reg < 4) { | |
23149 | hw_breakpoint_remove(env, reg); | |
23150 | env->dr[reg] = t0; | |
23151 | hw_breakpoint_insert(env, reg); | |
23152 | } else if (reg == 7) { | |
23153 | for (i = 0; i < 4; i++) | |
23154 | hw_breakpoint_remove(env, i); | |
23155 | env->dr[7] = t0; | |
23156 | for (i = 0; i < 4; i++) | |
23157 | hw_breakpoint_insert(env, i); | |
23158 | } else | |
23159 | env->dr[reg] = t0; | |
23160 | } | |
23161 | ||
23162 | ||
23163 | void helper_lmsw(target_ulong t0) | |
23164 | { | |
23165 | ||
23166 | ||
23167 | t0 = (env->cr[0] & ~0xe) | (t0 & 0xf); | |
23168 | helper_write_crN(0, t0); | |
23169 | } | |
23170 | ||
23171 | void helper_clts(void) | |
23172 | { | |
23173 | env->cr[0] &= ~(1 << 3); | |
23174 | env->hflags &= ~(1 << 11); | |
23175 | } | |
23176 | ||
23177 | void helper_invlpg(target_ulong addr) | |
23178 | { | |
23179 | helper_svm_check_intercept_param(0x079, 0); | |
23180 | tlb_flush_page(env, addr); | |
23181 | } | |
23182 | ||
23183 | void helper_rdtsc(void) | |
23184 | { | |
23185 | uint64_t val; | |
23186 | ||
23187 | if ((env->cr[4] & (1 << 2)) && ((env->hflags & (3 << 0)) != 0)) { | |
23188 | raise_exception(13); | |
23189 | } | |
23190 | helper_svm_check_intercept_param(0x06e, 0); | |
23191 | ||
23192 | val = cpu_get_tsc(env) + env->tsc_offset; | |
23193 | (env->regs[0]) = (uint32_t)(val); | |
23194 | (env->regs[2]) = (uint32_t)(val >> 32); | |
23195 | } | |
23196 | ||
23197 | void helper_rdtscp(void) | |
23198 | { | |
23199 | helper_rdtsc(); | |
23200 | (env->regs[1]) = (uint32_t)(env->tsc_aux); | |
23201 | } | |
23202 | ||
23203 | void helper_rdpmc(void) | |
23204 | { | |
23205 | if ((env->cr[4] & (1 << 8)) && ((env->hflags & (3 << 0)) != 0)) { | |
23206 | raise_exception(13); | |
23207 | } | |
23208 | helper_svm_check_intercept_param(0x06f, 0); | |
23209 | ||
23210 | ||
23211 | raise_exception_err(6, 0); | |
23212 | } | |
23213 | # 3161 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
23214 | void helper_wrmsr(void) | |
23215 | { | |
23216 | uint64_t val; | |
23217 | ||
23218 | helper_svm_check_intercept_param(0x07c, 1); | |
23219 | ||
23220 | val = ((uint32_t)(env->regs[0])) | ((uint64_t)((uint32_t)(env->regs[2])) << 32); | |
23221 | ||
23222 | switch((uint32_t)(env->regs[1])) { | |
23223 | case 0x174: | |
23224 | env->sysenter_cs = val & 0xffff; | |
23225 | break; | |
23226 | case 0x175: | |
23227 | env->sysenter_esp = val; | |
23228 | break; | |
23229 | case 0x176: | |
23230 | env->sysenter_eip = val; | |
23231 | break; | |
23232 | case 0x1b: | |
23233 | cpu_set_apic_base(env->apic_state, val); | |
23234 | break; | |
23235 | case 0xc0000080: | |
23236 | { | |
23237 | uint64_t update_mask; | |
23238 | update_mask = 0; | |
23239 | if (env->cpuid_ext2_features & (1 << 11)) | |
23240 | update_mask |= (1 << 0); | |
23241 | if (env->cpuid_ext2_features & (1 << 29)) | |
23242 | update_mask |= (1 << 8); | |
23243 | if (env->cpuid_ext2_features & (1 << 25)) | |
23244 | update_mask |= (1 << 14); | |
23245 | if (env->cpuid_ext2_features & (1 << 20)) | |
23246 | update_mask |= (1 << 11); | |
23247 | if (env->cpuid_ext3_features & (1 << 2)) | |
23248 | update_mask |= (1 << 12); | |
23249 | if (env->cpuid_ext2_features & (1 << 25)) | |
23250 | update_mask |= (1 << 14); | |
23251 | cpu_load_efer(env, (env->efer & ~update_mask) | | |
23252 | (val & update_mask)); | |
23253 | } | |
23254 | break; | |
23255 | case 0xc0000081: | |
23256 | env->star = val; | |
23257 | break; | |
23258 | case 0x277: | |
23259 | env->pat = val; | |
23260 | break; | |
23261 | case 0xc0010117: | |
23262 | env->vm_hsave = val; | |
23263 | break; | |
23264 | # 3231 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
23265 | case (0x200 + 2 * (0)): | |
23266 | case (0x200 + 2 * (1)): | |
23267 | case (0x200 + 2 * (2)): | |
23268 | case (0x200 + 2 * (3)): | |
23269 | case (0x200 + 2 * (4)): | |
23270 | case (0x200 + 2 * (5)): | |
23271 | case (0x200 + 2 * (6)): | |
23272 | case (0x200 + 2 * (7)): | |
23273 | env->mtrr_var[((uint32_t)(env->regs[1]) - (0x200 + 2 * (0))) / 2].base = val; | |
23274 | break; | |
23275 | case (0x200 + 2 * (0) + 1): | |
23276 | case (0x200 + 2 * (1) + 1): | |
23277 | case (0x200 + 2 * (2) + 1): | |
23278 | case (0x200 + 2 * (3) + 1): | |
23279 | case (0x200 + 2 * (4) + 1): | |
23280 | case (0x200 + 2 * (5) + 1): | |
23281 | case (0x200 + 2 * (6) + 1): | |
23282 | case (0x200 + 2 * (7) + 1): | |
23283 | env->mtrr_var[((uint32_t)(env->regs[1]) - (0x200 + 2 * (0) + 1)) / 2].mask = val; | |
23284 | break; | |
23285 | case 0x250: | |
23286 | env->mtrr_fixed[(uint32_t)(env->regs[1]) - 0x250] = val; | |
23287 | break; | |
23288 | case 0x258: | |
23289 | case 0x259: | |
23290 | env->mtrr_fixed[(uint32_t)(env->regs[1]) - 0x258 + 1] = val; | |
23291 | break; | |
23292 | case 0x268: | |
23293 | case 0x269: | |
23294 | case 0x26a: | |
23295 | case 0x26b: | |
23296 | case 0x26c: | |
23297 | case 0x26d: | |
23298 | case 0x26e: | |
23299 | case 0x26f: | |
23300 | env->mtrr_fixed[(uint32_t)(env->regs[1]) - 0x268 + 3] = val; | |
23301 | break; | |
23302 | case 0x2ff: | |
23303 | env->mtrr_deftype = val; | |
23304 | break; | |
23305 | case 0x17a: | |
23306 | env->mcg_status = val; | |
23307 | break; | |
23308 | case 0x17b: | |
23309 | if ((env->mcg_cap & (1ULL<<8)) | |
23310 | && (val == 0 || val == ~(uint64_t)0)) | |
23311 | env->mcg_ctl = val; | |
23312 | break; | |
23313 | case 0xc0000103: | |
23314 | env->tsc_aux = val; | |
23315 | break; | |
23316 | case 0x1a0: | |
23317 | env->msr_ia32_misc_enable = val; | |
23318 | break; | |
23319 | default: | |
23320 | if ((uint32_t)(env->regs[1]) >= 0x400 | |
23321 | && (uint32_t)(env->regs[1]) < 0x400 + (4 * env->mcg_cap & 0xff)) { | |
23322 | uint32_t offset = (uint32_t)(env->regs[1]) - 0x400; | |
23323 | if ((offset & 0x3) != 0 | |
23324 | || (val == 0 || val == ~(uint64_t)0)) | |
23325 | env->mce_banks[offset] = val; | |
23326 | break; | |
23327 | } | |
23328 | ||
23329 | break; | |
23330 | } | |
23331 | } | |
23332 | ||
23333 | void helper_rdmsr(void) | |
23334 | { | |
23335 | uint64_t val; | |
23336 | ||
23337 | helper_svm_check_intercept_param(0x07c, 0); | |
23338 | ||
23339 | switch((uint32_t)(env->regs[1])) { | |
23340 | case 0x174: | |
23341 | val = env->sysenter_cs; | |
23342 | break; | |
23343 | case 0x175: | |
23344 | val = env->sysenter_esp; | |
23345 | break; | |
23346 | case 0x176: | |
23347 | val = env->sysenter_eip; | |
23348 | break; | |
23349 | case 0x1b: | |
23350 | val = cpu_get_apic_base(env->apic_state); | |
23351 | break; | |
23352 | case 0xc0000080: | |
23353 | val = env->efer; | |
23354 | break; | |
23355 | case 0xc0000081: | |
23356 | val = env->star; | |
23357 | break; | |
23358 | case 0x277: | |
23359 | val = env->pat; | |
23360 | break; | |
23361 | case 0xc0010117: | |
23362 | val = env->vm_hsave; | |
23363 | break; | |
23364 | case 0x198: | |
23365 | ||
23366 | val = 1000ULL; | |
23367 | ||
23368 | val |= (((uint64_t)4ULL) << 40); | |
23369 | break; | |
23370 | # 3359 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
23371 | case (0x200 + 2 * (0)): | |
23372 | case (0x200 + 2 * (1)): | |
23373 | case (0x200 + 2 * (2)): | |
23374 | case (0x200 + 2 * (3)): | |
23375 | case (0x200 + 2 * (4)): | |
23376 | case (0x200 + 2 * (5)): | |
23377 | case (0x200 + 2 * (6)): | |
23378 | case (0x200 + 2 * (7)): | |
23379 | val = env->mtrr_var[((uint32_t)(env->regs[1]) - (0x200 + 2 * (0))) / 2].base; | |
23380 | break; | |
23381 | case (0x200 + 2 * (0) + 1): | |
23382 | case (0x200 + 2 * (1) + 1): | |
23383 | case (0x200 + 2 * (2) + 1): | |
23384 | case (0x200 + 2 * (3) + 1): | |
23385 | case (0x200 + 2 * (4) + 1): | |
23386 | case (0x200 + 2 * (5) + 1): | |
23387 | case (0x200 + 2 * (6) + 1): | |
23388 | case (0x200 + 2 * (7) + 1): | |
23389 | val = env->mtrr_var[((uint32_t)(env->regs[1]) - (0x200 + 2 * (0) + 1)) / 2].mask; | |
23390 | break; | |
23391 | case 0x250: | |
23392 | val = env->mtrr_fixed[0]; | |
23393 | break; | |
23394 | case 0x258: | |
23395 | case 0x259: | |
23396 | val = env->mtrr_fixed[(uint32_t)(env->regs[1]) - 0x258 + 1]; | |
23397 | break; | |
23398 | case 0x268: | |
23399 | case 0x269: | |
23400 | case 0x26a: | |
23401 | case 0x26b: | |
23402 | case 0x26c: | |
23403 | case 0x26d: | |
23404 | case 0x26e: | |
23405 | case 0x26f: | |
23406 | val = env->mtrr_fixed[(uint32_t)(env->regs[1]) - 0x268 + 3]; | |
23407 | break; | |
23408 | case 0x2ff: | |
23409 | val = env->mtrr_deftype; | |
23410 | break; | |
23411 | case 0xfe: | |
23412 | if (env->cpuid_features & (1 << 12)) | |
23413 | val = 8 | (1 << 8) | (1 << 10); | |
23414 | else | |
23415 | ||
23416 | val = 0; | |
23417 | break; | |
23418 | case 0x179: | |
23419 | val = env->mcg_cap; | |
23420 | break; | |
23421 | case 0x17b: | |
23422 | if (env->mcg_cap & (1ULL<<8)) | |
23423 | val = env->mcg_ctl; | |
23424 | else | |
23425 | val = 0; | |
23426 | break; | |
23427 | case 0x17a: | |
23428 | val = env->mcg_status; | |
23429 | break; | |
23430 | case 0x1a0: | |
23431 | val = env->msr_ia32_misc_enable; | |
23432 | break; | |
23433 | default: | |
23434 | if ((uint32_t)(env->regs[1]) >= 0x400 | |
23435 | && (uint32_t)(env->regs[1]) < 0x400 + (4 * env->mcg_cap & 0xff)) { | |
23436 | uint32_t offset = (uint32_t)(env->regs[1]) - 0x400; | |
23437 | val = env->mce_banks[offset]; | |
23438 | break; | |
23439 | } | |
23440 | ||
23441 | val = 0; | |
23442 | break; | |
23443 | } | |
23444 | (env->regs[0]) = (uint32_t)(val); | |
23445 | (env->regs[2]) = (uint32_t)(val >> 32); | |
23446 | } | |
23447 | ||
23448 | ||
23449 | target_ulong helper_lsl(target_ulong selector1) | |
23450 | { | |
23451 | unsigned int limit; | |
23452 | uint32_t e1, e2, eflags, selector; | |
23453 | int rpl, dpl, cpl, type; | |
23454 | ||
23455 | selector = selector1 & 0xffff; | |
23456 | eflags = helper_cc_compute_all((env->cc_op)); | |
23457 | if ((selector & 0xfffc) == 0) | |
23458 | goto fail; | |
23459 | if (load_segment(&e1, &e2, selector) != 0) | |
23460 | goto fail; | |
23461 | rpl = selector & 3; | |
23462 | dpl = (e2 >> 13) & 3; | |
23463 | cpl = env->hflags & (3 << 0); | |
23464 | if (e2 & (1 << 12)) { | |
23465 | if ((e2 & (1 << 11)) && (e2 & (1 << 10))) { | |
23466 | ||
23467 | } else { | |
23468 | if (dpl < cpl || dpl < rpl) | |
23469 | goto fail; | |
23470 | } | |
23471 | } else { | |
23472 | type = (e2 >> 8) & 0xf; | |
23473 | switch(type) { | |
23474 | case 1: | |
23475 | case 2: | |
23476 | case 3: | |
23477 | case 9: | |
23478 | case 11: | |
23479 | break; | |
23480 | default: | |
23481 | goto fail; | |
23482 | } | |
23483 | if (dpl < cpl || dpl < rpl) { | |
23484 | fail: | |
23485 | (env->cc_src) = eflags & ~0x0040; | |
23486 | return 0; | |
23487 | } | |
23488 | } | |
23489 | limit = get_seg_limit(e1, e2); | |
23490 | (env->cc_src) = eflags | 0x0040; | |
23491 | return limit; | |
23492 | } | |
23493 | ||
23494 | target_ulong helper_lar(target_ulong selector1) | |
23495 | { | |
23496 | uint32_t e1, e2, eflags, selector; | |
23497 | int rpl, dpl, cpl, type; | |
23498 | ||
23499 | selector = selector1 & 0xffff; | |
23500 | eflags = helper_cc_compute_all((env->cc_op)); | |
23501 | if ((selector & 0xfffc) == 0) | |
23502 | goto fail; | |
23503 | if (load_segment(&e1, &e2, selector) != 0) | |
23504 | goto fail; | |
23505 | rpl = selector & 3; | |
23506 | dpl = (e2 >> 13) & 3; | |
23507 | cpl = env->hflags & (3 << 0); | |
23508 | if (e2 & (1 << 12)) { | |
23509 | if ((e2 & (1 << 11)) && (e2 & (1 << 10))) { | |
23510 | ||
23511 | } else { | |
23512 | if (dpl < cpl || dpl < rpl) | |
23513 | goto fail; | |
23514 | } | |
23515 | } else { | |
23516 | type = (e2 >> 8) & 0xf; | |
23517 | switch(type) { | |
23518 | case 1: | |
23519 | case 2: | |
23520 | case 3: | |
23521 | case 4: | |
23522 | case 5: | |
23523 | case 9: | |
23524 | case 11: | |
23525 | case 12: | |
23526 | break; | |
23527 | default: | |
23528 | goto fail; | |
23529 | } | |
23530 | if (dpl < cpl || dpl < rpl) { | |
23531 | fail: | |
23532 | (env->cc_src) = eflags & ~0x0040; | |
23533 | return 0; | |
23534 | } | |
23535 | } | |
23536 | (env->cc_src) = eflags | 0x0040; | |
23537 | return e2 & 0x00f0ff00; | |
23538 | } | |
23539 | ||
23540 | void helper_verr(target_ulong selector1) | |
23541 | { | |
23542 | uint32_t e1, e2, eflags, selector; | |
23543 | int rpl, dpl, cpl; | |
23544 | ||
23545 | selector = selector1 & 0xffff; | |
23546 | eflags = helper_cc_compute_all((env->cc_op)); | |
23547 | if ((selector & 0xfffc) == 0) | |
23548 | goto fail; | |
23549 | if (load_segment(&e1, &e2, selector) != 0) | |
23550 | goto fail; | |
23551 | if (!(e2 & (1 << 12))) | |
23552 | goto fail; | |
23553 | rpl = selector & 3; | |
23554 | dpl = (e2 >> 13) & 3; | |
23555 | cpl = env->hflags & (3 << 0); | |
23556 | if (e2 & (1 << 11)) { | |
23557 | if (!(e2 & (1 << 9))) | |
23558 | goto fail; | |
23559 | if (!(e2 & (1 << 10))) { | |
23560 | if (dpl < cpl || dpl < rpl) | |
23561 | goto fail; | |
23562 | } | |
23563 | } else { | |
23564 | if (dpl < cpl || dpl < rpl) { | |
23565 | fail: | |
23566 | (env->cc_src) = eflags & ~0x0040; | |
23567 | return; | |
23568 | } | |
23569 | } | |
23570 | (env->cc_src) = eflags | 0x0040; | |
23571 | } | |
23572 | ||
23573 | void helper_verw(target_ulong selector1) | |
23574 | { | |
23575 | uint32_t e1, e2, eflags, selector; | |
23576 | int rpl, dpl, cpl; | |
23577 | ||
23578 | selector = selector1 & 0xffff; | |
23579 | eflags = helper_cc_compute_all((env->cc_op)); | |
23580 | if ((selector & 0xfffc) == 0) | |
23581 | goto fail; | |
23582 | if (load_segment(&e1, &e2, selector) != 0) | |
23583 | goto fail; | |
23584 | if (!(e2 & (1 << 12))) | |
23585 | goto fail; | |
23586 | rpl = selector & 3; | |
23587 | dpl = (e2 >> 13) & 3; | |
23588 | cpl = env->hflags & (3 << 0); | |
23589 | if (e2 & (1 << 11)) { | |
23590 | goto fail; | |
23591 | } else { | |
23592 | if (dpl < cpl || dpl < rpl) | |
23593 | goto fail; | |
23594 | if (!(e2 & (1 << 9))) { | |
23595 | fail: | |
23596 | (env->cc_src) = eflags & ~0x0040; | |
23597 | return; | |
23598 | } | |
23599 | } | |
23600 | (env->cc_src) = eflags | 0x0040; | |
23601 | } | |
23602 | ||
23603 | ||
23604 | ||
23605 | static __attribute__ (( always_inline )) __inline__ double floatx80_to_double(floatx80 a) | |
23606 | { | |
23607 | union { | |
23608 | float64 f64; | |
23609 | double d; | |
23610 | } u; | |
23611 | ||
23612 | u.f64 = floatx80_to_float64(a, &env->fp_status); | |
23613 | return u.d; | |
23614 | } | |
23615 | ||
23616 | static __attribute__ (( always_inline )) __inline__ floatx80 double_to_floatx80(double a) | |
23617 | { | |
23618 | union { | |
23619 | float64 f64; | |
23620 | double d; | |
23621 | } u; | |
23622 | ||
23623 | u.d = a; | |
23624 | return float64_to_floatx80(u.f64, &env->fp_status); | |
23625 | } | |
23626 | ||
23627 | static void fpu_set_exception(int mask) | |
23628 | { | |
23629 | env->fpus |= mask; | |
23630 | if (env->fpus & (~env->fpuc & 0x3f)) | |
23631 | env->fpus |= (1 << 7) | (1 << 15); | |
23632 | } | |
23633 | ||
23634 | static __attribute__ (( always_inline )) __inline__ floatx80 helper_fdiv(floatx80 a, floatx80 b) | |
23635 | { | |
23636 | if (floatx80_is_zero(b)) { | |
23637 | fpu_set_exception((1 << 2)); | |
23638 | } | |
23639 | return floatx80_div(a, b, &env->fp_status); | |
23640 | } | |
23641 | ||
23642 | static void fpu_raise_exception(void) | |
23643 | { | |
23644 | if (env->cr[0] & (1 << 5)) { | |
23645 | raise_exception(16); | |
23646 | } | |
23647 | ||
23648 | else { | |
23649 | cpu_set_ferr(env); | |
23650 | } | |
23651 | ||
23652 | } | |
23653 | ||
23654 | void helper_flds_FT0(uint32_t val) | |
23655 | { | |
23656 | union { | |
23657 | float32 f; | |
23658 | uint32_t i; | |
23659 | } u; | |
23660 | u.i = val; | |
23661 | (env->ft0) = float32_to_floatx80(u.f, &env->fp_status); | |
23662 | } | |
23663 | ||
23664 | void helper_fldl_FT0(uint64_t val) | |
23665 | { | |
23666 | union { | |
23667 | float64 f; | |
23668 | uint64_t i; | |
23669 | } u; | |
23670 | u.i = val; | |
23671 | (env->ft0) = float64_to_floatx80(u.f, &env->fp_status); | |
23672 | } | |
23673 | ||
23674 | void helper_fildl_FT0(int32_t val) | |
23675 | { | |
23676 | (env->ft0) = int32_to_floatx80(val, &env->fp_status); | |
23677 | } | |
23678 | ||
23679 | void helper_flds_ST0(uint32_t val) | |
23680 | { | |
23681 | int new_fpstt; | |
23682 | union { | |
23683 | float32 f; | |
23684 | uint32_t i; | |
23685 | } u; | |
23686 | new_fpstt = (env->fpstt - 1) & 7; | |
23687 | u.i = val; | |
23688 | env->fpregs[new_fpstt].d = float32_to_floatx80(u.f, &env->fp_status); | |
23689 | env->fpstt = new_fpstt; | |
23690 | env->fptags[new_fpstt] = 0; | |
23691 | } | |
23692 | ||
23693 | void helper_fldl_ST0(uint64_t val) | |
23694 | { | |
23695 | int new_fpstt; | |
23696 | union { | |
23697 | float64 f; | |
23698 | uint64_t i; | |
23699 | } u; | |
23700 | new_fpstt = (env->fpstt - 1) & 7; | |
23701 | u.i = val; | |
23702 | env->fpregs[new_fpstt].d = float64_to_floatx80(u.f, &env->fp_status); | |
23703 | env->fpstt = new_fpstt; | |
23704 | env->fptags[new_fpstt] = 0; | |
23705 | } | |
23706 | ||
23707 | void helper_fildl_ST0(int32_t val) | |
23708 | { | |
23709 | int new_fpstt; | |
23710 | new_fpstt = (env->fpstt - 1) & 7; | |
23711 | env->fpregs[new_fpstt].d = int32_to_floatx80(val, &env->fp_status); | |
23712 | env->fpstt = new_fpstt; | |
23713 | env->fptags[new_fpstt] = 0; | |
23714 | } | |
23715 | ||
23716 | void helper_fildll_ST0(int64_t val) | |
23717 | { | |
23718 | int new_fpstt; | |
23719 | new_fpstt = (env->fpstt - 1) & 7; | |
23720 | env->fpregs[new_fpstt].d = int64_to_floatx80(val, &env->fp_status); | |
23721 | env->fpstt = new_fpstt; | |
23722 | env->fptags[new_fpstt] = 0; | |
23723 | } | |
23724 | ||
23725 | uint32_t helper_fsts_ST0(void) | |
23726 | { | |
23727 | union { | |
23728 | float32 f; | |
23729 | uint32_t i; | |
23730 | } u; | |
23731 | u.f = floatx80_to_float32((env->fpregs[env->fpstt].d), &env->fp_status); | |
23732 | return u.i; | |
23733 | } | |
23734 | ||
23735 | uint64_t helper_fstl_ST0(void) | |
23736 | { | |
23737 | union { | |
23738 | float64 f; | |
23739 | uint64_t i; | |
23740 | } u; | |
23741 | u.f = floatx80_to_float64((env->fpregs[env->fpstt].d), &env->fp_status); | |
23742 | return u.i; | |
23743 | } | |
23744 | ||
23745 | int32_t helper_fist_ST0(void) | |
23746 | { | |
23747 | int32_t val; | |
23748 | val = floatx80_to_int32((env->fpregs[env->fpstt].d), &env->fp_status); | |
23749 | if (val != (int16_t)val) | |
23750 | val = -32768; | |
23751 | return val; | |
23752 | } | |
23753 | ||
23754 | int32_t helper_fistl_ST0(void) | |
23755 | { | |
23756 | int32_t val; | |
23757 | val = floatx80_to_int32((env->fpregs[env->fpstt].d), &env->fp_status); | |
23758 | return val; | |
23759 | } | |
23760 | ||
23761 | int64_t helper_fistll_ST0(void) | |
23762 | { | |
23763 | int64_t val; | |
23764 | val = floatx80_to_int64((env->fpregs[env->fpstt].d), &env->fp_status); | |
23765 | return val; | |
23766 | } | |
23767 | ||
23768 | int32_t helper_fistt_ST0(void) | |
23769 | { | |
23770 | int32_t val; | |
23771 | val = floatx80_to_int32_round_to_zero((env->fpregs[env->fpstt].d), &env->fp_status); | |
23772 | if (val != (int16_t)val) | |
23773 | val = -32768; | |
23774 | return val; | |
23775 | } | |
23776 | ||
23777 | int32_t helper_fisttl_ST0(void) | |
23778 | { | |
23779 | int32_t val; | |
23780 | val = floatx80_to_int32_round_to_zero((env->fpregs[env->fpstt].d), &env->fp_status); | |
23781 | return val; | |
23782 | } | |
23783 | ||
23784 | int64_t helper_fisttll_ST0(void) | |
23785 | { | |
23786 | int64_t val; | |
23787 | val = floatx80_to_int64_round_to_zero((env->fpregs[env->fpstt].d), &env->fp_status); | |
23788 | return val; | |
23789 | } | |
23790 | ||
23791 | void helper_fldt_ST0(target_ulong ptr) | |
23792 | { | |
23793 | int new_fpstt; | |
23794 | new_fpstt = (env->fpstt - 1) & 7; | |
23795 | env->fpregs[new_fpstt].d = helper_fldt(ptr); | |
23796 | env->fpstt = new_fpstt; | |
23797 | env->fptags[new_fpstt] = 0; | |
23798 | } | |
23799 | ||
23800 | void helper_fstt_ST0(target_ulong ptr) | |
23801 | { | |
23802 | helper_fstt((env->fpregs[env->fpstt].d), ptr); | |
23803 | } | |
23804 | ||
23805 | void helper_fpush(void) | |
23806 | { | |
23807 | fpush(); | |
23808 | } | |
23809 | ||
23810 | void helper_fpop(void) | |
23811 | { | |
23812 | fpop(); | |
23813 | } | |
23814 | ||
23815 | void helper_fdecstp(void) | |
23816 | { | |
23817 | env->fpstt = (env->fpstt - 1) & 7; | |
23818 | env->fpus &= (~0x4700); | |
23819 | } | |
23820 | ||
23821 | void helper_fincstp(void) | |
23822 | { | |
23823 | env->fpstt = (env->fpstt + 1) & 7; | |
23824 | env->fpus &= (~0x4700); | |
23825 | } | |
23826 | ||
23827 | ||
23828 | ||
23829 | void helper_ffree_STN(int st_index) | |
23830 | { | |
23831 | env->fptags[(env->fpstt + st_index) & 7] = 1; | |
23832 | } | |
23833 | ||
23834 | void helper_fmov_ST0_FT0(void) | |
23835 | { | |
23836 | (env->fpregs[env->fpstt].d) = (env->ft0); | |
23837 | } | |
23838 | ||
23839 | void helper_fmov_FT0_STN(int st_index) | |
23840 | { | |
23841 | (env->ft0) = (env->fpregs[(env->fpstt + (st_index)) & 7].d); | |
23842 | } | |
23843 | ||
23844 | void helper_fmov_ST0_STN(int st_index) | |
23845 | { | |
23846 | (env->fpregs[env->fpstt].d) = (env->fpregs[(env->fpstt + (st_index)) & 7].d); | |
23847 | } | |
23848 | ||
23849 | void helper_fmov_STN_ST0(int st_index) | |
23850 | { | |
23851 | (env->fpregs[(env->fpstt + (st_index)) & 7].d) = (env->fpregs[env->fpstt].d); | |
23852 | } | |
23853 | ||
23854 | void helper_fxchg_ST0_STN(int st_index) | |
23855 | { | |
23856 | floatx80 tmp; | |
23857 | tmp = (env->fpregs[(env->fpstt + (st_index)) & 7].d); | |
23858 | (env->fpregs[(env->fpstt + (st_index)) & 7].d) = (env->fpregs[env->fpstt].d); | |
23859 | (env->fpregs[env->fpstt].d) = tmp; | |
23860 | } | |
23861 | ||
23862 | ||
23863 | ||
23864 | static const int fcom_ccval[4] = {0x0100, 0x4000, 0x0000, 0x4500}; | |
23865 | ||
23866 | void helper_fcom_ST0_FT0(void) | |
23867 | { | |
23868 | int ret; | |
23869 | ||
23870 | ret = floatx80_compare((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); | |
23871 | env->fpus = (env->fpus & ~0x4500) | fcom_ccval[ret + 1]; | |
23872 | } | |
23873 | ||
23874 | void helper_fucom_ST0_FT0(void) | |
23875 | { | |
23876 | int ret; | |
23877 | ||
23878 | ret = floatx80_compare_quiet((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); | |
23879 | env->fpus = (env->fpus & ~0x4500) | fcom_ccval[ret+ 1]; | |
23880 | } | |
23881 | ||
23882 | static const int fcomi_ccval[4] = {0x0001, 0x0040, 0, 0x0040 | 0x0004 | 0x0001}; | |
23883 | ||
23884 | void helper_fcomi_ST0_FT0(void) | |
23885 | { | |
23886 | int eflags; | |
23887 | int ret; | |
23888 | ||
23889 | ret = floatx80_compare((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); | |
23890 | eflags = helper_cc_compute_all((env->cc_op)); | |
23891 | eflags = (eflags & ~(0x0040 | 0x0004 | 0x0001)) | fcomi_ccval[ret + 1]; | |
23892 | (env->cc_src) = eflags; | |
23893 | } | |
23894 | ||
23895 | void helper_fucomi_ST0_FT0(void) | |
23896 | { | |
23897 | int eflags; | |
23898 | int ret; | |
23899 | ||
23900 | ret = floatx80_compare_quiet((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); | |
23901 | eflags = helper_cc_compute_all((env->cc_op)); | |
23902 | eflags = (eflags & ~(0x0040 | 0x0004 | 0x0001)) | fcomi_ccval[ret + 1]; | |
23903 | (env->cc_src) = eflags; | |
23904 | } | |
23905 | ||
23906 | void helper_fadd_ST0_FT0(void) | |
23907 | { | |
23908 | (env->fpregs[env->fpstt].d) = floatx80_add((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); | |
23909 | } | |
23910 | ||
23911 | void helper_fmul_ST0_FT0(void) | |
23912 | { | |
23913 | (env->fpregs[env->fpstt].d) = floatx80_mul((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); | |
23914 | } | |
23915 | ||
23916 | void helper_fsub_ST0_FT0(void) | |
23917 | { | |
23918 | (env->fpregs[env->fpstt].d) = floatx80_sub((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); | |
23919 | } | |
23920 | ||
23921 | void helper_fsubr_ST0_FT0(void) | |
23922 | { | |
23923 | (env->fpregs[env->fpstt].d) = floatx80_sub((env->ft0), (env->fpregs[env->fpstt].d), &env->fp_status); | |
23924 | } | |
23925 | ||
23926 | void helper_fdiv_ST0_FT0(void) | |
23927 | { | |
23928 | (env->fpregs[env->fpstt].d) = helper_fdiv((env->fpregs[env->fpstt].d), (env->ft0)); | |
23929 | } | |
23930 | ||
23931 | void helper_fdivr_ST0_FT0(void) | |
23932 | { | |
23933 | (env->fpregs[env->fpstt].d) = helper_fdiv((env->ft0), (env->fpregs[env->fpstt].d)); | |
23934 | } | |
23935 | ||
23936 | ||
23937 | ||
23938 | void helper_fadd_STN_ST0(int st_index) | |
23939 | { | |
23940 | (env->fpregs[(env->fpstt + (st_index)) & 7].d) = floatx80_add((env->fpregs[(env->fpstt + (st_index)) & 7].d), (env->fpregs[env->fpstt].d), &env->fp_status); | |
23941 | } | |
23942 | ||
23943 | void helper_fmul_STN_ST0(int st_index) | |
23944 | { | |
23945 | (env->fpregs[(env->fpstt + (st_index)) & 7].d) = floatx80_mul((env->fpregs[(env->fpstt + (st_index)) & 7].d), (env->fpregs[env->fpstt].d), &env->fp_status); | |
23946 | } | |
23947 | ||
23948 | void helper_fsub_STN_ST0(int st_index) | |
23949 | { | |
23950 | (env->fpregs[(env->fpstt + (st_index)) & 7].d) = floatx80_sub((env->fpregs[(env->fpstt + (st_index)) & 7].d), (env->fpregs[env->fpstt].d), &env->fp_status); | |
23951 | } | |
23952 | ||
23953 | void helper_fsubr_STN_ST0(int st_index) | |
23954 | { | |
23955 | (env->fpregs[(env->fpstt + (st_index)) & 7].d) = floatx80_sub((env->fpregs[env->fpstt].d), (env->fpregs[(env->fpstt + (st_index)) & 7].d), &env->fp_status); | |
23956 | } | |
23957 | ||
23958 | void helper_fdiv_STN_ST0(int st_index) | |
23959 | { | |
23960 | floatx80 *p; | |
23961 | p = &(env->fpregs[(env->fpstt + (st_index)) & 7].d); | |
23962 | *p = helper_fdiv(*p, (env->fpregs[env->fpstt].d)); | |
23963 | } | |
23964 | ||
23965 | void helper_fdivr_STN_ST0(int st_index) | |
23966 | { | |
23967 | floatx80 *p; | |
23968 | p = &(env->fpregs[(env->fpstt + (st_index)) & 7].d); | |
23969 | *p = helper_fdiv((env->fpregs[env->fpstt].d), *p); | |
23970 | } | |
23971 | ||
23972 | ||
23973 | void helper_fchs_ST0(void) | |
23974 | { | |
23975 | (env->fpregs[env->fpstt].d) = floatx80_chs((env->fpregs[env->fpstt].d)); | |
23976 | } | |
23977 | ||
23978 | void helper_fabs_ST0(void) | |
23979 | { | |
23980 | (env->fpregs[env->fpstt].d) = floatx80_abs((env->fpregs[env->fpstt].d)); | |
23981 | } | |
23982 | ||
23983 | void helper_fld1_ST0(void) | |
23984 | { | |
23985 | (env->fpregs[env->fpstt].d) = ((floatx80) { 0x8000000000000000LL, 0x3fff }); | |
23986 | } | |
23987 | ||
23988 | void helper_fldl2t_ST0(void) | |
23989 | { | |
23990 | (env->fpregs[env->fpstt].d) = ((floatx80) { 0xd49a784bcd1b8afeLL, 0x4000 }); | |
23991 | } | |
23992 | ||
23993 | void helper_fldl2e_ST0(void) | |
23994 | { | |
23995 | (env->fpregs[env->fpstt].d) = ((floatx80) { 0xb8aa3b295c17f0bcLL, 0x3fff }); | |
23996 | } | |
23997 | ||
23998 | void helper_fldpi_ST0(void) | |
23999 | { | |
24000 | (env->fpregs[env->fpstt].d) = ((floatx80) { 0xc90fdaa22168c235LL, 0x4000 }); | |
24001 | } | |
24002 | ||
24003 | void helper_fldlg2_ST0(void) | |
24004 | { | |
24005 | (env->fpregs[env->fpstt].d) = ((floatx80) { 0x9a209a84fbcff799LL, 0x3ffd }); | |
24006 | } | |
24007 | ||
24008 | void helper_fldln2_ST0(void) | |
24009 | { | |
24010 | (env->fpregs[env->fpstt].d) = ((floatx80) { 0xb17217f7d1cf79acLL, 0x3ffe }); | |
24011 | } | |
24012 | ||
24013 | void helper_fldz_ST0(void) | |
24014 | { | |
24015 | (env->fpregs[env->fpstt].d) = ((floatx80) { 0x0000000000000000LL, 0x0000 }); | |
24016 | } | |
24017 | ||
24018 | void helper_fldz_FT0(void) | |
24019 | { | |
24020 | (env->ft0) = ((floatx80) { 0x0000000000000000LL, 0x0000 }); | |
24021 | } | |
24022 | ||
24023 | uint32_t helper_fnstsw(void) | |
24024 | { | |
24025 | return (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11; | |
24026 | } | |
24027 | ||
24028 | uint32_t helper_fnstcw(void) | |
24029 | { | |
24030 | return env->fpuc; | |
24031 | } | |
24032 | ||
24033 | static void update_fp_status(void) | |
24034 | { | |
24035 | int rnd_type; | |
24036 | ||
24037 | ||
24038 | switch(env->fpuc & 0xc00) { | |
24039 | default: | |
24040 | case 0x000: | |
24041 | rnd_type = float_round_nearest_even; | |
24042 | break; | |
24043 | case 0x400: | |
24044 | rnd_type = float_round_down; | |
24045 | break; | |
24046 | case 0x800: | |
24047 | rnd_type = float_round_up; | |
24048 | break; | |
24049 | case 0xc00: | |
24050 | rnd_type = float_round_to_zero; | |
24051 | break; | |
24052 | } | |
24053 | set_float_rounding_mode(rnd_type, &env->fp_status); | |
24054 | switch((env->fpuc >> 8) & 3) { | |
24055 | case 0: | |
24056 | rnd_type = 32; | |
24057 | break; | |
24058 | case 2: | |
24059 | rnd_type = 64; | |
24060 | break; | |
24061 | case 3: | |
24062 | default: | |
24063 | rnd_type = 80; | |
24064 | break; | |
24065 | } | |
24066 | set_floatx80_rounding_precision(rnd_type, &env->fp_status); | |
24067 | } | |
24068 | ||
24069 | void helper_fldcw(uint32_t val) | |
24070 | { | |
24071 | env->fpuc = val; | |
24072 | update_fp_status(); | |
24073 | } | |
24074 | ||
24075 | void helper_fclex(void) | |
24076 | { | |
24077 | env->fpus &= 0x7f00; | |
24078 | } | |
24079 | ||
24080 | void helper_fwait(void) | |
24081 | { | |
24082 | if (env->fpus & (1 << 7)) | |
24083 | fpu_raise_exception(); | |
24084 | } | |
24085 | ||
24086 | void helper_fninit(void) | |
24087 | { | |
24088 | env->fpus = 0; | |
24089 | env->fpstt = 0; | |
24090 | env->fpuc = 0x37f; | |
24091 | env->fptags[0] = 1; | |
24092 | env->fptags[1] = 1; | |
24093 | env->fptags[2] = 1; | |
24094 | env->fptags[3] = 1; | |
24095 | env->fptags[4] = 1; | |
24096 | env->fptags[5] = 1; | |
24097 | env->fptags[6] = 1; | |
24098 | env->fptags[7] = 1; | |
24099 | } | |
24100 | ||
24101 | ||
24102 | ||
24103 | void helper_fbld_ST0(target_ulong ptr) | |
24104 | { | |
24105 | floatx80 tmp; | |
24106 | uint64_t val; | |
24107 | unsigned int v; | |
24108 | int i; | |
24109 | ||
24110 | val = 0; | |
24111 | for(i = 8; i >= 0; i--) { | |
24112 | v = ldub_data(ptr + i); | |
24113 | val = (val * 100) + ((v >> 4) * 10) + (v & 0xf); | |
24114 | } | |
24115 | tmp = int64_to_floatx80(val, &env->fp_status); | |
24116 | if (ldub_data(ptr + 9) & 0x80) { | |
24117 | floatx80_chs(tmp); | |
24118 | } | |
24119 | fpush(); | |
24120 | (env->fpregs[env->fpstt].d) = tmp; | |
24121 | } | |
24122 | ||
24123 | void helper_fbst_ST0(target_ulong ptr) | |
24124 | { | |
24125 | int v; | |
24126 | target_ulong mem_ref, mem_end; | |
24127 | int64_t val; | |
24128 | ||
24129 | val = floatx80_to_int64((env->fpregs[env->fpstt].d), &env->fp_status); | |
24130 | mem_ref = ptr; | |
24131 | mem_end = mem_ref + 9; | |
24132 | if (val < 0) { | |
24133 | stb_data(mem_end, 0x80); | |
24134 | val = -val; | |
24135 | } else { | |
24136 | stb_data(mem_end, 0x00); | |
24137 | } | |
24138 | while (mem_ref < mem_end) { | |
24139 | if (val == 0) | |
24140 | break; | |
24141 | v = val % 100; | |
24142 | val = val / 100; | |
24143 | v = ((v / 10) << 4) | (v % 10); | |
24144 | stb_data(mem_ref++, v); | |
24145 | } | |
24146 | while (mem_ref < mem_end) { | |
24147 | stb_data(mem_ref++, 0); | |
24148 | } | |
24149 | } | |
24150 | ||
24151 | void helper_f2xm1(void) | |
24152 | { | |
24153 | double val = floatx80_to_double((env->fpregs[env->fpstt].d)); | |
24154 | val = pow(2.0, val) - 1.0; | |
24155 | (env->fpregs[env->fpstt].d) = double_to_floatx80(val); | |
24156 | } | |
24157 | ||
24158 | void helper_fyl2x(void) | |
24159 | { | |
24160 | double fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); | |
24161 | ||
24162 | if (fptemp>0.0){ | |
24163 | fptemp = log(fptemp)/log(2.0); | |
24164 | fptemp *= floatx80_to_double((env->fpregs[(env->fpstt + (1)) & 7].d)); | |
24165 | (env->fpregs[(env->fpstt + (1)) & 7].d) = double_to_floatx80(fptemp); | |
24166 | fpop(); | |
24167 | } else { | |
24168 | env->fpus &= (~0x4700); | |
24169 | env->fpus |= 0x400; | |
24170 | } | |
24171 | } | |
24172 | ||
24173 | void helper_fptan(void) | |
24174 | { | |
24175 | double fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); | |
24176 | ||
24177 | if((fptemp > 9223372036854775808.0)||(fptemp < -9223372036854775808.0)) { | |
24178 | env->fpus |= 0x400; | |
24179 | } else { | |
24180 | fptemp = tan(fptemp); | |
24181 | (env->fpregs[env->fpstt].d) = double_to_floatx80(fptemp); | |
24182 | fpush(); | |
24183 | (env->fpregs[env->fpstt].d) = ((floatx80) { 0x8000000000000000LL, 0x3fff }); | |
24184 | env->fpus &= (~0x400); | |
24185 | ||
24186 | } | |
24187 | } | |
24188 | ||
24189 | void helper_fpatan(void) | |
24190 | { | |
24191 | double fptemp, fpsrcop; | |
24192 | ||
24193 | fpsrcop = floatx80_to_double((env->fpregs[(env->fpstt + (1)) & 7].d)); | |
24194 | fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); | |
24195 | (env->fpregs[(env->fpstt + (1)) & 7].d) = double_to_floatx80(atan2(fpsrcop, fptemp)); | |
24196 | fpop(); | |
24197 | } | |
24198 | ||
24199 | void helper_fxtract(void) | |
24200 | { | |
24201 | CPU_LDoubleU temp; | |
24202 | ||
24203 | temp.d = (env->fpregs[env->fpstt].d); | |
24204 | ||
24205 | if (floatx80_is_zero((env->fpregs[env->fpstt].d))) { | |
24206 | ||
24207 | (env->fpregs[env->fpstt].d) = floatx80_div(floatx80_chs(((floatx80) { 0x8000000000000000LL, 0x3fff })), ((floatx80) { 0x0000000000000000LL, 0x0000 }), &env->fp_status); | |
24208 | fpush(); | |
24209 | (env->fpregs[env->fpstt].d) = temp.d; | |
24210 | } else { | |
24211 | int expdif; | |
24212 | ||
24213 | expdif = (temp.l.upper & 0x7fff) - 16383; | |
24214 | ||
24215 | (env->fpregs[env->fpstt].d) = int32_to_floatx80(expdif, &env->fp_status); | |
24216 | fpush(); | |
24217 | temp.l.upper = (temp.l.upper & ~(0x7fff)) | 16383; | |
24218 | (env->fpregs[env->fpstt].d) = temp.d; | |
24219 | } | |
24220 | } | |
24221 | ||
24222 | void helper_fprem1(void) | |
24223 | { | |
24224 | double st0, st1, dblq, fpsrcop, fptemp; | |
24225 | CPU_LDoubleU fpsrcop1, fptemp1; | |
24226 | int expdif; | |
24227 | signed long long int q; | |
24228 | ||
24229 | st0 = floatx80_to_double((env->fpregs[env->fpstt].d)); | |
24230 | st1 = floatx80_to_double((env->fpregs[(env->fpstt + (1)) & 7].d)); | |
24231 | ||
24232 | if ((sizeof (st0) == sizeof (float) ? __isinff (st0) : sizeof (st0) == sizeof (double) ? __isinf (st0) : __isinfl (st0)) || (sizeof (st0) == sizeof (float) ? __isnanf (st0) : sizeof (st0) == sizeof (double) ? __isnan (st0) : __isnanl (st0)) || (sizeof (st1) == sizeof (float) ? __isnanf (st1) : sizeof (st1) == sizeof (double) ? __isnan (st1) : __isnanl (st1)) || (st1 == 0.0)) { | |
24233 | (env->fpregs[env->fpstt].d) = double_to_floatx80(0.0 / 0.0); | |
24234 | env->fpus &= (~0x4700); | |
24235 | return; | |
24236 | } | |
24237 | ||
24238 | fpsrcop = st0; | |
24239 | fptemp = st1; | |
24240 | fpsrcop1.d = (env->fpregs[env->fpstt].d); | |
24241 | fptemp1.d = (env->fpregs[(env->fpstt + (1)) & 7].d); | |
24242 | expdif = (fpsrcop1.l.upper & 0x7fff) - (fptemp1.l.upper & 0x7fff); | |
24243 | ||
24244 | if (expdif < 0) { | |
24245 | ||
24246 | env->fpus &= (~0x4700); | |
24247 | ||
24248 | return; | |
24249 | } | |
24250 | ||
24251 | if (expdif < 53) { | |
24252 | dblq = fpsrcop / fptemp; | |
24253 | ||
24254 | dblq = rint(dblq); | |
24255 | st0 = fpsrcop - fptemp * dblq; | |
24256 | ||
24257 | ||
24258 | if (dblq < 0.0) | |
24259 | q = (signed long long int)(-dblq); | |
24260 | else | |
24261 | q = (signed long long int)dblq; | |
24262 | ||
24263 | env->fpus &= (~0x4700); | |
24264 | ||
24265 | env->fpus |= (q & 0x4) << (8 - 2); | |
24266 | env->fpus |= (q & 0x2) << (14 - 1); | |
24267 | env->fpus |= (q & 0x1) << (9 - 0); | |
24268 | } else { | |
24269 | env->fpus |= 0x400; | |
24270 | fptemp = pow(2.0, expdif - 50); | |
24271 | fpsrcop = (st0 / st1) / fptemp; | |
24272 | ||
24273 | fpsrcop = (fpsrcop < 0.0) ? | |
24274 | -(floor(fabs(fpsrcop))) : floor(fpsrcop); | |
24275 | st0 -= (st1 * fpsrcop * fptemp); | |
24276 | } | |
24277 | (env->fpregs[env->fpstt].d) = double_to_floatx80(st0); | |
24278 | } | |
24279 | ||
24280 | void helper_fprem(void) | |
24281 | { | |
24282 | double st0, st1, dblq, fpsrcop, fptemp; | |
24283 | CPU_LDoubleU fpsrcop1, fptemp1; | |
24284 | int expdif; | |
24285 | signed long long int q; | |
24286 | ||
24287 | st0 = floatx80_to_double((env->fpregs[env->fpstt].d)); | |
24288 | st1 = floatx80_to_double((env->fpregs[(env->fpstt + (1)) & 7].d)); | |
24289 | ||
24290 | if ((sizeof (st0) == sizeof (float) ? __isinff (st0) : sizeof (st0) == sizeof (double) ? __isinf (st0) : __isinfl (st0)) || (sizeof (st0) == sizeof (float) ? __isnanf (st0) : sizeof (st0) == sizeof (double) ? __isnan (st0) : __isnanl (st0)) || (sizeof (st1) == sizeof (float) ? __isnanf (st1) : sizeof (st1) == sizeof (double) ? __isnan (st1) : __isnanl (st1)) || (st1 == 0.0)) { | |
24291 | (env->fpregs[env->fpstt].d) = double_to_floatx80(0.0 / 0.0); | |
24292 | env->fpus &= (~0x4700); | |
24293 | return; | |
24294 | } | |
24295 | ||
24296 | fpsrcop = st0; | |
24297 | fptemp = st1; | |
24298 | fpsrcop1.d = (env->fpregs[env->fpstt].d); | |
24299 | fptemp1.d = (env->fpregs[(env->fpstt + (1)) & 7].d); | |
24300 | expdif = (fpsrcop1.l.upper & 0x7fff) - (fptemp1.l.upper & 0x7fff); | |
24301 | ||
24302 | if (expdif < 0) { | |
24303 | ||
24304 | env->fpus &= (~0x4700); | |
24305 | ||
24306 | return; | |
24307 | } | |
24308 | ||
24309 | if ( expdif < 53 ) { | |
24310 | dblq = fpsrcop / fptemp ; | |
24311 | ||
24312 | dblq = (dblq < 0.0) ? ceil(dblq) : floor(dblq); | |
24313 | st0 = fpsrcop - fptemp * dblq; | |
24314 | ||
24315 | ||
24316 | if (dblq < 0.0) | |
24317 | q = (signed long long int)(-dblq); | |
24318 | else | |
24319 | q = (signed long long int)dblq; | |
24320 | ||
24321 | env->fpus &= (~0x4700); | |
24322 | ||
24323 | env->fpus |= (q & 0x4) << (8 - 2); | |
24324 | env->fpus |= (q & 0x2) << (14 - 1); | |
24325 | env->fpus |= (q & 0x1) << (9 - 0); | |
24326 | } else { | |
24327 | int N = 32 + (expdif % 32); | |
24328 | env->fpus |= 0x400; | |
24329 | fptemp = pow(2.0, (double)(expdif - N)); | |
24330 | fpsrcop = (st0 / st1) / fptemp; | |
24331 | ||
24332 | fpsrcop = (fpsrcop < 0.0) ? | |
24333 | -(floor(fabs(fpsrcop))) : floor(fpsrcop); | |
24334 | st0 -= (st1 * fpsrcop * fptemp); | |
24335 | } | |
24336 | (env->fpregs[env->fpstt].d) = double_to_floatx80(st0); | |
24337 | } | |
24338 | ||
24339 | void helper_fyl2xp1(void) | |
24340 | { | |
24341 | double fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); | |
24342 | ||
24343 | if ((fptemp+1.0)>0.0) { | |
24344 | fptemp = log(fptemp+1.0) / log(2.0); | |
24345 | fptemp *= floatx80_to_double((env->fpregs[(env->fpstt + (1)) & 7].d)); | |
24346 | (env->fpregs[(env->fpstt + (1)) & 7].d) = double_to_floatx80(fptemp); | |
24347 | fpop(); | |
24348 | } else { | |
24349 | env->fpus &= (~0x4700); | |
24350 | env->fpus |= 0x400; | |
24351 | } | |
24352 | } | |
24353 | ||
24354 | void helper_fsqrt(void) | |
24355 | { | |
24356 | if (floatx80_is_neg((env->fpregs[env->fpstt].d))) { | |
24357 | env->fpus &= (~0x4700); | |
24358 | env->fpus |= 0x400; | |
24359 | } | |
24360 | (env->fpregs[env->fpstt].d) = floatx80_sqrt((env->fpregs[env->fpstt].d), &env->fp_status); | |
24361 | } | |
24362 | ||
24363 | void helper_fsincos(void) | |
24364 | { | |
24365 | double fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); | |
24366 | ||
24367 | if ((fptemp > 9223372036854775808.0)||(fptemp < -9223372036854775808.0)) { | |
24368 | env->fpus |= 0x400; | |
24369 | } else { | |
24370 | (env->fpregs[env->fpstt].d) = double_to_floatx80(sin(fptemp)); | |
24371 | fpush(); | |
24372 | (env->fpregs[env->fpstt].d) = double_to_floatx80(cos(fptemp)); | |
24373 | env->fpus &= (~0x400); | |
24374 | ||
24375 | } | |
24376 | } | |
24377 | ||
24378 | void helper_frndint(void) | |
24379 | { | |
24380 | (env->fpregs[env->fpstt].d) = floatx80_round_to_int((env->fpregs[env->fpstt].d), &env->fp_status); | |
24381 | } | |
24382 | ||
24383 | void helper_fscale(void) | |
24384 | { | |
24385 | if (floatx80_is_any_nan((env->fpregs[(env->fpstt + (1)) & 7].d))) { | |
24386 | (env->fpregs[env->fpstt].d) = (env->fpregs[(env->fpstt + (1)) & 7].d); | |
24387 | } else { | |
24388 | int n = floatx80_to_int32_round_to_zero((env->fpregs[(env->fpstt + (1)) & 7].d), &env->fp_status); | |
24389 | (env->fpregs[env->fpstt].d) = floatx80_scalbn((env->fpregs[env->fpstt].d), n, &env->fp_status); | |
24390 | } | |
24391 | } | |
24392 | ||
24393 | void helper_fsin(void) | |
24394 | { | |
24395 | double fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); | |
24396 | ||
24397 | if ((fptemp > 9223372036854775808.0)||(fptemp < -9223372036854775808.0)) { | |
24398 | env->fpus |= 0x400; | |
24399 | } else { | |
24400 | (env->fpregs[env->fpstt].d) = double_to_floatx80(sin(fptemp)); | |
24401 | env->fpus &= (~0x400); | |
24402 | ||
24403 | } | |
24404 | } | |
24405 | ||
24406 | void helper_fcos(void) | |
24407 | { | |
24408 | double fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); | |
24409 | ||
24410 | if((fptemp > 9223372036854775808.0)||(fptemp < -9223372036854775808.0)) { | |
24411 | env->fpus |= 0x400; | |
24412 | } else { | |
24413 | (env->fpregs[env->fpstt].d) = double_to_floatx80(cos(fptemp)); | |
24414 | env->fpus &= (~0x400); | |
24415 | ||
24416 | } | |
24417 | } | |
24418 | ||
24419 | void helper_fxam_ST0(void) | |
24420 | { | |
24421 | CPU_LDoubleU temp; | |
24422 | int expdif; | |
24423 | ||
24424 | temp.d = (env->fpregs[env->fpstt].d); | |
24425 | ||
24426 | env->fpus &= (~0x4700); | |
24427 | if (((temp.l.upper) & 0x8000)) | |
24428 | env->fpus |= 0x200; | |
24429 | ||
24430 | ||
24431 | expdif = (temp.l.upper & 0x7fff); | |
24432 | if (expdif == 0x7fff) { | |
24433 | if ((temp.l.lower) == 0x8000000000000000ULL) | |
24434 | env->fpus |= 0x500 ; | |
24435 | else | |
24436 | env->fpus |= 0x100 ; | |
24437 | } else if (expdif == 0) { | |
24438 | if ((temp.l.lower) == 0) | |
24439 | env->fpus |= 0x4000 ; | |
24440 | else | |
24441 | env->fpus |= 0x4400 ; | |
24442 | } else { | |
24443 | env->fpus |= 0x400; | |
24444 | } | |
24445 | } | |
24446 | ||
24447 | void helper_fstenv(target_ulong ptr, int data32) | |
24448 | { | |
24449 | int fpus, fptag, exp, i; | |
24450 | uint64_t mant; | |
24451 | CPU_LDoubleU tmp; | |
24452 | ||
24453 | fpus = (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11; | |
24454 | fptag = 0; | |
24455 | for (i=7; i>=0; i--) { | |
24456 | fptag <<= 2; | |
24457 | if (env->fptags[i]) { | |
24458 | fptag |= 3; | |
24459 | } else { | |
24460 | tmp.d = env->fpregs[i].d; | |
24461 | exp = (tmp.l.upper & 0x7fff); | |
24462 | mant = (tmp.l.lower); | |
24463 | if (exp == 0 && mant == 0) { | |
24464 | ||
24465 | fptag |= 1; | |
24466 | } else if (exp == 0 || exp == 0x7fff | |
24467 | || (mant & (1LL << 63)) == 0 | |
24468 | ) { | |
24469 | ||
24470 | fptag |= 2; | |
24471 | } | |
24472 | } | |
24473 | } | |
24474 | if (data32) { | |
24475 | ||
24476 | stl_data(ptr, env->fpuc); | |
24477 | stl_data(ptr + 4, fpus); | |
24478 | stl_data(ptr + 8, fptag); | |
24479 | stl_data(ptr + 12, 0); | |
24480 | stl_data(ptr + 16, 0); | |
24481 | stl_data(ptr + 20, 0); | |
24482 | stl_data(ptr + 24, 0); | |
24483 | } else { | |
24484 | ||
24485 | stw_data(ptr, env->fpuc); | |
24486 | stw_data(ptr + 2, fpus); | |
24487 | stw_data(ptr + 4, fptag); | |
24488 | stw_data(ptr + 6, 0); | |
24489 | stw_data(ptr + 8, 0); | |
24490 | stw_data(ptr + 10, 0); | |
24491 | stw_data(ptr + 12, 0); | |
24492 | } | |
24493 | } | |
24494 | ||
24495 | void helper_fldenv(target_ulong ptr, int data32) | |
24496 | { | |
24497 | int i, fpus, fptag; | |
24498 | ||
24499 | if (data32) { | |
24500 | env->fpuc = lduw_data(ptr); | |
24501 | fpus = lduw_data(ptr + 4); | |
24502 | fptag = lduw_data(ptr + 8); | |
24503 | } | |
24504 | else { | |
24505 | env->fpuc = lduw_data(ptr); | |
24506 | fpus = lduw_data(ptr + 2); | |
24507 | fptag = lduw_data(ptr + 4); | |
24508 | } | |
24509 | env->fpstt = (fpus >> 11) & 7; | |
24510 | env->fpus = fpus & ~0x3800; | |
24511 | for(i = 0;i < 8; i++) { | |
24512 | env->fptags[i] = ((fptag & 3) == 3); | |
24513 | fptag >>= 2; | |
24514 | } | |
24515 | } | |
24516 | ||
24517 | void helper_fsave(target_ulong ptr, int data32) | |
24518 | { | |
24519 | floatx80 tmp; | |
24520 | int i; | |
24521 | ||
24522 | helper_fstenv(ptr, data32); | |
24523 | ||
24524 | ptr += (14 << data32); | |
24525 | for(i = 0;i < 8; i++) { | |
24526 | tmp = (env->fpregs[(env->fpstt + (i)) & 7].d); | |
24527 | helper_fstt(tmp, ptr); | |
24528 | ptr += 10; | |
24529 | } | |
24530 | ||
24531 | ||
24532 | env->fpus = 0; | |
24533 | env->fpstt = 0; | |
24534 | env->fpuc = 0x37f; | |
24535 | env->fptags[0] = 1; | |
24536 | env->fptags[1] = 1; | |
24537 | env->fptags[2] = 1; | |
24538 | env->fptags[3] = 1; | |
24539 | env->fptags[4] = 1; | |
24540 | env->fptags[5] = 1; | |
24541 | env->fptags[6] = 1; | |
24542 | env->fptags[7] = 1; | |
24543 | } | |
24544 | ||
24545 | void helper_frstor(target_ulong ptr, int data32) | |
24546 | { | |
24547 | floatx80 tmp; | |
24548 | int i; | |
24549 | ||
24550 | helper_fldenv(ptr, data32); | |
24551 | ptr += (14 << data32); | |
24552 | ||
24553 | for(i = 0;i < 8; i++) { | |
24554 | tmp = helper_fldt(ptr); | |
24555 | (env->fpregs[(env->fpstt + (i)) & 7].d) = tmp; | |
24556 | ptr += 10; | |
24557 | } | |
24558 | } | |
24559 | # 4591 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
24560 | void helper_fxsave(target_ulong ptr, int data64) | |
24561 | { | |
24562 | int fpus, fptag, i, nb_xmm_regs; | |
24563 | floatx80 tmp; | |
24564 | target_ulong addr; | |
24565 | ||
24566 | ||
24567 | if (ptr & 0xf) { | |
24568 | raise_exception(13); | |
24569 | } | |
24570 | ||
24571 | fpus = (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11; | |
24572 | fptag = 0; | |
24573 | for(i = 0; i < 8; i++) { | |
24574 | fptag |= (env->fptags[i] << i); | |
24575 | } | |
24576 | stw_data(ptr, env->fpuc); | |
24577 | stw_data(ptr + 2, fpus); | |
24578 | stw_data(ptr + 4, fptag ^ 0xff); | |
24579 | ||
24580 | ||
24581 | ||
24582 | ||
24583 | ||
24584 | ||
24585 | { | |
24586 | stl_data(ptr + 0x08, 0); | |
24587 | stl_data(ptr + 0x0c, 0); | |
24588 | stl_data(ptr + 0x10, 0); | |
24589 | stl_data(ptr + 0x14, 0); | |
24590 | } | |
24591 | ||
24592 | addr = ptr + 0x20; | |
24593 | for(i = 0;i < 8; i++) { | |
24594 | tmp = (env->fpregs[(env->fpstt + (i)) & 7].d); | |
24595 | helper_fstt(tmp, addr); | |
24596 | addr += 16; | |
24597 | } | |
24598 | ||
24599 | if (env->cr[4] & (1 << 9)) { | |
24600 | ||
24601 | stl_data(ptr + 0x18, env->mxcsr); | |
24602 | stl_data(ptr + 0x1c, 0x0000ffff); | |
24603 | if (env->hflags & (1 << 15)) | |
24604 | nb_xmm_regs = 16; | |
24605 | else | |
24606 | nb_xmm_regs = 8; | |
24607 | addr = ptr + 0xa0; | |
24608 | ||
24609 | if (!(env->efer & (1 << 14)) | |
24610 | || (env->hflags & (3 << 0)) | |
24611 | || !(env->hflags & (1 << 14))) { | |
24612 | for(i = 0; i < nb_xmm_regs; i++) { | |
24613 | stq_data(addr, env->xmm_regs[i]._q[0]); | |
24614 | stq_data(addr + 8, env->xmm_regs[i]._q[1]); | |
24615 | addr += 16; | |
24616 | } | |
24617 | } | |
24618 | } | |
24619 | } | |
24620 | ||
24621 | void helper_fxrstor(target_ulong ptr, int data64) | |
24622 | { | |
24623 | int i, fpus, fptag, nb_xmm_regs; | |
24624 | floatx80 tmp; | |
24625 | target_ulong addr; | |
24626 | ||
24627 | ||
24628 | if (ptr & 0xf) { | |
24629 | raise_exception(13); | |
24630 | } | |
24631 | ||
24632 | env->fpuc = lduw_data(ptr); | |
24633 | fpus = lduw_data(ptr + 2); | |
24634 | fptag = lduw_data(ptr + 4); | |
24635 | env->fpstt = (fpus >> 11) & 7; | |
24636 | env->fpus = fpus & ~0x3800; | |
24637 | fptag ^= 0xff; | |
24638 | for(i = 0;i < 8; i++) { | |
24639 | env->fptags[i] = ((fptag >> i) & 1); | |
24640 | } | |
24641 | ||
24642 | addr = ptr + 0x20; | |
24643 | for(i = 0;i < 8; i++) { | |
24644 | tmp = helper_fldt(addr); | |
24645 | (env->fpregs[(env->fpstt + (i)) & 7].d) = tmp; | |
24646 | addr += 16; | |
24647 | } | |
24648 | ||
24649 | if (env->cr[4] & (1 << 9)) { | |
24650 | ||
24651 | env->mxcsr = ldl_data(ptr + 0x18); | |
24652 | ||
24653 | if (env->hflags & (1 << 15)) | |
24654 | nb_xmm_regs = 16; | |
24655 | else | |
24656 | nb_xmm_regs = 8; | |
24657 | addr = ptr + 0xa0; | |
24658 | ||
24659 | if (!(env->efer & (1 << 14)) | |
24660 | || (env->hflags & (3 << 0)) | |
24661 | || !(env->hflags & (1 << 14))) { | |
24662 | for(i = 0; i < nb_xmm_regs; i++) { | |
24663 | env->xmm_regs[i]._q[0] = ldq_data(addr); | |
24664 | env->xmm_regs[i]._q[1] = ldq_data(addr + 8); | |
24665 | addr += 16; | |
24666 | } | |
24667 | } | |
24668 | } | |
24669 | } | |
24670 | ||
24671 | void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f) | |
24672 | { | |
24673 | CPU_LDoubleU temp; | |
24674 | ||
24675 | temp.d = f; | |
24676 | *pmant = temp.l.lower; | |
24677 | *pexp = temp.l.upper; | |
24678 | } | |
24679 | ||
24680 | floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper) | |
24681 | { | |
24682 | CPU_LDoubleU temp; | |
24683 | ||
24684 | temp.l.upper = upper; | |
24685 | temp.l.lower = mant; | |
24686 | return temp.d; | |
24687 | } | |
24688 | # 4864 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
24689 | static void do_hlt(void) | |
24690 | { | |
24691 | env->hflags &= ~(1 << 3); | |
24692 | env->halted = 1; | |
24693 | env->exception_index = 0x10001; | |
24694 | cpu_loop_exit(env); | |
24695 | } | |
24696 | ||
24697 | void helper_hlt(int next_eip_addend) | |
24698 | { | |
24699 | helper_svm_check_intercept_param(0x078, 0); | |
24700 | (env->eip) += next_eip_addend; | |
24701 | ||
24702 | do_hlt(); | |
24703 | } | |
24704 | ||
24705 | void helper_monitor(target_ulong ptr) | |
24706 | { | |
24707 | if ((uint32_t)(env->regs[1]) != 0) | |
24708 | raise_exception(13); | |
24709 | ||
24710 | helper_svm_check_intercept_param(0x08a, 0); | |
24711 | } | |
24712 | ||
24713 | void helper_mwait(int next_eip_addend) | |
24714 | { | |
24715 | if ((uint32_t)(env->regs[1]) != 0) | |
24716 | raise_exception(13); | |
24717 | helper_svm_check_intercept_param(0x08b, 0); | |
24718 | (env->eip) += next_eip_addend; | |
24719 | ||
24720 | ||
24721 | if (env->cpu_index != 0 || env->next_cpu != ((void *)0)) { | |
24722 | ||
24723 | ||
24724 | } else { | |
24725 | do_hlt(); | |
24726 | } | |
24727 | } | |
24728 | ||
24729 | void helper_debug(void) | |
24730 | { | |
24731 | env->exception_index = 0x10002; | |
24732 | cpu_loop_exit(env); | |
24733 | } | |
24734 | ||
24735 | void helper_reset_rf(void) | |
24736 | { | |
24737 | env->eflags &= ~0x00010000; | |
24738 | } | |
24739 | ||
24740 | void helper_raise_interrupt(int intno, int next_eip_addend) | |
24741 | { | |
24742 | raise_interrupt(intno, 1, 0, next_eip_addend); | |
24743 | } | |
24744 | ||
24745 | void helper_raise_exception(int exception_index) | |
24746 | { | |
24747 | raise_exception(exception_index); | |
24748 | } | |
24749 | ||
24750 | void helper_cli(void) | |
24751 | { | |
24752 | env->eflags &= ~0x00000200; | |
24753 | } | |
24754 | ||
24755 | void helper_sti(void) | |
24756 | { | |
24757 | env->eflags |= 0x00000200; | |
24758 | } | |
24759 | # 4951 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
24760 | void helper_set_inhibit_irq(void) | |
24761 | { | |
24762 | env->hflags |= (1 << 3); | |
24763 | } | |
24764 | ||
24765 | void helper_reset_inhibit_irq(void) | |
24766 | { | |
24767 | env->hflags &= ~(1 << 3); | |
24768 | } | |
24769 | ||
24770 | void helper_boundw(target_ulong a0, int v) | |
24771 | { | |
24772 | int low, high; | |
24773 | low = ldsw_data(a0); | |
24774 | high = ldsw_data(a0 + 2); | |
24775 | v = (int16_t)v; | |
24776 | if (v < low || v > high) { | |
24777 | raise_exception(5); | |
24778 | } | |
24779 | } | |
24780 | ||
24781 | void helper_boundl(target_ulong a0, int v) | |
24782 | { | |
24783 | int low, high; | |
24784 | low = ldl_data(a0); | |
24785 | high = ldl_data(a0 + 4); | |
24786 | if (v < low || v > high) { | |
24787 | raise_exception(5); | |
24788 | } | |
24789 | } | |
24790 | ||
24791 | ||
24792 | ||
24793 | ||
24794 | ||
24795 | ||
24796 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" 1 | |
24797 | # 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" | |
24798 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-timer.h" 1 | |
24799 | ||
24800 | ||
24801 | ||
24802 | ||
24803 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" 1 | |
24804 | # 43 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24805 | int qemu_init_main_loop(void); | |
24806 | # 53 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24807 | int main_loop_init(void); | |
24808 | # 90 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24809 | int main_loop_wait(int nonblocking); | |
24810 | # 105 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24811 | void qemu_notify_event(void); | |
24812 | # 174 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24813 | typedef void IOReadHandler(void *opaque, const uint8_t *buf, int size); | |
24814 | typedef int IOCanReadHandler(void *opaque); | |
24815 | typedef void IOHandler(void *opaque); | |
24816 | # 218 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24817 | int qemu_set_fd_handler2(int fd, | |
24818 | IOCanReadHandler *fd_read_poll, | |
24819 | IOHandler *fd_read, | |
24820 | IOHandler *fd_write, | |
24821 | void *opaque); | |
24822 | # 252 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24823 | int qemu_set_fd_handler(int fd, | |
24824 | IOHandler *fd_read, | |
24825 | IOHandler *fd_write, | |
24826 | void *opaque); | |
24827 | ||
24828 | typedef struct QEMUBH QEMUBH; | |
24829 | typedef void QEMUBHFunc(void *opaque); | |
24830 | # 267 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24831 | QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque); | |
24832 | # 281 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24833 | void qemu_bh_schedule(QEMUBH *bh); | |
24834 | # 294 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24835 | void qemu_bh_cancel(QEMUBH *bh); | |
24836 | # 305 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24837 | void qemu_bh_delete(QEMUBH *bh); | |
24838 | # 323 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24839 | int qemu_add_child_watch(pid_t pid); | |
24840 | # 339 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24841 | void qemu_mutex_lock_iothread(void); | |
24842 | # 354 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" | |
24843 | void qemu_mutex_unlock_iothread(void); | |
24844 | ||
24845 | ||
24846 | ||
24847 | void qemu_fd_register(int fd); | |
24848 | void qemu_iohandler_fill(int *pnfds, fd_set *readfds, fd_set *writefds, fd_set *xfds); | |
24849 | void qemu_iohandler_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds, int rc); | |
24850 | ||
24851 | void qemu_bh_schedule_idle(QEMUBH *bh); | |
24852 | int qemu_bh_poll(void); | |
24853 | void qemu_bh_update_timeout(uint32_t *timeout); | |
24854 | # 6 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-timer.h" 2 | |
24855 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/notify.h" 1 | |
24856 | # 19 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/notify.h" | |
24857 | typedef struct Notifier Notifier; | |
24858 | ||
24859 | struct Notifier | |
24860 | { | |
24861 | void (*notify)(Notifier *notifier, void *data); | |
24862 | struct { struct Notifier *le_next; struct Notifier **le_prev; } node; | |
24863 | }; | |
24864 | ||
24865 | typedef struct NotifierList | |
24866 | { | |
24867 | struct { struct Notifier *lh_first; } notifiers; | |
24868 | } NotifierList; | |
24869 | ||
24870 | ||
24871 | ||
24872 | ||
24873 | void notifier_list_init(NotifierList *list); | |
24874 | ||
24875 | void notifier_list_add(NotifierList *list, Notifier *notifier); | |
24876 | ||
24877 | void notifier_remove(Notifier *notifier); | |
24878 | ||
24879 | void notifier_list_notify(NotifierList *list, void *data); | |
24880 | # 7 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-timer.h" 2 | |
24881 | # 18 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-timer.h" | |
24882 | typedef struct QEMUClock QEMUClock; | |
24883 | typedef void QEMUTimerCB(void *opaque); | |
24884 | ||
24885 | ||
24886 | ||
24887 | ||
24888 | ||
24889 | extern QEMUClock *rt_clock; | |
24890 | ||
24891 | ||
24892 | ||
24893 | ||
24894 | extern QEMUClock *vm_clock; | |
24895 | ||
24896 | ||
24897 | ||
24898 | ||
24899 | ||
24900 | ||
24901 | extern QEMUClock *host_clock; | |
24902 | ||
24903 | int64_t qemu_get_clock_ns(QEMUClock *clock); | |
24904 | int64_t qemu_clock_has_timers(QEMUClock *clock); | |
24905 | int64_t qemu_clock_expired(QEMUClock *clock); | |
24906 | int64_t qemu_clock_deadline(QEMUClock *clock); | |
24907 | void qemu_clock_enable(QEMUClock *clock, _Bool enabled); | |
24908 | void qemu_clock_warp(QEMUClock *clock); | |
24909 | ||
24910 | void qemu_register_clock_reset_notifier(QEMUClock *clock, Notifier *notifier); | |
24911 | void qemu_unregister_clock_reset_notifier(QEMUClock *clock, | |
24912 | Notifier *notifier); | |
24913 | ||
24914 | QEMUTimer *qemu_new_timer(QEMUClock *clock, int scale, | |
24915 | QEMUTimerCB *cb, void *opaque); | |
24916 | void qemu_free_timer(QEMUTimer *ts); | |
24917 | void qemu_del_timer(QEMUTimer *ts); | |
24918 | void qemu_mod_timer_ns(QEMUTimer *ts, int64_t expire_time); | |
24919 | void qemu_mod_timer(QEMUTimer *ts, int64_t expire_time); | |
24920 | _Bool qemu_timer_pending(QEMUTimer *ts); | |
24921 | _Bool qemu_timer_expired(QEMUTimer *timer_head, int64_t current_time); | |
24922 | uint64_t qemu_timer_expire_time_ns(QEMUTimer *ts); | |
24923 | ||
24924 | void qemu_run_timers(QEMUClock *clock); | |
24925 | void qemu_run_all_timers(void); | |
24926 | void configure_alarms(char const *opt); | |
24927 | void init_clocks(void); | |
24928 | int init_timer_alarm(void); | |
24929 | ||
24930 | int64_t cpu_get_ticks(void); | |
24931 | void cpu_enable_ticks(void); | |
24932 | void cpu_disable_ticks(void); | |
24933 | ||
24934 | static __attribute__ (( always_inline )) __inline__ QEMUTimer *qemu_new_timer_ns(QEMUClock *clock, QEMUTimerCB *cb, | |
24935 | void *opaque) | |
24936 | { | |
24937 | return qemu_new_timer(clock, 1, cb, opaque); | |
24938 | } | |
24939 | ||
24940 | static __attribute__ (( always_inline )) __inline__ QEMUTimer *qemu_new_timer_ms(QEMUClock *clock, QEMUTimerCB *cb, | |
24941 | void *opaque) | |
24942 | { | |
24943 | return qemu_new_timer(clock, 1000000, cb, opaque); | |
24944 | } | |
24945 | ||
24946 | static __attribute__ (( always_inline )) __inline__ int64_t qemu_get_clock_ms(QEMUClock *clock) | |
24947 | { | |
24948 | return qemu_get_clock_ns(clock) / 1000000; | |
24949 | } | |
24950 | ||
24951 | static __attribute__ (( always_inline )) __inline__ int64_t get_ticks_per_sec(void) | |
24952 | { | |
24953 | return 1000000000LL; | |
24954 | } | |
24955 | ||
24956 | ||
24957 | static __attribute__ (( always_inline )) __inline__ int64_t get_clock_realtime(void) | |
24958 | { | |
24959 | struct timeval tv; | |
24960 | ||
24961 | gettimeofday(&tv, ((void *)0)); | |
24962 | return tv.tv_sec * 1000000000LL + (tv.tv_usec * 1000); | |
24963 | } | |
24964 | # 116 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-timer.h" | |
24965 | extern int use_rt_clock; | |
24966 | ||
24967 | static __attribute__ (( always_inline )) __inline__ int64_t get_clock(void) | |
24968 | { | |
24969 | ||
24970 | ||
24971 | if (use_rt_clock) { | |
24972 | struct timespec ts; | |
24973 | clock_gettime(1, &ts); | |
24974 | return ts.tv_sec * 1000000000LL + ts.tv_nsec; | |
24975 | } else | |
24976 | ||
24977 | { | |
24978 | ||
24979 | ||
24980 | return get_clock_realtime(); | |
24981 | } | |
24982 | } | |
24983 | ||
24984 | ||
24985 | void qemu_get_timer(QEMUFile *f, QEMUTimer *ts); | |
24986 | void qemu_put_timer(QEMUFile *f, QEMUTimer *ts); | |
24987 | ||
24988 | ||
24989 | int64_t cpu_get_icount(void); | |
24990 | int64_t cpu_get_clock(void); | |
24991 | # 174 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-timer.h" | |
24992 | static __attribute__ (( always_inline )) __inline__ int64_t cpu_get_real_ticks(void) | |
24993 | { | |
24994 | int64_t val; | |
24995 | asm volatile ("rdtsc" : "=A" (val)); | |
24996 | return val; | |
24997 | } | |
24998 | # 25 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" 2 | |
24999 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" 1 | |
25000 | # 26 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25001 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/ioport.h" 1 | |
25002 | # 27 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" 2 | |
25003 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/int128.h" 1 | |
25004 | ||
25005 | ||
25006 | ||
25007 | typedef struct Int128 Int128; | |
25008 | ||
25009 | struct Int128 { | |
25010 | uint64_t lo; | |
25011 | int64_t hi; | |
25012 | }; | |
25013 | ||
25014 | static __attribute__ (( always_inline )) __inline__ Int128 int128_make64(uint64_t a) | |
25015 | { | |
25016 | return (Int128) { a, 0 }; | |
25017 | } | |
25018 | ||
25019 | static __attribute__ (( always_inline )) __inline__ uint64_t int128_get64(Int128 a) | |
25020 | { | |
25021 | ((!a.hi) ? (void) (0) : __assert_fail ("!a.hi", "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/int128.h", 18, __PRETTY_FUNCTION__)); | |
25022 | return a.lo; | |
25023 | } | |
25024 | ||
25025 | static __attribute__ (( always_inline )) __inline__ Int128 int128_zero(void) | |
25026 | { | |
25027 | return int128_make64(0); | |
25028 | } | |
25029 | ||
25030 | static __attribute__ (( always_inline )) __inline__ Int128 int128_one(void) | |
25031 | { | |
25032 | return int128_make64(1); | |
25033 | } | |
25034 | ||
25035 | static __attribute__ (( always_inline )) __inline__ Int128 int128_2_64(void) | |
25036 | { | |
25037 | return (Int128) { 0, 1 }; | |
25038 | } | |
25039 | ||
25040 | static __attribute__ (( always_inline )) __inline__ Int128 int128_add(Int128 a, Int128 b) | |
25041 | { | |
25042 | Int128 r = { a.lo + b.lo, a.hi + b.hi }; | |
25043 | r.hi += (r.lo < a.lo) || (r.lo < b.lo); | |
25044 | return r; | |
25045 | } | |
25046 | ||
25047 | static __attribute__ (( always_inline )) __inline__ Int128 int128_neg(Int128 a) | |
25048 | { | |
25049 | a.lo = ~a.lo; | |
25050 | a.hi = ~a.hi; | |
25051 | return int128_add(a, int128_one()); | |
25052 | } | |
25053 | ||
25054 | static __attribute__ (( always_inline )) __inline__ Int128 int128_sub(Int128 a, Int128 b) | |
25055 | { | |
25056 | return int128_add(a, int128_neg(b)); | |
25057 | } | |
25058 | ||
25059 | static __attribute__ (( always_inline )) __inline__ _Bool int128_nonneg(Int128 a) | |
25060 | { | |
25061 | return a.hi >= 0; | |
25062 | } | |
25063 | ||
25064 | static __attribute__ (( always_inline )) __inline__ _Bool int128_eq(Int128 a, Int128 b) | |
25065 | { | |
25066 | return a.lo == b.lo && a.hi == b.hi; | |
25067 | } | |
25068 | ||
25069 | static __attribute__ (( always_inline )) __inline__ _Bool int128_ne(Int128 a, Int128 b) | |
25070 | { | |
25071 | return !int128_eq(a, b); | |
25072 | } | |
25073 | ||
25074 | static __attribute__ (( always_inline )) __inline__ _Bool int128_ge(Int128 a, Int128 b) | |
25075 | { | |
25076 | return int128_nonneg(int128_sub(a, b)); | |
25077 | } | |
25078 | ||
25079 | static __attribute__ (( always_inline )) __inline__ _Bool int128_lt(Int128 a, Int128 b) | |
25080 | { | |
25081 | return !int128_ge(a, b); | |
25082 | } | |
25083 | ||
25084 | static __attribute__ (( always_inline )) __inline__ _Bool int128_le(Int128 a, Int128 b) | |
25085 | { | |
25086 | return int128_ge(b, a); | |
25087 | } | |
25088 | ||
25089 | static __attribute__ (( always_inline )) __inline__ _Bool int128_gt(Int128 a, Int128 b) | |
25090 | { | |
25091 | return !int128_le(a, b); | |
25092 | } | |
25093 | ||
25094 | static __attribute__ (( always_inline )) __inline__ _Bool int128_nz(Int128 a) | |
25095 | { | |
25096 | return a.lo || a.hi; | |
25097 | } | |
25098 | ||
25099 | static __attribute__ (( always_inline )) __inline__ Int128 int128_min(Int128 a, Int128 b) | |
25100 | { | |
25101 | return int128_le(a, b) ? a : b; | |
25102 | } | |
25103 | ||
25104 | static __attribute__ (( always_inline )) __inline__ Int128 int128_max(Int128 a, Int128 b) | |
25105 | { | |
25106 | return int128_ge(a, b) ? a : b; | |
25107 | } | |
25108 | ||
25109 | static __attribute__ (( always_inline )) __inline__ void int128_addto(Int128 *a, Int128 b) | |
25110 | { | |
25111 | *a = int128_add(*a, b); | |
25112 | } | |
25113 | ||
25114 | static __attribute__ (( always_inline )) __inline__ void int128_subfrom(Int128 *a, Int128 b) | |
25115 | { | |
25116 | *a = int128_sub(*a, b); | |
25117 | } | |
25118 | # 28 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" 2 | |
25119 | ||
25120 | typedef struct MemoryRegionOps MemoryRegionOps; | |
25121 | typedef struct MemoryRegion MemoryRegion; | |
25122 | typedef struct MemoryRegionPortio MemoryRegionPortio; | |
25123 | typedef struct MemoryRegionMmio MemoryRegionMmio; | |
25124 | # 41 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25125 | struct MemoryRegionMmio { | |
25126 | CPUReadMemoryFunc *read[3]; | |
25127 | CPUWriteMemoryFunc *write[3]; | |
25128 | }; | |
25129 | ||
25130 | ||
25131 | typedef struct MemoryRegionIORange MemoryRegionIORange; | |
25132 | struct MemoryRegionIORange { | |
25133 | IORange iorange; | |
25134 | MemoryRegion *mr; | |
25135 | target_phys_addr_t offset; | |
25136 | }; | |
25137 | ||
25138 | ||
25139 | ||
25140 | ||
25141 | struct MemoryRegionOps { | |
25142 | ||
25143 | ||
25144 | uint64_t (*read)(void *opaque, | |
25145 | target_phys_addr_t addr, | |
25146 | unsigned size); | |
25147 | ||
25148 | ||
25149 | void (*write)(void *opaque, | |
25150 | target_phys_addr_t addr, | |
25151 | uint64_t data, | |
25152 | unsigned size); | |
25153 | ||
25154 | enum device_endian endianness; | |
25155 | ||
25156 | struct { | |
25157 | ||
25158 | ||
25159 | ||
25160 | unsigned min_access_size; | |
25161 | unsigned max_access_size; | |
25162 | ||
25163 | ||
25164 | ||
25165 | _Bool unaligned; | |
25166 | ||
25167 | ||
25168 | ||
25169 | ||
25170 | ||
25171 | _Bool (*accepts)(void *opaque, target_phys_addr_t addr, | |
25172 | unsigned size, _Bool is_write); | |
25173 | } valid; | |
25174 | ||
25175 | struct { | |
25176 | ||
25177 | ||
25178 | ||
25179 | unsigned min_access_size; | |
25180 | ||
25181 | ||
25182 | ||
25183 | unsigned max_access_size; | |
25184 | ||
25185 | ||
25186 | ||
25187 | _Bool unaligned; | |
25188 | } impl; | |
25189 | ||
25190 | ||
25191 | ||
25192 | ||
25193 | const MemoryRegionPortio *old_portio; | |
25194 | ||
25195 | ||
25196 | ||
25197 | const MemoryRegionMmio old_mmio; | |
25198 | }; | |
25199 | ||
25200 | typedef struct CoalescedMemoryRange CoalescedMemoryRange; | |
25201 | typedef struct MemoryRegionIoeventfd MemoryRegionIoeventfd; | |
25202 | ||
25203 | struct MemoryRegion { | |
25204 | ||
25205 | const MemoryRegionOps *ops; | |
25206 | void *opaque; | |
25207 | MemoryRegion *parent; | |
25208 | Int128 size; | |
25209 | target_phys_addr_t addr; | |
25210 | void (*destructor)(MemoryRegion *mr); | |
25211 | ram_addr_t ram_addr; | |
25212 | _Bool subpage; | |
25213 | _Bool terminates; | |
25214 | _Bool readable; | |
25215 | _Bool ram; | |
25216 | _Bool readonly; | |
25217 | _Bool enabled; | |
25218 | _Bool rom_device; | |
25219 | _Bool warning_printed; | |
25220 | MemoryRegion *alias; | |
25221 | target_phys_addr_t alias_offset; | |
25222 | unsigned priority; | |
25223 | _Bool may_overlap; | |
25224 | struct subregions { struct MemoryRegion *tqh_first; struct MemoryRegion * *tqh_last; } subregions; | |
25225 | struct { struct MemoryRegion *tqe_next; struct MemoryRegion * *tqe_prev; } subregions_link; | |
25226 | struct coalesced_ranges { struct CoalescedMemoryRange *tqh_first; struct CoalescedMemoryRange * *tqh_last; } coalesced; | |
25227 | const char *name; | |
25228 | uint8_t dirty_log_mask; | |
25229 | unsigned ioeventfd_nb; | |
25230 | MemoryRegionIoeventfd *ioeventfds; | |
25231 | }; | |
25232 | ||
25233 | struct MemoryRegionPortio { | |
25234 | uint32_t offset; | |
25235 | uint32_t len; | |
25236 | unsigned size; | |
25237 | IOPortReadFunc *read; | |
25238 | IOPortWriteFunc *write; | |
25239 | }; | |
25240 | ||
25241 | ||
25242 | ||
25243 | typedef struct MemoryRegionSection MemoryRegionSection; | |
25244 | # 172 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25245 | struct MemoryRegionSection { | |
25246 | MemoryRegion *mr; | |
25247 | MemoryRegion *address_space; | |
25248 | target_phys_addr_t offset_within_region; | |
25249 | uint64_t size; | |
25250 | target_phys_addr_t offset_within_address_space; | |
25251 | _Bool readonly; | |
25252 | }; | |
25253 | ||
25254 | typedef struct MemoryListener MemoryListener; | |
25255 | ||
25256 | ||
25257 | ||
25258 | ||
25259 | ||
25260 | ||
25261 | ||
25262 | struct MemoryListener { | |
25263 | void (*begin)(MemoryListener *listener); | |
25264 | void (*commit)(MemoryListener *listener); | |
25265 | void (*region_add)(MemoryListener *listener, MemoryRegionSection *section); | |
25266 | void (*region_del)(MemoryListener *listener, MemoryRegionSection *section); | |
25267 | void (*region_nop)(MemoryListener *listener, MemoryRegionSection *section); | |
25268 | void (*log_start)(MemoryListener *listener, MemoryRegionSection *section); | |
25269 | void (*log_stop)(MemoryListener *listener, MemoryRegionSection *section); | |
25270 | void (*log_sync)(MemoryListener *listener, MemoryRegionSection *section); | |
25271 | void (*log_global_start)(MemoryListener *listener); | |
25272 | void (*log_global_stop)(MemoryListener *listener); | |
25273 | void (*eventfd_add)(MemoryListener *listener, MemoryRegionSection *section, | |
25274 | _Bool match_data, uint64_t data, int fd); | |
25275 | void (*eventfd_del)(MemoryListener *listener, MemoryRegionSection *section, | |
25276 | _Bool match_data, uint64_t data, int fd); | |
25277 | ||
25278 | unsigned priority; | |
25279 | MemoryRegion *address_space_filter; | |
25280 | struct { struct MemoryListener *tqe_next; struct MemoryListener * *tqe_prev; } link; | |
25281 | }; | |
25282 | # 220 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25283 | void memory_region_init(MemoryRegion *mr, | |
25284 | const char *name, | |
25285 | uint64_t size); | |
25286 | # 236 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25287 | void memory_region_init_io(MemoryRegion *mr, | |
25288 | const MemoryRegionOps *ops, | |
25289 | void *opaque, | |
25290 | const char *name, | |
25291 | uint64_t size); | |
25292 | # 250 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25293 | void memory_region_init_ram(MemoryRegion *mr, | |
25294 | const char *name, | |
25295 | uint64_t size); | |
25296 | # 264 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25297 | void memory_region_init_ram_ptr(MemoryRegion *mr, | |
25298 | const char *name, | |
25299 | uint64_t size, | |
25300 | void *ptr); | |
25301 | # 280 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25302 | void memory_region_init_alias(MemoryRegion *mr, | |
25303 | const char *name, | |
25304 | MemoryRegion *orig, | |
25305 | target_phys_addr_t offset, | |
25306 | uint64_t size); | |
25307 | # 295 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25308 | void memory_region_init_rom_device(MemoryRegion *mr, | |
25309 | const MemoryRegionOps *ops, | |
25310 | void *opaque, | |
25311 | const char *name, | |
25312 | uint64_t size); | |
25313 | # 313 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25314 | void memory_region_init_reservation(MemoryRegion *mr, | |
25315 | const char *name, | |
25316 | uint64_t size); | |
25317 | ||
25318 | ||
25319 | ||
25320 | ||
25321 | ||
25322 | ||
25323 | ||
25324 | void memory_region_destroy(MemoryRegion *mr); | |
25325 | ||
25326 | ||
25327 | ||
25328 | ||
25329 | ||
25330 | ||
25331 | uint64_t memory_region_size(MemoryRegion *mr); | |
25332 | # 339 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25333 | _Bool memory_region_is_ram(MemoryRegion *mr); | |
25334 | # 349 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25335 | static __attribute__ (( always_inline )) __inline__ _Bool memory_region_is_romd(MemoryRegion *mr) | |
25336 | { | |
25337 | return mr->rom_device && mr->readable; | |
25338 | } | |
25339 | # 361 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25340 | const char *memory_region_name(MemoryRegion *mr); | |
25341 | # 370 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25342 | _Bool memory_region_is_logging(MemoryRegion *mr); | |
25343 | # 379 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25344 | _Bool memory_region_is_rom(MemoryRegion *mr); | |
25345 | # 390 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25346 | void *memory_region_get_ram_ptr(MemoryRegion *mr); | |
25347 | # 403 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25348 | void memory_region_set_log(MemoryRegion *mr, _Bool log, unsigned client); | |
25349 | # 419 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25350 | _Bool memory_region_get_dirty(MemoryRegion *mr, target_phys_addr_t addr, | |
25351 | target_phys_addr_t size, unsigned client); | |
25352 | # 432 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25353 | void memory_region_set_dirty(MemoryRegion *mr, target_phys_addr_t addr, | |
25354 | target_phys_addr_t size); | |
25355 | # 444 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25356 | void memory_region_sync_dirty_bitmap(MemoryRegion *mr); | |
25357 | # 458 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25358 | void memory_region_reset_dirty(MemoryRegion *mr, target_phys_addr_t addr, | |
25359 | target_phys_addr_t size, unsigned client); | |
25360 | # 470 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25361 | void memory_region_set_readonly(MemoryRegion *mr, _Bool readonly); | |
25362 | # 484 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25363 | void memory_region_rom_device_set_readable(MemoryRegion *mr, _Bool readable); | |
25364 | # 495 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25365 | void memory_region_set_coalescing(MemoryRegion *mr); | |
25366 | # 508 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25367 | void memory_region_add_coalescing(MemoryRegion *mr, | |
25368 | target_phys_addr_t offset, | |
25369 | uint64_t size); | |
25370 | # 521 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25371 | void memory_region_clear_coalescing(MemoryRegion *mr); | |
25372 | # 539 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25373 | void memory_region_add_eventfd(MemoryRegion *mr, | |
25374 | target_phys_addr_t addr, | |
25375 | unsigned size, | |
25376 | _Bool match_data, | |
25377 | uint64_t data, | |
25378 | int fd); | |
25379 | # 559 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25380 | void memory_region_del_eventfd(MemoryRegion *mr, | |
25381 | target_phys_addr_t addr, | |
25382 | unsigned size, | |
25383 | _Bool match_data, | |
25384 | uint64_t data, | |
25385 | int fd); | |
25386 | # 579 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25387 | void memory_region_add_subregion(MemoryRegion *mr, | |
25388 | target_phys_addr_t offset, | |
25389 | MemoryRegion *subregion); | |
25390 | # 598 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25391 | void memory_region_add_subregion_overlap(MemoryRegion *mr, | |
25392 | target_phys_addr_t offset, | |
25393 | MemoryRegion *subregion, | |
25394 | unsigned priority); | |
25395 | # 610 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25396 | ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr); | |
25397 | # 620 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25398 | void memory_region_del_subregion(MemoryRegion *mr, | |
25399 | MemoryRegion *subregion); | |
25400 | # 636 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25401 | void memory_region_set_enabled(MemoryRegion *mr, _Bool enabled); | |
25402 | # 647 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25403 | void memory_region_set_address(MemoryRegion *mr, target_phys_addr_t addr); | |
25404 | # 658 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25405 | void memory_region_set_alias_offset(MemoryRegion *mr, | |
25406 | target_phys_addr_t offset); | |
25407 | # 679 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25408 | MemoryRegionSection memory_region_find(MemoryRegion *address_space, | |
25409 | target_phys_addr_t addr, uint64_t size); | |
25410 | # 690 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25411 | static __attribute__ (( always_inline )) __inline__ target_phys_addr_t | |
25412 | memory_region_section_addr(MemoryRegionSection *section, | |
25413 | target_phys_addr_t addr) | |
25414 | { | |
25415 | addr -= section->offset_within_address_space; | |
25416 | addr += section->offset_within_region; | |
25417 | return addr; | |
25418 | } | |
25419 | # 706 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25420 | void memory_global_sync_dirty_bitmap(MemoryRegion *address_space); | |
25421 | ||
25422 | ||
25423 | ||
25424 | ||
25425 | ||
25426 | ||
25427 | ||
25428 | void memory_region_transaction_begin(void); | |
25429 | ||
25430 | ||
25431 | ||
25432 | ||
25433 | ||
25434 | void memory_region_transaction_commit(void); | |
25435 | # 730 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" | |
25436 | void memory_listener_register(MemoryListener *listener, MemoryRegion *filter); | |
25437 | ||
25438 | ||
25439 | ||
25440 | ||
25441 | ||
25442 | ||
25443 | void memory_listener_unregister(MemoryListener *listener); | |
25444 | ||
25445 | ||
25446 | ||
25447 | ||
25448 | void memory_global_dirty_log_start(void); | |
25449 | ||
25450 | ||
25451 | ||
25452 | ||
25453 | void memory_global_dirty_log_stop(void); | |
25454 | ||
25455 | void mtree_info(fprintf_function mon_printf, void *f); | |
25456 | # 26 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" 2 | |
25457 | # 69 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" | |
25458 | static uint8_t slow_ldb_mmu( | |
25459 | target_ulong addr, | |
25460 | int mmu_idx, | |
25461 | uintptr_t retaddr); | |
25462 | static __attribute__ (( always_inline )) __inline__ uint8_t io_readb( | |
25463 | target_phys_addr_t physaddr, | |
25464 | target_ulong addr, | |
25465 | uintptr_t retaddr) | |
25466 | { | |
25467 | uint8_t res; | |
25468 | MemoryRegion *mr = iotlb_to_region(physaddr); | |
25469 | ||
25470 | physaddr = (physaddr & ~((1 << 12) - 1)) + addr; | |
25471 | env->mem_io_pc = retaddr; | |
25472 | if (mr != &io_mem_ram && mr != &io_mem_rom | |
25473 | && mr != &io_mem_unassigned | |
25474 | && mr != &io_mem_notdirty | |
25475 | && !can_do_io(env)) { | |
25476 | cpu_io_recompile(env, retaddr); | |
25477 | } | |
25478 | ||
25479 | env->mem_io_vaddr = addr; | |
25480 | ||
25481 | res = io_mem_read(mr, physaddr, 1 << 0); | |
25482 | # 102 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" | |
25483 | return res; | |
25484 | } | |
25485 | ||
25486 | ||
25487 | uint8_t | |
25488 | __ldb_mmu( | |
25489 | target_ulong addr, | |
25490 | int mmu_idx) | |
25491 | { | |
25492 | uint8_t res; | |
25493 | int index; | |
25494 | target_ulong tlb_addr; | |
25495 | target_phys_addr_t ioaddr; | |
25496 | uintptr_t retaddr; | |
25497 | ||
25498 | ||
25499 | ||
25500 | index = (addr >> 12) & ((1 << 8) - 1); | |
25501 | redo: | |
25502 | tlb_addr = env->tlb_table[mmu_idx][index].addr_read; | |
25503 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
25504 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
25505 | ||
25506 | if ((addr & ((1 << 0) - 1)) != 0) | |
25507 | goto do_unaligned_access; | |
25508 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
25509 | ioaddr = env->iotlb[mmu_idx][index]; | |
25510 | res = io_readb( ioaddr, addr, retaddr); | |
25511 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 0) - 1) >= (1 << 12)) { | |
25512 | ||
25513 | do_unaligned_access: | |
25514 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
25515 | ||
25516 | ||
25517 | ||
25518 | res = slow_ldb_mmu( addr, | |
25519 | mmu_idx, retaddr); | |
25520 | } else { | |
25521 | ||
25522 | uintptr_t addend; | |
25523 | ||
25524 | ||
25525 | ||
25526 | ||
25527 | ||
25528 | ||
25529 | addend = env->tlb_table[mmu_idx][index].addend; | |
25530 | res = ldub_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) | |
25531 | ; | |
25532 | } | |
25533 | } else { | |
25534 | ||
25535 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
25536 | ||
25537 | ||
25538 | ||
25539 | ||
25540 | tlb_fill(env, addr, 0, mmu_idx, retaddr); | |
25541 | goto redo; | |
25542 | } | |
25543 | return res; | |
25544 | } | |
25545 | ||
25546 | ||
25547 | static uint8_t | |
25548 | slow_ldb_mmu( | |
25549 | target_ulong addr, | |
25550 | int mmu_idx, | |
25551 | uintptr_t retaddr) | |
25552 | { | |
25553 | uint8_t res, res1, res2; | |
25554 | int index, shift; | |
25555 | target_phys_addr_t ioaddr; | |
25556 | target_ulong tlb_addr, addr1, addr2; | |
25557 | ||
25558 | index = (addr >> 12) & ((1 << 8) - 1); | |
25559 | redo: | |
25560 | tlb_addr = env->tlb_table[mmu_idx][index].addr_read; | |
25561 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
25562 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
25563 | ||
25564 | if ((addr & ((1 << 0) - 1)) != 0) | |
25565 | goto do_unaligned_access; | |
25566 | ioaddr = env->iotlb[mmu_idx][index]; | |
25567 | res = io_readb( ioaddr, addr, retaddr); | |
25568 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 0) - 1) >= (1 << 12)) { | |
25569 | do_unaligned_access: | |
25570 | ||
25571 | addr1 = addr & ~((1 << 0) - 1); | |
25572 | addr2 = addr1 + (1 << 0); | |
25573 | res1 = slow_ldb_mmu( addr1, | |
25574 | mmu_idx, retaddr); | |
25575 | res2 = slow_ldb_mmu( addr2, | |
25576 | mmu_idx, retaddr); | |
25577 | shift = (addr & ((1 << 0) - 1)) * 8; | |
25578 | ||
25579 | ||
25580 | ||
25581 | res = (res1 >> shift) | (res2 << (((1 << 0) * 8) - shift)); | |
25582 | ||
25583 | res = (uint8_t)res; | |
25584 | } else { | |
25585 | ||
25586 | uintptr_t addend = env->tlb_table[mmu_idx][index].addend; | |
25587 | res = ldub_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) | |
25588 | ; | |
25589 | } | |
25590 | } else { | |
25591 | ||
25592 | tlb_fill(env, addr, 0, mmu_idx, retaddr); | |
25593 | goto redo; | |
25594 | } | |
25595 | return res; | |
25596 | } | |
25597 | ||
25598 | ||
25599 | ||
25600 | static void slow_stb_mmu( | |
25601 | target_ulong addr, | |
25602 | uint8_t val, | |
25603 | int mmu_idx, | |
25604 | uintptr_t retaddr); | |
25605 | ||
25606 | static __attribute__ (( always_inline )) __inline__ void io_writeb( | |
25607 | target_phys_addr_t physaddr, | |
25608 | uint8_t val, | |
25609 | target_ulong addr, | |
25610 | uintptr_t retaddr) | |
25611 | { | |
25612 | MemoryRegion *mr = iotlb_to_region(physaddr); | |
25613 | ||
25614 | physaddr = (physaddr & ~((1 << 12) - 1)) + addr; | |
25615 | if (mr != &io_mem_ram && mr != &io_mem_rom | |
25616 | && mr != &io_mem_unassigned | |
25617 | && mr != &io_mem_notdirty | |
25618 | && !can_do_io(env)) { | |
25619 | cpu_io_recompile(env, retaddr); | |
25620 | } | |
25621 | ||
25622 | env->mem_io_vaddr = addr; | |
25623 | env->mem_io_pc = retaddr; | |
25624 | ||
25625 | io_mem_write(mr, physaddr, val, 1 << 0); | |
25626 | # 254 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" | |
25627 | } | |
25628 | ||
25629 | void __stb_mmu( | |
25630 | target_ulong addr, | |
25631 | uint8_t val, | |
25632 | int mmu_idx) | |
25633 | { | |
25634 | target_phys_addr_t ioaddr; | |
25635 | target_ulong tlb_addr; | |
25636 | uintptr_t retaddr; | |
25637 | int index; | |
25638 | ||
25639 | index = (addr >> 12) & ((1 << 8) - 1); | |
25640 | redo: | |
25641 | tlb_addr = env->tlb_table[mmu_idx][index].addr_write; | |
25642 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
25643 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
25644 | ||
25645 | if ((addr & ((1 << 0) - 1)) != 0) | |
25646 | goto do_unaligned_access; | |
25647 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
25648 | ioaddr = env->iotlb[mmu_idx][index]; | |
25649 | io_writeb( ioaddr, val, addr, retaddr); | |
25650 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 0) - 1) >= (1 << 12)) { | |
25651 | do_unaligned_access: | |
25652 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
25653 | ||
25654 | ||
25655 | ||
25656 | slow_stb_mmu( addr, val, | |
25657 | mmu_idx, retaddr); | |
25658 | } else { | |
25659 | ||
25660 | uintptr_t addend; | |
25661 | ||
25662 | ||
25663 | ||
25664 | ||
25665 | ||
25666 | ||
25667 | addend = env->tlb_table[mmu_idx][index].addend; | |
25668 | stb_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) | |
25669 | ; | |
25670 | } | |
25671 | } else { | |
25672 | ||
25673 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
25674 | ||
25675 | ||
25676 | ||
25677 | ||
25678 | tlb_fill(env, addr, 1, mmu_idx, retaddr); | |
25679 | goto redo; | |
25680 | } | |
25681 | } | |
25682 | ||
25683 | ||
25684 | static void slow_stb_mmu( | |
25685 | target_ulong addr, | |
25686 | uint8_t val, | |
25687 | int mmu_idx, | |
25688 | uintptr_t retaddr) | |
25689 | { | |
25690 | target_phys_addr_t ioaddr; | |
25691 | target_ulong tlb_addr; | |
25692 | int index, i; | |
25693 | ||
25694 | index = (addr >> 12) & ((1 << 8) - 1); | |
25695 | redo: | |
25696 | tlb_addr = env->tlb_table[mmu_idx][index].addr_write; | |
25697 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
25698 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
25699 | ||
25700 | if ((addr & ((1 << 0) - 1)) != 0) | |
25701 | goto do_unaligned_access; | |
25702 | ioaddr = env->iotlb[mmu_idx][index]; | |
25703 | io_writeb( ioaddr, val, addr, retaddr); | |
25704 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 0) - 1) >= (1 << 12)) { | |
25705 | do_unaligned_access: | |
25706 | ||
25707 | ||
25708 | ||
25709 | for(i = (1 << 0) - 1; i >= 0; i--) { | |
25710 | ||
25711 | ||
25712 | ||
25713 | ||
25714 | ||
25715 | slow_stb_mmu( addr + i, | |
25716 | val >> (i * 8), | |
25717 | mmu_idx, retaddr); | |
25718 | ||
25719 | } | |
25720 | } else { | |
25721 | ||
25722 | uintptr_t addend = env->tlb_table[mmu_idx][index].addend; | |
25723 | stb_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) | |
25724 | ; | |
25725 | } | |
25726 | } else { | |
25727 | ||
25728 | tlb_fill(env, addr, 1, mmu_idx, retaddr); | |
25729 | goto redo; | |
25730 | } | |
25731 | } | |
25732 | # 4988 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
25733 | ||
25734 | ||
25735 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" 1 | |
25736 | # 69 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" | |
25737 | static uint16_t slow_ldw_mmu( | |
25738 | target_ulong addr, | |
25739 | int mmu_idx, | |
25740 | uintptr_t retaddr); | |
25741 | static __attribute__ (( always_inline )) __inline__ uint16_t io_readw( | |
25742 | target_phys_addr_t physaddr, | |
25743 | target_ulong addr, | |
25744 | uintptr_t retaddr) | |
25745 | { | |
25746 | uint16_t res; | |
25747 | MemoryRegion *mr = iotlb_to_region(physaddr); | |
25748 | ||
25749 | physaddr = (physaddr & ~((1 << 12) - 1)) + addr; | |
25750 | env->mem_io_pc = retaddr; | |
25751 | if (mr != &io_mem_ram && mr != &io_mem_rom | |
25752 | && mr != &io_mem_unassigned | |
25753 | && mr != &io_mem_notdirty | |
25754 | && !can_do_io(env)) { | |
25755 | cpu_io_recompile(env, retaddr); | |
25756 | } | |
25757 | ||
25758 | env->mem_io_vaddr = addr; | |
25759 | ||
25760 | res = io_mem_read(mr, physaddr, 1 << 1); | |
25761 | # 102 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" | |
25762 | return res; | |
25763 | } | |
25764 | ||
25765 | ||
25766 | uint16_t | |
25767 | __ldw_mmu( | |
25768 | target_ulong addr, | |
25769 | int mmu_idx) | |
25770 | { | |
25771 | uint16_t res; | |
25772 | int index; | |
25773 | target_ulong tlb_addr; | |
25774 | target_phys_addr_t ioaddr; | |
25775 | uintptr_t retaddr; | |
25776 | ||
25777 | ||
25778 | ||
25779 | index = (addr >> 12) & ((1 << 8) - 1); | |
25780 | redo: | |
25781 | tlb_addr = env->tlb_table[mmu_idx][index].addr_read; | |
25782 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
25783 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
25784 | ||
25785 | if ((addr & ((1 << 1) - 1)) != 0) | |
25786 | goto do_unaligned_access; | |
25787 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
25788 | ioaddr = env->iotlb[mmu_idx][index]; | |
25789 | res = io_readw( ioaddr, addr, retaddr); | |
25790 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 1) - 1) >= (1 << 12)) { | |
25791 | ||
25792 | do_unaligned_access: | |
25793 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
25794 | ||
25795 | ||
25796 | ||
25797 | res = slow_ldw_mmu( addr, | |
25798 | mmu_idx, retaddr); | |
25799 | } else { | |
25800 | ||
25801 | uintptr_t addend; | |
25802 | ||
25803 | ||
25804 | ||
25805 | ||
25806 | ||
25807 | ||
25808 | addend = env->tlb_table[mmu_idx][index].addend; | |
25809 | res = lduw_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) | |
25810 | ; | |
25811 | } | |
25812 | } else { | |
25813 | ||
25814 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
25815 | ||
25816 | ||
25817 | ||
25818 | ||
25819 | tlb_fill(env, addr, 0, mmu_idx, retaddr); | |
25820 | goto redo; | |
25821 | } | |
25822 | return res; | |
25823 | } | |
25824 | ||
25825 | ||
25826 | static uint16_t | |
25827 | slow_ldw_mmu( | |
25828 | target_ulong addr, | |
25829 | int mmu_idx, | |
25830 | uintptr_t retaddr) | |
25831 | { | |
25832 | uint16_t res, res1, res2; | |
25833 | int index, shift; | |
25834 | target_phys_addr_t ioaddr; | |
25835 | target_ulong tlb_addr, addr1, addr2; | |
25836 | ||
25837 | index = (addr >> 12) & ((1 << 8) - 1); | |
25838 | redo: | |
25839 | tlb_addr = env->tlb_table[mmu_idx][index].addr_read; | |
25840 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
25841 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
25842 | ||
25843 | if ((addr & ((1 << 1) - 1)) != 0) | |
25844 | goto do_unaligned_access; | |
25845 | ioaddr = env->iotlb[mmu_idx][index]; | |
25846 | res = io_readw( ioaddr, addr, retaddr); | |
25847 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 1) - 1) >= (1 << 12)) { | |
25848 | do_unaligned_access: | |
25849 | ||
25850 | addr1 = addr & ~((1 << 1) - 1); | |
25851 | addr2 = addr1 + (1 << 1); | |
25852 | res1 = slow_ldw_mmu( addr1, | |
25853 | mmu_idx, retaddr); | |
25854 | res2 = slow_ldw_mmu( addr2, | |
25855 | mmu_idx, retaddr); | |
25856 | shift = (addr & ((1 << 1) - 1)) * 8; | |
25857 | ||
25858 | ||
25859 | ||
25860 | res = (res1 >> shift) | (res2 << (((1 << 1) * 8) - shift)); | |
25861 | ||
25862 | res = (uint16_t)res; | |
25863 | } else { | |
25864 | ||
25865 | uintptr_t addend = env->tlb_table[mmu_idx][index].addend; | |
25866 | res = lduw_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) | |
25867 | ; | |
25868 | } | |
25869 | } else { | |
25870 | ||
25871 | tlb_fill(env, addr, 0, mmu_idx, retaddr); | |
25872 | goto redo; | |
25873 | } | |
25874 | return res; | |
25875 | } | |
25876 | ||
25877 | ||
25878 | ||
25879 | static void slow_stw_mmu( | |
25880 | target_ulong addr, | |
25881 | uint16_t val, | |
25882 | int mmu_idx, | |
25883 | uintptr_t retaddr); | |
25884 | ||
25885 | static __attribute__ (( always_inline )) __inline__ void io_writew( | |
25886 | target_phys_addr_t physaddr, | |
25887 | uint16_t val, | |
25888 | target_ulong addr, | |
25889 | uintptr_t retaddr) | |
25890 | { | |
25891 | MemoryRegion *mr = iotlb_to_region(physaddr); | |
25892 | ||
25893 | physaddr = (physaddr & ~((1 << 12) - 1)) + addr; | |
25894 | if (mr != &io_mem_ram && mr != &io_mem_rom | |
25895 | && mr != &io_mem_unassigned | |
25896 | && mr != &io_mem_notdirty | |
25897 | && !can_do_io(env)) { | |
25898 | cpu_io_recompile(env, retaddr); | |
25899 | } | |
25900 | ||
25901 | env->mem_io_vaddr = addr; | |
25902 | env->mem_io_pc = retaddr; | |
25903 | ||
25904 | io_mem_write(mr, physaddr, val, 1 << 1); | |
25905 | # 254 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" | |
25906 | } | |
25907 | ||
25908 | void __stw_mmu( | |
25909 | target_ulong addr, | |
25910 | uint16_t val, | |
25911 | int mmu_idx) | |
25912 | { | |
25913 | target_phys_addr_t ioaddr; | |
25914 | target_ulong tlb_addr; | |
25915 | uintptr_t retaddr; | |
25916 | int index; | |
25917 | ||
25918 | index = (addr >> 12) & ((1 << 8) - 1); | |
25919 | redo: | |
25920 | tlb_addr = env->tlb_table[mmu_idx][index].addr_write; | |
25921 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
25922 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
25923 | ||
25924 | if ((addr & ((1 << 1) - 1)) != 0) | |
25925 | goto do_unaligned_access; | |
25926 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
25927 | ioaddr = env->iotlb[mmu_idx][index]; | |
25928 | io_writew( ioaddr, val, addr, retaddr); | |
25929 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 1) - 1) >= (1 << 12)) { | |
25930 | do_unaligned_access: | |
25931 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
25932 | ||
25933 | ||
25934 | ||
25935 | slow_stw_mmu( addr, val, | |
25936 | mmu_idx, retaddr); | |
25937 | } else { | |
25938 | ||
25939 | uintptr_t addend; | |
25940 | ||
25941 | ||
25942 | ||
25943 | ||
25944 | ||
25945 | ||
25946 | addend = env->tlb_table[mmu_idx][index].addend; | |
25947 | stw_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) | |
25948 | ; | |
25949 | } | |
25950 | } else { | |
25951 | ||
25952 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
25953 | ||
25954 | ||
25955 | ||
25956 | ||
25957 | tlb_fill(env, addr, 1, mmu_idx, retaddr); | |
25958 | goto redo; | |
25959 | } | |
25960 | } | |
25961 | ||
25962 | ||
25963 | static void slow_stw_mmu( | |
25964 | target_ulong addr, | |
25965 | uint16_t val, | |
25966 | int mmu_idx, | |
25967 | uintptr_t retaddr) | |
25968 | { | |
25969 | target_phys_addr_t ioaddr; | |
25970 | target_ulong tlb_addr; | |
25971 | int index, i; | |
25972 | ||
25973 | index = (addr >> 12) & ((1 << 8) - 1); | |
25974 | redo: | |
25975 | tlb_addr = env->tlb_table[mmu_idx][index].addr_write; | |
25976 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
25977 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
25978 | ||
25979 | if ((addr & ((1 << 1) - 1)) != 0) | |
25980 | goto do_unaligned_access; | |
25981 | ioaddr = env->iotlb[mmu_idx][index]; | |
25982 | io_writew( ioaddr, val, addr, retaddr); | |
25983 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 1) - 1) >= (1 << 12)) { | |
25984 | do_unaligned_access: | |
25985 | ||
25986 | ||
25987 | ||
25988 | for(i = (1 << 1) - 1; i >= 0; i--) { | |
25989 | ||
25990 | ||
25991 | ||
25992 | ||
25993 | ||
25994 | slow_stb_mmu( addr + i, | |
25995 | val >> (i * 8), | |
25996 | mmu_idx, retaddr); | |
25997 | ||
25998 | } | |
25999 | } else { | |
26000 | ||
26001 | uintptr_t addend = env->tlb_table[mmu_idx][index].addend; | |
26002 | stw_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) | |
26003 | ; | |
26004 | } | |
26005 | } else { | |
26006 | ||
26007 | tlb_fill(env, addr, 1, mmu_idx, retaddr); | |
26008 | goto redo; | |
26009 | } | |
26010 | } | |
26011 | # 4991 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
26012 | ||
26013 | ||
26014 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" 1 | |
26015 | # 69 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" | |
26016 | static uint32_t slow_ldl_mmu( | |
26017 | target_ulong addr, | |
26018 | int mmu_idx, | |
26019 | uintptr_t retaddr); | |
26020 | static __attribute__ (( always_inline )) __inline__ uint32_t io_readl( | |
26021 | target_phys_addr_t physaddr, | |
26022 | target_ulong addr, | |
26023 | uintptr_t retaddr) | |
26024 | { | |
26025 | uint32_t res; | |
26026 | MemoryRegion *mr = iotlb_to_region(physaddr); | |
26027 | ||
26028 | physaddr = (physaddr & ~((1 << 12) - 1)) + addr; | |
26029 | env->mem_io_pc = retaddr; | |
26030 | if (mr != &io_mem_ram && mr != &io_mem_rom | |
26031 | && mr != &io_mem_unassigned | |
26032 | && mr != &io_mem_notdirty | |
26033 | && !can_do_io(env)) { | |
26034 | cpu_io_recompile(env, retaddr); | |
26035 | } | |
26036 | ||
26037 | env->mem_io_vaddr = addr; | |
26038 | ||
26039 | res = io_mem_read(mr, physaddr, 1 << 2); | |
26040 | # 102 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" | |
26041 | return res; | |
26042 | } | |
26043 | ||
26044 | ||
26045 | uint32_t | |
26046 | __ldl_mmu( | |
26047 | target_ulong addr, | |
26048 | int mmu_idx) | |
26049 | { | |
26050 | uint32_t res; | |
26051 | int index; | |
26052 | target_ulong tlb_addr; | |
26053 | target_phys_addr_t ioaddr; | |
26054 | uintptr_t retaddr; | |
26055 | ||
26056 | ||
26057 | ||
26058 | index = (addr >> 12) & ((1 << 8) - 1); | |
26059 | redo: | |
26060 | tlb_addr = env->tlb_table[mmu_idx][index].addr_read; | |
26061 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
26062 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
26063 | ||
26064 | if ((addr & ((1 << 2) - 1)) != 0) | |
26065 | goto do_unaligned_access; | |
26066 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
26067 | ioaddr = env->iotlb[mmu_idx][index]; | |
26068 | res = io_readl( ioaddr, addr, retaddr); | |
26069 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 2) - 1) >= (1 << 12)) { | |
26070 | ||
26071 | do_unaligned_access: | |
26072 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
26073 | ||
26074 | ||
26075 | ||
26076 | res = slow_ldl_mmu( addr, | |
26077 | mmu_idx, retaddr); | |
26078 | } else { | |
26079 | ||
26080 | uintptr_t addend; | |
26081 | ||
26082 | ||
26083 | ||
26084 | ||
26085 | ||
26086 | ||
26087 | addend = env->tlb_table[mmu_idx][index].addend; | |
26088 | res = ldl_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) | |
26089 | ; | |
26090 | } | |
26091 | } else { | |
26092 | ||
26093 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
26094 | ||
26095 | ||
26096 | ||
26097 | ||
26098 | tlb_fill(env, addr, 0, mmu_idx, retaddr); | |
26099 | goto redo; | |
26100 | } | |
26101 | return res; | |
26102 | } | |
26103 | ||
26104 | ||
26105 | static uint32_t | |
26106 | slow_ldl_mmu( | |
26107 | target_ulong addr, | |
26108 | int mmu_idx, | |
26109 | uintptr_t retaddr) | |
26110 | { | |
26111 | uint32_t res, res1, res2; | |
26112 | int index, shift; | |
26113 | target_phys_addr_t ioaddr; | |
26114 | target_ulong tlb_addr, addr1, addr2; | |
26115 | ||
26116 | index = (addr >> 12) & ((1 << 8) - 1); | |
26117 | redo: | |
26118 | tlb_addr = env->tlb_table[mmu_idx][index].addr_read; | |
26119 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
26120 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
26121 | ||
26122 | if ((addr & ((1 << 2) - 1)) != 0) | |
26123 | goto do_unaligned_access; | |
26124 | ioaddr = env->iotlb[mmu_idx][index]; | |
26125 | res = io_readl( ioaddr, addr, retaddr); | |
26126 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 2) - 1) >= (1 << 12)) { | |
26127 | do_unaligned_access: | |
26128 | ||
26129 | addr1 = addr & ~((1 << 2) - 1); | |
26130 | addr2 = addr1 + (1 << 2); | |
26131 | res1 = slow_ldl_mmu( addr1, | |
26132 | mmu_idx, retaddr); | |
26133 | res2 = slow_ldl_mmu( addr2, | |
26134 | mmu_idx, retaddr); | |
26135 | shift = (addr & ((1 << 2) - 1)) * 8; | |
26136 | ||
26137 | ||
26138 | ||
26139 | res = (res1 >> shift) | (res2 << (((1 << 2) * 8) - shift)); | |
26140 | ||
26141 | res = (uint32_t)res; | |
26142 | } else { | |
26143 | ||
26144 | uintptr_t addend = env->tlb_table[mmu_idx][index].addend; | |
26145 | res = ldl_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) | |
26146 | ; | |
26147 | } | |
26148 | } else { | |
26149 | ||
26150 | tlb_fill(env, addr, 0, mmu_idx, retaddr); | |
26151 | goto redo; | |
26152 | } | |
26153 | return res; | |
26154 | } | |
26155 | ||
26156 | ||
26157 | ||
26158 | static void slow_stl_mmu( | |
26159 | target_ulong addr, | |
26160 | uint32_t val, | |
26161 | int mmu_idx, | |
26162 | uintptr_t retaddr); | |
26163 | ||
26164 | static __attribute__ (( always_inline )) __inline__ void io_writel( | |
26165 | target_phys_addr_t physaddr, | |
26166 | uint32_t val, | |
26167 | target_ulong addr, | |
26168 | uintptr_t retaddr) | |
26169 | { | |
26170 | MemoryRegion *mr = iotlb_to_region(physaddr); | |
26171 | ||
26172 | physaddr = (physaddr & ~((1 << 12) - 1)) + addr; | |
26173 | if (mr != &io_mem_ram && mr != &io_mem_rom | |
26174 | && mr != &io_mem_unassigned | |
26175 | && mr != &io_mem_notdirty | |
26176 | && !can_do_io(env)) { | |
26177 | cpu_io_recompile(env, retaddr); | |
26178 | } | |
26179 | ||
26180 | env->mem_io_vaddr = addr; | |
26181 | env->mem_io_pc = retaddr; | |
26182 | ||
26183 | io_mem_write(mr, physaddr, val, 1 << 2); | |
26184 | # 254 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" | |
26185 | } | |
26186 | ||
26187 | void __stl_mmu( | |
26188 | target_ulong addr, | |
26189 | uint32_t val, | |
26190 | int mmu_idx) | |
26191 | { | |
26192 | target_phys_addr_t ioaddr; | |
26193 | target_ulong tlb_addr; | |
26194 | uintptr_t retaddr; | |
26195 | int index; | |
26196 | ||
26197 | index = (addr >> 12) & ((1 << 8) - 1); | |
26198 | redo: | |
26199 | tlb_addr = env->tlb_table[mmu_idx][index].addr_write; | |
26200 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
26201 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
26202 | ||
26203 | if ((addr & ((1 << 2) - 1)) != 0) | |
26204 | goto do_unaligned_access; | |
26205 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
26206 | ioaddr = env->iotlb[mmu_idx][index]; | |
26207 | io_writel( ioaddr, val, addr, retaddr); | |
26208 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 2) - 1) >= (1 << 12)) { | |
26209 | do_unaligned_access: | |
26210 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
26211 | ||
26212 | ||
26213 | ||
26214 | slow_stl_mmu( addr, val, | |
26215 | mmu_idx, retaddr); | |
26216 | } else { | |
26217 | ||
26218 | uintptr_t addend; | |
26219 | ||
26220 | ||
26221 | ||
26222 | ||
26223 | ||
26224 | ||
26225 | addend = env->tlb_table[mmu_idx][index].addend; | |
26226 | stl_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) | |
26227 | ; | |
26228 | } | |
26229 | } else { | |
26230 | ||
26231 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
26232 | ||
26233 | ||
26234 | ||
26235 | ||
26236 | tlb_fill(env, addr, 1, mmu_idx, retaddr); | |
26237 | goto redo; | |
26238 | } | |
26239 | } | |
26240 | ||
26241 | ||
26242 | static void slow_stl_mmu( | |
26243 | target_ulong addr, | |
26244 | uint32_t val, | |
26245 | int mmu_idx, | |
26246 | uintptr_t retaddr) | |
26247 | { | |
26248 | target_phys_addr_t ioaddr; | |
26249 | target_ulong tlb_addr; | |
26250 | int index, i; | |
26251 | ||
26252 | index = (addr >> 12) & ((1 << 8) - 1); | |
26253 | redo: | |
26254 | tlb_addr = env->tlb_table[mmu_idx][index].addr_write; | |
26255 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
26256 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
26257 | ||
26258 | if ((addr & ((1 << 2) - 1)) != 0) | |
26259 | goto do_unaligned_access; | |
26260 | ioaddr = env->iotlb[mmu_idx][index]; | |
26261 | io_writel( ioaddr, val, addr, retaddr); | |
26262 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 2) - 1) >= (1 << 12)) { | |
26263 | do_unaligned_access: | |
26264 | ||
26265 | ||
26266 | ||
26267 | for(i = (1 << 2) - 1; i >= 0; i--) { | |
26268 | ||
26269 | ||
26270 | ||
26271 | ||
26272 | ||
26273 | slow_stb_mmu( addr + i, | |
26274 | val >> (i * 8), | |
26275 | mmu_idx, retaddr); | |
26276 | ||
26277 | } | |
26278 | } else { | |
26279 | ||
26280 | uintptr_t addend = env->tlb_table[mmu_idx][index].addend; | |
26281 | stl_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) | |
26282 | ; | |
26283 | } | |
26284 | } else { | |
26285 | ||
26286 | tlb_fill(env, addr, 1, mmu_idx, retaddr); | |
26287 | goto redo; | |
26288 | } | |
26289 | } | |
26290 | # 4994 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
26291 | ||
26292 | ||
26293 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" 1 | |
26294 | # 69 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" | |
26295 | static uint64_t slow_ldq_mmu( | |
26296 | target_ulong addr, | |
26297 | int mmu_idx, | |
26298 | uintptr_t retaddr); | |
26299 | static __attribute__ (( always_inline )) __inline__ uint64_t io_readq( | |
26300 | target_phys_addr_t physaddr, | |
26301 | target_ulong addr, | |
26302 | uintptr_t retaddr) | |
26303 | { | |
26304 | uint64_t res; | |
26305 | MemoryRegion *mr = iotlb_to_region(physaddr); | |
26306 | ||
26307 | physaddr = (physaddr & ~((1 << 12) - 1)) + addr; | |
26308 | env->mem_io_pc = retaddr; | |
26309 | if (mr != &io_mem_ram && mr != &io_mem_rom | |
26310 | && mr != &io_mem_unassigned | |
26311 | && mr != &io_mem_notdirty | |
26312 | && !can_do_io(env)) { | |
26313 | cpu_io_recompile(env, retaddr); | |
26314 | } | |
26315 | ||
26316 | env->mem_io_vaddr = addr; | |
26317 | ||
26318 | ||
26319 | ||
26320 | ||
26321 | ||
26322 | ||
26323 | ||
26324 | res = io_mem_read(mr, physaddr, 4); | |
26325 | res |= io_mem_read(mr, physaddr + 4, 4) << 32; | |
26326 | ||
26327 | ||
26328 | return res; | |
26329 | } | |
26330 | ||
26331 | ||
26332 | uint64_t | |
26333 | __ldq_mmu( | |
26334 | target_ulong addr, | |
26335 | int mmu_idx) | |
26336 | { | |
26337 | uint64_t res; | |
26338 | int index; | |
26339 | target_ulong tlb_addr; | |
26340 | target_phys_addr_t ioaddr; | |
26341 | uintptr_t retaddr; | |
26342 | ||
26343 | ||
26344 | ||
26345 | index = (addr >> 12) & ((1 << 8) - 1); | |
26346 | redo: | |
26347 | tlb_addr = env->tlb_table[mmu_idx][index].addr_read; | |
26348 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
26349 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
26350 | ||
26351 | if ((addr & ((1 << 3) - 1)) != 0) | |
26352 | goto do_unaligned_access; | |
26353 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
26354 | ioaddr = env->iotlb[mmu_idx][index]; | |
26355 | res = io_readq( ioaddr, addr, retaddr); | |
26356 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 3) - 1) >= (1 << 12)) { | |
26357 | ||
26358 | do_unaligned_access: | |
26359 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
26360 | ||
26361 | ||
26362 | ||
26363 | res = slow_ldq_mmu( addr, | |
26364 | mmu_idx, retaddr); | |
26365 | } else { | |
26366 | ||
26367 | uintptr_t addend; | |
26368 | ||
26369 | ||
26370 | ||
26371 | ||
26372 | ||
26373 | ||
26374 | addend = env->tlb_table[mmu_idx][index].addend; | |
26375 | res = ldq_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) | |
26376 | ; | |
26377 | } | |
26378 | } else { | |
26379 | ||
26380 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
26381 | ||
26382 | ||
26383 | ||
26384 | ||
26385 | tlb_fill(env, addr, 0, mmu_idx, retaddr); | |
26386 | goto redo; | |
26387 | } | |
26388 | return res; | |
26389 | } | |
26390 | ||
26391 | ||
26392 | static uint64_t | |
26393 | slow_ldq_mmu( | |
26394 | target_ulong addr, | |
26395 | int mmu_idx, | |
26396 | uintptr_t retaddr) | |
26397 | { | |
26398 | uint64_t res, res1, res2; | |
26399 | int index, shift; | |
26400 | target_phys_addr_t ioaddr; | |
26401 | target_ulong tlb_addr, addr1, addr2; | |
26402 | ||
26403 | index = (addr >> 12) & ((1 << 8) - 1); | |
26404 | redo: | |
26405 | tlb_addr = env->tlb_table[mmu_idx][index].addr_read; | |
26406 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
26407 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
26408 | ||
26409 | if ((addr & ((1 << 3) - 1)) != 0) | |
26410 | goto do_unaligned_access; | |
26411 | ioaddr = env->iotlb[mmu_idx][index]; | |
26412 | res = io_readq( ioaddr, addr, retaddr); | |
26413 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 3) - 1) >= (1 << 12)) { | |
26414 | do_unaligned_access: | |
26415 | ||
26416 | addr1 = addr & ~((1 << 3) - 1); | |
26417 | addr2 = addr1 + (1 << 3); | |
26418 | res1 = slow_ldq_mmu( addr1, | |
26419 | mmu_idx, retaddr); | |
26420 | res2 = slow_ldq_mmu( addr2, | |
26421 | mmu_idx, retaddr); | |
26422 | shift = (addr & ((1 << 3) - 1)) * 8; | |
26423 | ||
26424 | ||
26425 | ||
26426 | res = (res1 >> shift) | (res2 << (((1 << 3) * 8) - shift)); | |
26427 | ||
26428 | res = (uint64_t)res; | |
26429 | } else { | |
26430 | ||
26431 | uintptr_t addend = env->tlb_table[mmu_idx][index].addend; | |
26432 | res = ldq_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) | |
26433 | ; | |
26434 | } | |
26435 | } else { | |
26436 | ||
26437 | tlb_fill(env, addr, 0, mmu_idx, retaddr); | |
26438 | goto redo; | |
26439 | } | |
26440 | return res; | |
26441 | } | |
26442 | ||
26443 | ||
26444 | ||
26445 | static void slow_stq_mmu( | |
26446 | target_ulong addr, | |
26447 | uint64_t val, | |
26448 | int mmu_idx, | |
26449 | uintptr_t retaddr); | |
26450 | ||
26451 | static __attribute__ (( always_inline )) __inline__ void io_writeq( | |
26452 | target_phys_addr_t physaddr, | |
26453 | uint64_t val, | |
26454 | target_ulong addr, | |
26455 | uintptr_t retaddr) | |
26456 | { | |
26457 | MemoryRegion *mr = iotlb_to_region(physaddr); | |
26458 | ||
26459 | physaddr = (physaddr & ~((1 << 12) - 1)) + addr; | |
26460 | if (mr != &io_mem_ram && mr != &io_mem_rom | |
26461 | && mr != &io_mem_unassigned | |
26462 | && mr != &io_mem_notdirty | |
26463 | && !can_do_io(env)) { | |
26464 | cpu_io_recompile(env, retaddr); | |
26465 | } | |
26466 | ||
26467 | env->mem_io_vaddr = addr; | |
26468 | env->mem_io_pc = retaddr; | |
26469 | ||
26470 | ||
26471 | ||
26472 | ||
26473 | ||
26474 | ||
26475 | ||
26476 | io_mem_write(mr, physaddr, (uint32_t)val, 4); | |
26477 | io_mem_write(mr, physaddr + 4, val >> 32, 4); | |
26478 | ||
26479 | ||
26480 | } | |
26481 | ||
26482 | void __stq_mmu( | |
26483 | target_ulong addr, | |
26484 | uint64_t val, | |
26485 | int mmu_idx) | |
26486 | { | |
26487 | target_phys_addr_t ioaddr; | |
26488 | target_ulong tlb_addr; | |
26489 | uintptr_t retaddr; | |
26490 | int index; | |
26491 | ||
26492 | index = (addr >> 12) & ((1 << 8) - 1); | |
26493 | redo: | |
26494 | tlb_addr = env->tlb_table[mmu_idx][index].addr_write; | |
26495 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
26496 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
26497 | ||
26498 | if ((addr & ((1 << 3) - 1)) != 0) | |
26499 | goto do_unaligned_access; | |
26500 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
26501 | ioaddr = env->iotlb[mmu_idx][index]; | |
26502 | io_writeq( ioaddr, val, addr, retaddr); | |
26503 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 3) - 1) >= (1 << 12)) { | |
26504 | do_unaligned_access: | |
26505 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
26506 | ||
26507 | ||
26508 | ||
26509 | slow_stq_mmu( addr, val, | |
26510 | mmu_idx, retaddr); | |
26511 | } else { | |
26512 | ||
26513 | uintptr_t addend; | |
26514 | ||
26515 | ||
26516 | ||
26517 | ||
26518 | ||
26519 | ||
26520 | addend = env->tlb_table[mmu_idx][index].addend; | |
26521 | stq_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) | |
26522 | ; | |
26523 | } | |
26524 | } else { | |
26525 | ||
26526 | retaddr = ((uintptr_t)__builtin_return_address(0) - 1); | |
26527 | ||
26528 | ||
26529 | ||
26530 | ||
26531 | tlb_fill(env, addr, 1, mmu_idx, retaddr); | |
26532 | goto redo; | |
26533 | } | |
26534 | } | |
26535 | ||
26536 | ||
26537 | static void slow_stq_mmu( | |
26538 | target_ulong addr, | |
26539 | uint64_t val, | |
26540 | int mmu_idx, | |
26541 | uintptr_t retaddr) | |
26542 | { | |
26543 | target_phys_addr_t ioaddr; | |
26544 | target_ulong tlb_addr; | |
26545 | int index, i; | |
26546 | ||
26547 | index = (addr >> 12) & ((1 << 8) - 1); | |
26548 | redo: | |
26549 | tlb_addr = env->tlb_table[mmu_idx][index].addr_write; | |
26550 | if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { | |
26551 | if (tlb_addr & ~~((1 << 12) - 1)) { | |
26552 | ||
26553 | if ((addr & ((1 << 3) - 1)) != 0) | |
26554 | goto do_unaligned_access; | |
26555 | ioaddr = env->iotlb[mmu_idx][index]; | |
26556 | io_writeq( ioaddr, val, addr, retaddr); | |
26557 | } else if (((addr & ~~((1 << 12) - 1)) + (1 << 3) - 1) >= (1 << 12)) { | |
26558 | do_unaligned_access: | |
26559 | ||
26560 | ||
26561 | ||
26562 | for(i = (1 << 3) - 1; i >= 0; i--) { | |
26563 | ||
26564 | ||
26565 | ||
26566 | ||
26567 | ||
26568 | slow_stb_mmu( addr + i, | |
26569 | val >> (i * 8), | |
26570 | mmu_idx, retaddr); | |
26571 | ||
26572 | } | |
26573 | } else { | |
26574 | ||
26575 | uintptr_t addend = env->tlb_table[mmu_idx][index].addend; | |
26576 | stq_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) | |
26577 | ; | |
26578 | } | |
26579 | } else { | |
26580 | ||
26581 | tlb_fill(env, addr, 1, mmu_idx, retaddr); | |
26582 | goto redo; | |
26583 | } | |
26584 | } | |
26585 | # 4997 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
26586 | # 5005 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
26587 | void tlb_fill(CPUX86State *env1, target_ulong addr, int is_write, int mmu_idx, | |
26588 | uintptr_t retaddr) | |
26589 | { | |
26590 | TranslationBlock *tb; | |
26591 | int ret; | |
26592 | CPUX86State *saved_env; | |
26593 | ||
26594 | saved_env = env; | |
26595 | env = env1; | |
26596 | ||
26597 | ret = cpu_x86_handle_mmu_fault(env, addr, is_write, mmu_idx); | |
26598 | if (ret) { | |
26599 | if (retaddr) { | |
26600 | ||
26601 | tb = tb_find_pc(retaddr); | |
26602 | if (tb) { | |
26603 | ||
26604 | ||
26605 | cpu_restore_state(tb, env, retaddr); | |
26606 | } | |
26607 | } | |
26608 | raise_exception_err(env->exception_index, env->error_code); | |
26609 | } | |
26610 | env = saved_env; | |
26611 | } | |
26612 | # 5077 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
26613 | static __attribute__ (( always_inline )) __inline__ void svm_save_seg(target_phys_addr_t addr, | |
26614 | const SegmentCache *sc) | |
26615 | { | |
26616 | stw_phys(addr + __builtin_offsetof (struct vmcb_seg, selector), | |
26617 | sc->selector); | |
26618 | stq_phys(addr + __builtin_offsetof (struct vmcb_seg, base), | |
26619 | sc->base); | |
26620 | stl_phys(addr + __builtin_offsetof (struct vmcb_seg, limit), | |
26621 | sc->limit); | |
26622 | stw_phys(addr + __builtin_offsetof (struct vmcb_seg, attrib), | |
26623 | ((sc->flags >> 8) & 0xff) | ((sc->flags >> 12) & 0x0f00)); | |
26624 | } | |
26625 | ||
26626 | static __attribute__ (( always_inline )) __inline__ void svm_load_seg(target_phys_addr_t addr, SegmentCache *sc) | |
26627 | { | |
26628 | unsigned int flags; | |
26629 | ||
26630 | sc->selector = lduw_phys(addr + __builtin_offsetof (struct vmcb_seg, selector)); | |
26631 | sc->base = ldq_phys(addr + __builtin_offsetof (struct vmcb_seg, base)); | |
26632 | sc->limit = ldl_phys(addr + __builtin_offsetof (struct vmcb_seg, limit)); | |
26633 | flags = lduw_phys(addr + __builtin_offsetof (struct vmcb_seg, attrib)); | |
26634 | sc->flags = ((flags & 0xff) << 8) | ((flags & 0x0f00) << 12); | |
26635 | } | |
26636 | ||
26637 | static __attribute__ (( always_inline )) __inline__ void svm_load_seg_cache(target_phys_addr_t addr, | |
26638 | CPUX86State *env, int seg_reg) | |
26639 | { | |
26640 | SegmentCache sc1, *sc = &sc1; | |
26641 | svm_load_seg(addr, sc); | |
26642 | cpu_x86_load_seg_cache(env, seg_reg, sc->selector, | |
26643 | sc->base, sc->limit, sc->flags); | |
26644 | } | |
26645 | ||
26646 | void helper_vmrun(int aflag, int next_eip_addend) | |
26647 | { | |
26648 | target_ulong addr; | |
26649 | uint32_t event_inj; | |
26650 | uint32_t int_ctl; | |
26651 | ||
26652 | helper_svm_check_intercept_param(0x080, 0); | |
26653 | ||
26654 | if (aflag == 2) | |
26655 | addr = (env->regs[0]); | |
26656 | else | |
26657 | addr = (uint32_t)(env->regs[0]); | |
26658 | ||
26659 | do { if (loglevel & ((1 << 1))) fprintf(logfile, "vmrun! " "%08x" "\n", addr); } while (0); | |
26660 | ||
26661 | env->vm_vmcb = addr; | |
26662 | ||
26663 | ||
26664 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.gdtr.base), env->gdt.base); | |
26665 | stl_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.gdtr.limit), env->gdt.limit); | |
26666 | ||
26667 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.idtr.base), env->idt.base); | |
26668 | stl_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.idtr.limit), env->idt.limit); | |
26669 | ||
26670 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr0), env->cr[0]); | |
26671 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr2), env->cr[2]); | |
26672 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr3), env->cr[3]); | |
26673 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr4), env->cr[4]); | |
26674 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.dr6), env->dr[6]); | |
26675 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.dr7), env->dr[7]); | |
26676 | ||
26677 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.efer), env->efer); | |
26678 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rflags), compute_eflags()); | |
26679 | ||
26680 | svm_save_seg(env->vm_hsave + __builtin_offsetof (struct vmcb, save.es), | |
26681 | &env->segs[0]); | |
26682 | svm_save_seg(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cs), | |
26683 | &env->segs[1]); | |
26684 | svm_save_seg(env->vm_hsave + __builtin_offsetof (struct vmcb, save.ss), | |
26685 | &env->segs[2]); | |
26686 | svm_save_seg(env->vm_hsave + __builtin_offsetof (struct vmcb, save.ds), | |
26687 | &env->segs[3]); | |
26688 | ||
26689 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rip), | |
26690 | (env->eip) + next_eip_addend); | |
26691 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rsp), (env->regs[4])); | |
26692 | stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rax), (env->regs[0])); | |
26693 | ||
26694 | ||
26695 | ||
26696 | env->intercept = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.intercept)); | |
26697 | env->intercept_cr_read = lduw_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.intercept_cr_read)); | |
26698 | env->intercept_cr_write = lduw_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.intercept_cr_write)); | |
26699 | env->intercept_dr_read = lduw_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.intercept_dr_read)); | |
26700 | env->intercept_dr_write = lduw_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.intercept_dr_write)); | |
26701 | env->intercept_exceptions = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.intercept_exceptions)); | |
26702 | ||
26703 | ||
26704 | env->hflags |= (1 << 21); | |
26705 | ||
26706 | env->tsc_offset = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.tsc_offset)); | |
26707 | ||
26708 | env->gdt.base = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.gdtr.base)); | |
26709 | env->gdt.limit = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.gdtr.limit)); | |
26710 | ||
26711 | env->idt.base = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.idtr.base)); | |
26712 | env->idt.limit = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.idtr.limit)); | |
26713 | ||
26714 | ||
26715 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_info_2), 0); | |
26716 | ||
26717 | cpu_x86_update_cr0(env, ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr0))); | |
26718 | cpu_x86_update_cr4(env, ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr4))); | |
26719 | cpu_x86_update_cr3(env, ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr3))); | |
26720 | env->cr[2] = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr2)); | |
26721 | int_ctl = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.int_ctl)); | |
26722 | env->hflags2 &= ~((1 << 1) | (1 << 3)); | |
26723 | if (int_ctl & (1 << 24)) { | |
26724 | env->v_tpr = int_ctl & 0x0f; | |
26725 | env->hflags2 |= (1 << 3); | |
26726 | if (env->eflags & 0x00000200) | |
26727 | env->hflags2 |= (1 << 1); | |
26728 | } | |
26729 | ||
26730 | cpu_load_efer(env, | |
26731 | ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.efer))); | |
26732 | env->eflags = 0; | |
26733 | load_eflags(ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rflags)), | |
26734 | ~(0x0800 | 0x0080 | 0x0040 | 0x0010 | 0x0004 | 0x0001 | 0x00000400)); | |
26735 | (env->cc_op) = CC_OP_EFLAGS; | |
26736 | ||
26737 | svm_load_seg_cache(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.es), | |
26738 | env, 0); | |
26739 | svm_load_seg_cache(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cs), | |
26740 | env, 1); | |
26741 | svm_load_seg_cache(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.ss), | |
26742 | env, 2); | |
26743 | svm_load_seg_cache(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.ds), | |
26744 | env, 3); | |
26745 | ||
26746 | (env->eip) = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rip)); | |
26747 | env->eip = (env->eip); | |
26748 | (env->regs[4]) = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rsp)); | |
26749 | (env->regs[0]) = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rax)); | |
26750 | env->dr[7] = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.dr7)); | |
26751 | env->dr[6] = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.dr6)); | |
26752 | cpu_x86_set_cpl(env, ldub_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cpl))); | |
26753 | ||
26754 | ||
26755 | ||
26756 | switch(ldub_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.tlb_ctl))) { | |
26757 | case 0: | |
26758 | break; | |
26759 | case 1: | |
26760 | ||
26761 | tlb_flush(env, 1); | |
26762 | break; | |
26763 | } | |
26764 | ||
26765 | env->hflags2 |= (1 << 0); | |
26766 | ||
26767 | if (int_ctl & (1 << 8)) { | |
26768 | env->interrupt_request |= 0x0100; | |
26769 | } | |
26770 | ||
26771 | ||
26772 | event_inj = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj)); | |
26773 | if (event_inj & (1 << 31)) { | |
26774 | uint8_t vector = event_inj & 0xff; | |
26775 | uint16_t valid_err = event_inj & (1 << 11); | |
26776 | uint32_t event_inj_err = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj_err)); | |
26777 | ||
26778 | do { if (loglevel & ((1 << 1))) fprintf(logfile, "Injecting(%#hx): ", valid_err); } while (0); | |
26779 | ||
26780 | switch (event_inj & (7 << 8)) { | |
26781 | case (0 << 8): | |
26782 | env->exception_index = vector; | |
26783 | env->error_code = event_inj_err; | |
26784 | env->exception_is_int = 0; | |
26785 | env->exception_next_eip = -1; | |
26786 | do { if (loglevel & ((1 << 1))) fprintf(logfile, "INTR"); } while (0); | |
26787 | ||
26788 | do_interrupt_all(vector, 0, 0, 0, 1); | |
26789 | break; | |
26790 | case (2 << 8): | |
26791 | env->exception_index = 2; | |
26792 | env->error_code = event_inj_err; | |
26793 | env->exception_is_int = 0; | |
26794 | env->exception_next_eip = (env->eip); | |
26795 | do { if (loglevel & ((1 << 1))) fprintf(logfile, "NMI"); } while (0); | |
26796 | cpu_loop_exit(env); | |
26797 | break; | |
26798 | case (3 << 8): | |
26799 | env->exception_index = vector; | |
26800 | env->error_code = event_inj_err; | |
26801 | env->exception_is_int = 0; | |
26802 | env->exception_next_eip = -1; | |
26803 | do { if (loglevel & ((1 << 1))) fprintf(logfile, "EXEPT"); } while (0); | |
26804 | cpu_loop_exit(env); | |
26805 | break; | |
26806 | case (4 << 8): | |
26807 | env->exception_index = vector; | |
26808 | env->error_code = event_inj_err; | |
26809 | env->exception_is_int = 1; | |
26810 | env->exception_next_eip = (env->eip); | |
26811 | do { if (loglevel & ((1 << 1))) fprintf(logfile, "SOFT"); } while (0); | |
26812 | cpu_loop_exit(env); | |
26813 | break; | |
26814 | } | |
26815 | do { if (loglevel & ((1 << 1))) fprintf(logfile, " %#x %#x\n", env->exception_index, env->error_code); } while (0); | |
26816 | } | |
26817 | } | |
26818 | ||
26819 | void helper_vmmcall(void) | |
26820 | { | |
26821 | helper_svm_check_intercept_param(0x081, 0); | |
26822 | raise_exception(6); | |
26823 | } | |
26824 | ||
26825 | void helper_vmload(int aflag) | |
26826 | { | |
26827 | target_ulong addr; | |
26828 | helper_svm_check_intercept_param(0x082, 0); | |
26829 | ||
26830 | if (aflag == 2) | |
26831 | addr = (env->regs[0]); | |
26832 | else | |
26833 | addr = (uint32_t)(env->regs[0]); | |
26834 | ||
26835 | do { if (loglevel & ((1 << 1))) fprintf(logfile, "vmload! " "%08x" "\nFS: %016" "ll" "x" " | " "%08x" "\n", addr, ldq_phys(addr + __builtin_offsetof (struct vmcb, save.fs.base)), env->segs[4].base); } while (0) | |
26836 | ||
26837 | ; | |
26838 | ||
26839 | svm_load_seg_cache(addr + __builtin_offsetof (struct vmcb, save.fs), | |
26840 | env, 4); | |
26841 | svm_load_seg_cache(addr + __builtin_offsetof (struct vmcb, save.gs), | |
26842 | env, 5); | |
26843 | svm_load_seg(addr + __builtin_offsetof (struct vmcb, save.tr), | |
26844 | &env->tr); | |
26845 | svm_load_seg(addr + __builtin_offsetof (struct vmcb, save.ldtr), | |
26846 | &env->ldt); | |
26847 | ||
26848 | ||
26849 | ||
26850 | ||
26851 | ||
26852 | ||
26853 | ||
26854 | env->star = ldq_phys(addr + __builtin_offsetof (struct vmcb, save.star)); | |
26855 | env->sysenter_cs = ldq_phys(addr + __builtin_offsetof (struct vmcb, save.sysenter_cs)); | |
26856 | env->sysenter_esp = ldq_phys(addr + __builtin_offsetof (struct vmcb, save.sysenter_esp)); | |
26857 | env->sysenter_eip = ldq_phys(addr + __builtin_offsetof (struct vmcb, save.sysenter_eip)); | |
26858 | } | |
26859 | ||
26860 | void helper_vmsave(int aflag) | |
26861 | { | |
26862 | target_ulong addr; | |
26863 | helper_svm_check_intercept_param(0x083, 0); | |
26864 | ||
26865 | if (aflag == 2) | |
26866 | addr = (env->regs[0]); | |
26867 | else | |
26868 | addr = (uint32_t)(env->regs[0]); | |
26869 | ||
26870 | do { if (loglevel & ((1 << 1))) fprintf(logfile, "vmsave! " "%08x" "\nFS: %016" "ll" "x" " | " "%08x" "\n", addr, ldq_phys(addr + __builtin_offsetof (struct vmcb, save.fs.base)), env->segs[4].base); } while (0) | |
26871 | ||
26872 | ; | |
26873 | ||
26874 | svm_save_seg(addr + __builtin_offsetof (struct vmcb, save.fs), | |
26875 | &env->segs[4]); | |
26876 | svm_save_seg(addr + __builtin_offsetof (struct vmcb, save.gs), | |
26877 | &env->segs[5]); | |
26878 | svm_save_seg(addr + __builtin_offsetof (struct vmcb, save.tr), | |
26879 | &env->tr); | |
26880 | svm_save_seg(addr + __builtin_offsetof (struct vmcb, save.ldtr), | |
26881 | &env->ldt); | |
26882 | ||
26883 | ||
26884 | ||
26885 | ||
26886 | ||
26887 | ||
26888 | ||
26889 | stq_phys(addr + __builtin_offsetof (struct vmcb, save.star), env->star); | |
26890 | stq_phys(addr + __builtin_offsetof (struct vmcb, save.sysenter_cs), env->sysenter_cs); | |
26891 | stq_phys(addr + __builtin_offsetof (struct vmcb, save.sysenter_esp), env->sysenter_esp); | |
26892 | stq_phys(addr + __builtin_offsetof (struct vmcb, save.sysenter_eip), env->sysenter_eip); | |
26893 | } | |
26894 | ||
26895 | void helper_stgi(void) | |
26896 | { | |
26897 | helper_svm_check_intercept_param(0x084, 0); | |
26898 | env->hflags2 |= (1 << 0); | |
26899 | } | |
26900 | ||
26901 | void helper_clgi(void) | |
26902 | { | |
26903 | helper_svm_check_intercept_param(0x085, 0); | |
26904 | env->hflags2 &= ~(1 << 0); | |
26905 | } | |
26906 | ||
26907 | void helper_skinit(void) | |
26908 | { | |
26909 | helper_svm_check_intercept_param(0x086, 0); | |
26910 | ||
26911 | raise_exception(6); | |
26912 | } | |
26913 | ||
26914 | void helper_invlpga(int aflag) | |
26915 | { | |
26916 | target_ulong addr; | |
26917 | helper_svm_check_intercept_param(0x07a, 0); | |
26918 | ||
26919 | if (aflag == 2) | |
26920 | addr = (env->regs[0]); | |
26921 | else | |
26922 | addr = (uint32_t)(env->regs[0]); | |
26923 | ||
26924 | ||
26925 | ||
26926 | tlb_flush_page(env, addr); | |
26927 | } | |
26928 | ||
26929 | void helper_svm_check_intercept_param(uint32_t type, uint64_t param) | |
26930 | { | |
26931 | if (__builtin_expect(!!(!(env->hflags & (1 << 21))), 1)) | |
26932 | return; | |
26933 | switch(type) { | |
26934 | case 0x000 ... 0x000 + 8: | |
26935 | if (env->intercept_cr_read & (1 << (type - 0x000))) { | |
26936 | helper_vmexit(type, param); | |
26937 | } | |
26938 | break; | |
26939 | case 0x010 ... 0x010 + 8: | |
26940 | if (env->intercept_cr_write & (1 << (type - 0x010))) { | |
26941 | helper_vmexit(type, param); | |
26942 | } | |
26943 | break; | |
26944 | case 0x020 ... 0x020 + 7: | |
26945 | if (env->intercept_dr_read & (1 << (type - 0x020))) { | |
26946 | helper_vmexit(type, param); | |
26947 | } | |
26948 | break; | |
26949 | case 0x030 ... 0x030 + 7: | |
26950 | if (env->intercept_dr_write & (1 << (type - 0x030))) { | |
26951 | helper_vmexit(type, param); | |
26952 | } | |
26953 | break; | |
26954 | case 0x040 ... 0x040 + 31: | |
26955 | if (env->intercept_exceptions & (1 << (type - 0x040))) { | |
26956 | helper_vmexit(type, param); | |
26957 | } | |
26958 | break; | |
26959 | case 0x07c: | |
26960 | if (env->intercept & (1ULL << (0x07c - 0x060))) { | |
26961 | ||
26962 | uint64_t addr = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.msrpm_base_pa)); | |
26963 | uint32_t t0, t1; | |
26964 | switch((uint32_t)(env->regs[1])) { | |
26965 | case 0 ... 0x1fff: | |
26966 | t0 = ((env->regs[1]) * 2) % 8; | |
26967 | t1 = ((env->regs[1]) * 2) / 8; | |
26968 | break; | |
26969 | case 0xc0000000 ... 0xc0001fff: | |
26970 | t0 = (8192 + (env->regs[1]) - 0xc0000000) * 2; | |
26971 | t1 = (t0 / 8); | |
26972 | t0 %= 8; | |
26973 | break; | |
26974 | case 0xc0010000 ... 0xc0011fff: | |
26975 | t0 = (16384 + (env->regs[1]) - 0xc0010000) * 2; | |
26976 | t1 = (t0 / 8); | |
26977 | t0 %= 8; | |
26978 | break; | |
26979 | default: | |
26980 | helper_vmexit(type, param); | |
26981 | t0 = 0; | |
26982 | t1 = 0; | |
26983 | break; | |
26984 | } | |
26985 | if (ldub_phys(addr + t1) & ((1 << param) << t0)) | |
26986 | helper_vmexit(type, param); | |
26987 | } | |
26988 | break; | |
26989 | default: | |
26990 | if (env->intercept & (1ULL << (type - 0x060))) { | |
26991 | helper_vmexit(type, param); | |
26992 | } | |
26993 | break; | |
26994 | } | |
26995 | } | |
26996 | ||
26997 | void svm_check_intercept(CPUX86State *env1, uint32_t type) | |
26998 | { | |
26999 | CPUX86State *saved_env; | |
27000 | ||
27001 | saved_env = env; | |
27002 | env = env1; | |
27003 | helper_svm_check_intercept_param(type, 0); | |
27004 | env = saved_env; | |
27005 | } | |
27006 | ||
27007 | void helper_svm_check_io(uint32_t port, uint32_t param, | |
27008 | uint32_t next_eip_addend) | |
27009 | { | |
27010 | if (env->intercept & (1ULL << (0x07b - 0x060))) { | |
27011 | ||
27012 | uint64_t addr = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.iopm_base_pa)); | |
27013 | uint16_t mask = (1 << ((param >> 4) & 7)) - 1; | |
27014 | if(lduw_phys(addr + port / 8) & (mask << (port & 7))) { | |
27015 | ||
27016 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_info_2), | |
27017 | env->eip + next_eip_addend); | |
27018 | helper_vmexit(0x07b, param | (port << 16)); | |
27019 | } | |
27020 | } | |
27021 | } | |
27022 | ||
27023 | ||
27024 | void helper_vmexit(uint32_t exit_code, uint64_t exit_info_1) | |
27025 | { | |
27026 | uint32_t int_ctl; | |
27027 | ||
27028 | do { if (loglevel & ((1 << 1))) fprintf(logfile, "vmexit(%08x, %016" "ll" "x" ", %016" "ll" "x" ", " "%08x" ")!\n", exit_code, exit_info_1, ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_info_2)), (env->eip)); } while (0) | |
27029 | ||
27030 | ||
27031 | ; | |
27032 | ||
27033 | if(env->hflags & (1 << 3)) { | |
27034 | stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.int_state), 1); | |
27035 | env->hflags &= ~(1 << 3); | |
27036 | } else { | |
27037 | stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.int_state), 0); | |
27038 | } | |
27039 | ||
27040 | ||
27041 | svm_save_seg(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.es), | |
27042 | &env->segs[0]); | |
27043 | svm_save_seg(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cs), | |
27044 | &env->segs[1]); | |
27045 | svm_save_seg(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.ss), | |
27046 | &env->segs[2]); | |
27047 | svm_save_seg(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.ds), | |
27048 | &env->segs[3]); | |
27049 | ||
27050 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.gdtr.base), env->gdt.base); | |
27051 | stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.gdtr.limit), env->gdt.limit); | |
27052 | ||
27053 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.idtr.base), env->idt.base); | |
27054 | stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.idtr.limit), env->idt.limit); | |
27055 | ||
27056 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.efer), env->efer); | |
27057 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr0), env->cr[0]); | |
27058 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr2), env->cr[2]); | |
27059 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr3), env->cr[3]); | |
27060 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr4), env->cr[4]); | |
27061 | ||
27062 | int_ctl = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.int_ctl)); | |
27063 | int_ctl &= ~(0x0f | (1 << 8)); | |
27064 | int_ctl |= env->v_tpr & 0x0f; | |
27065 | if (env->interrupt_request & 0x0100) | |
27066 | int_ctl |= (1 << 8); | |
27067 | stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.int_ctl), int_ctl); | |
27068 | ||
27069 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rflags), compute_eflags()); | |
27070 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rip), env->eip); | |
27071 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rsp), (env->regs[4])); | |
27072 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rax), (env->regs[0])); | |
27073 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.dr7), env->dr[7]); | |
27074 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.dr6), env->dr[6]); | |
27075 | stb_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cpl), env->hflags & (3 << 0)); | |
27076 | ||
27077 | ||
27078 | env->hflags2 &= ~((1 << 1) | (1 << 3)); | |
27079 | env->hflags &= ~(1 << 21); | |
27080 | env->intercept = 0; | |
27081 | env->intercept_exceptions = 0; | |
27082 | env->interrupt_request &= ~0x0100; | |
27083 | env->tsc_offset = 0; | |
27084 | ||
27085 | env->gdt.base = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.gdtr.base)); | |
27086 | env->gdt.limit = ldl_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.gdtr.limit)); | |
27087 | ||
27088 | env->idt.base = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.idtr.base)); | |
27089 | env->idt.limit = ldl_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.idtr.limit)); | |
27090 | ||
27091 | cpu_x86_update_cr0(env, ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr0)) | (1 << 0)); | |
27092 | cpu_x86_update_cr4(env, ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr4))); | |
27093 | cpu_x86_update_cr3(env, ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr3))); | |
27094 | ||
27095 | ||
27096 | cpu_load_efer(env, | |
27097 | ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.efer))); | |
27098 | env->eflags = 0; | |
27099 | load_eflags(ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rflags)), | |
27100 | ~(0x0800 | 0x0080 | 0x0040 | 0x0010 | 0x0004 | 0x0001 | 0x00000400)); | |
27101 | (env->cc_op) = CC_OP_EFLAGS; | |
27102 | ||
27103 | svm_load_seg_cache(env->vm_hsave + __builtin_offsetof (struct vmcb, save.es), | |
27104 | env, 0); | |
27105 | svm_load_seg_cache(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cs), | |
27106 | env, 1); | |
27107 | svm_load_seg_cache(env->vm_hsave + __builtin_offsetof (struct vmcb, save.ss), | |
27108 | env, 2); | |
27109 | svm_load_seg_cache(env->vm_hsave + __builtin_offsetof (struct vmcb, save.ds), | |
27110 | env, 3); | |
27111 | ||
27112 | (env->eip) = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rip)); | |
27113 | (env->regs[4]) = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rsp)); | |
27114 | (env->regs[0]) = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rax)); | |
27115 | ||
27116 | env->dr[6] = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.dr6)); | |
27117 | env->dr[7] = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.dr7)); | |
27118 | ||
27119 | ||
27120 | cpu_x86_set_cpl(env, 0); | |
27121 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_code), exit_code); | |
27122 | stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_info_1), exit_info_1); | |
27123 | ||
27124 | stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_int_info), | |
27125 | ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj))); | |
27126 | stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_int_info_err), | |
27127 | ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj_err))); | |
27128 | stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj), 0); | |
27129 | ||
27130 | env->hflags2 &= ~(1 << 0); | |
27131 | # 5606 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
27132 | env->cr[0] |= (1 << 0); | |
27133 | env->eflags &= ~0x00020000; | |
27134 | # 5618 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
27135 | env->exception_index = -1; | |
27136 | env->error_code = 0; | |
27137 | env->old_exception = -1; | |
27138 | ||
27139 | cpu_loop_exit(env); | |
27140 | } | |
27141 | # 5638 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
27142 | static void update_sse_status(void) | |
27143 | { | |
27144 | int rnd_type; | |
27145 | ||
27146 | ||
27147 | switch(env->mxcsr & 0x6000) { | |
27148 | default: | |
27149 | case 0x0000: | |
27150 | rnd_type = float_round_nearest_even; | |
27151 | break; | |
27152 | case 0x2000: | |
27153 | rnd_type = float_round_down; | |
27154 | break; | |
27155 | case 0x4000: | |
27156 | rnd_type = float_round_up; | |
27157 | break; | |
27158 | case 0x6000: | |
27159 | rnd_type = float_round_to_zero; | |
27160 | break; | |
27161 | } | |
27162 | set_float_rounding_mode(rnd_type, &env->sse_status); | |
27163 | ||
27164 | ||
27165 | set_flush_inputs_to_zero((env->mxcsr & 0x0040) ? 1 : 0, &env->sse_status); | |
27166 | ||
27167 | ||
27168 | set_flush_to_zero((env->mxcsr & 0x8000) ? 1 : 0, &env->fp_status); | |
27169 | } | |
27170 | ||
27171 | void helper_ldmxcsr(uint32_t val) | |
27172 | { | |
27173 | env->mxcsr = val; | |
27174 | update_sse_status(); | |
27175 | } | |
27176 | ||
27177 | void helper_enter_mmx(void) | |
27178 | { | |
27179 | env->fpstt = 0; | |
27180 | *(uint32_t *)(env->fptags) = 0; | |
27181 | *(uint32_t *)(env->fptags + 4) = 0; | |
27182 | } | |
27183 | ||
27184 | void helper_emms(void) | |
27185 | { | |
27186 | ||
27187 | *(uint32_t *)(env->fptags) = 0x01010101; | |
27188 | *(uint32_t *)(env->fptags + 4) = 0x01010101; | |
27189 | } | |
27190 | ||
27191 | ||
27192 | void helper_movq(void *d, void *s) | |
27193 | { | |
27194 | *(uint64_t *)d = *(uint64_t *)s; | |
27195 | } | |
27196 | ||
27197 | ||
27198 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" 1 | |
27199 | # 38 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
27200 | void helper_psrlw_mmx(MMXReg *d, MMXReg *s) | |
27201 | { | |
27202 | int shift; | |
27203 | ||
27204 | if (s->q > 15) { | |
27205 | d->q = 0; | |
27206 | ||
27207 | ||
27208 | ||
27209 | } else { | |
27210 | shift = s->_b[0]; | |
27211 | d->_w[0] >>= shift; | |
27212 | d->_w[1] >>= shift; | |
27213 | d->_w[2] >>= shift; | |
27214 | d->_w[3] >>= shift; | |
27215 | ||
27216 | ||
27217 | ||
27218 | ||
27219 | ||
27220 | ||
27221 | } | |
27222 | } | |
27223 | ||
27224 | void helper_psraw_mmx(MMXReg *d, MMXReg *s) | |
27225 | { | |
27226 | int shift; | |
27227 | ||
27228 | if (s->q > 15) { | |
27229 | shift = 15; | |
27230 | } else { | |
27231 | shift = s->_b[0]; | |
27232 | } | |
27233 | d->_w[0] = (int16_t)d->_w[0] >> shift; | |
27234 | d->_w[1] = (int16_t)d->_w[1] >> shift; | |
27235 | d->_w[2] = (int16_t)d->_w[2] >> shift; | |
27236 | d->_w[3] = (int16_t)d->_w[3] >> shift; | |
27237 | ||
27238 | ||
27239 | ||
27240 | ||
27241 | ||
27242 | ||
27243 | } | |
27244 | ||
27245 | void helper_psllw_mmx(MMXReg *d, MMXReg *s) | |
27246 | { | |
27247 | int shift; | |
27248 | ||
27249 | if (s->q > 15) { | |
27250 | d->q = 0; | |
27251 | ||
27252 | ||
27253 | ||
27254 | } else { | |
27255 | shift = s->_b[0]; | |
27256 | d->_w[0] <<= shift; | |
27257 | d->_w[1] <<= shift; | |
27258 | d->_w[2] <<= shift; | |
27259 | d->_w[3] <<= shift; | |
27260 | ||
27261 | ||
27262 | ||
27263 | ||
27264 | ||
27265 | ||
27266 | } | |
27267 | } | |
27268 | ||
27269 | void helper_psrld_mmx(MMXReg *d, MMXReg *s) | |
27270 | { | |
27271 | int shift; | |
27272 | ||
27273 | if (s->q > 31) { | |
27274 | d->q = 0; | |
27275 | ||
27276 | ||
27277 | ||
27278 | } else { | |
27279 | shift = s->_b[0]; | |
27280 | d->_l[0] >>= shift; | |
27281 | d->_l[1] >>= shift; | |
27282 | ||
27283 | ||
27284 | ||
27285 | ||
27286 | } | |
27287 | } | |
27288 | ||
27289 | void helper_psrad_mmx(MMXReg *d, MMXReg *s) | |
27290 | { | |
27291 | int shift; | |
27292 | ||
27293 | if (s->q > 31) { | |
27294 | shift = 31; | |
27295 | } else { | |
27296 | shift = s->_b[0]; | |
27297 | } | |
27298 | d->_l[0] = (int32_t)d->_l[0] >> shift; | |
27299 | d->_l[1] = (int32_t)d->_l[1] >> shift; | |
27300 | ||
27301 | ||
27302 | ||
27303 | ||
27304 | } | |
27305 | ||
27306 | void helper_pslld_mmx(MMXReg *d, MMXReg *s) | |
27307 | { | |
27308 | int shift; | |
27309 | ||
27310 | if (s->q > 31) { | |
27311 | d->q = 0; | |
27312 | ||
27313 | ||
27314 | ||
27315 | } else { | |
27316 | shift = s->_b[0]; | |
27317 | d->_l[0] <<= shift; | |
27318 | d->_l[1] <<= shift; | |
27319 | ||
27320 | ||
27321 | ||
27322 | ||
27323 | } | |
27324 | } | |
27325 | ||
27326 | void helper_psrlq_mmx(MMXReg *d, MMXReg *s) | |
27327 | { | |
27328 | int shift; | |
27329 | ||
27330 | if (s->q > 63) { | |
27331 | d->q = 0; | |
27332 | ||
27333 | ||
27334 | ||
27335 | } else { | |
27336 | shift = s->_b[0]; | |
27337 | d->q >>= shift; | |
27338 | ||
27339 | ||
27340 | ||
27341 | } | |
27342 | } | |
27343 | ||
27344 | void helper_psllq_mmx(MMXReg *d, MMXReg *s) | |
27345 | { | |
27346 | int shift; | |
27347 | ||
27348 | if (s->q > 63) { | |
27349 | d->q = 0; | |
27350 | ||
27351 | ||
27352 | ||
27353 | } else { | |
27354 | shift = s->_b[0]; | |
27355 | d->q <<= shift; | |
27356 | ||
27357 | ||
27358 | ||
27359 | } | |
27360 | } | |
27361 | # 287 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
27362 | static __attribute__ (( always_inline )) __inline__ int satub(int x) | |
27363 | { | |
27364 | if (x < 0) | |
27365 | return 0; | |
27366 | else if (x > 255) | |
27367 | return 255; | |
27368 | else | |
27369 | return x; | |
27370 | } | |
27371 | ||
27372 | static __attribute__ (( always_inline )) __inline__ int satuw(int x) | |
27373 | { | |
27374 | if (x < 0) | |
27375 | return 0; | |
27376 | else if (x > 65535) | |
27377 | return 65535; | |
27378 | else | |
27379 | return x; | |
27380 | } | |
27381 | ||
27382 | static __attribute__ (( always_inline )) __inline__ int satsb(int x) | |
27383 | { | |
27384 | if (x < -128) | |
27385 | return -128; | |
27386 | else if (x > 127) | |
27387 | return 127; | |
27388 | else | |
27389 | return x; | |
27390 | } | |
27391 | ||
27392 | static __attribute__ (( always_inline )) __inline__ int satsw(int x) | |
27393 | { | |
27394 | if (x < -32768) | |
27395 | return -32768; | |
27396 | else if (x > 32767) | |
27397 | return 32767; | |
27398 | else | |
27399 | return x; | |
27400 | } | |
27401 | # 361 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
27402 | void helper_paddb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = ((d->_b[0]) + (s->_b[0])); d->_b[1] = ((d->_b[1]) + (s->_b[1])); d->_b[2] = ((d->_b[2]) + (s->_b[2])); d->_b[3] = ((d->_b[3]) + (s->_b[3])); d->_b[4] = ((d->_b[4]) + (s->_b[4])); d->_b[5] = ((d->_b[5]) + (s->_b[5])); d->_b[6] = ((d->_b[6]) + (s->_b[6])); d->_b[7] = ((d->_b[7]) + (s->_b[7])); } | |
27403 | void helper_paddw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((d->_w[0]) + (s->_w[0])); d->_w[1] = ((d->_w[1]) + (s->_w[1])); d->_w[2] = ((d->_w[2]) + (s->_w[2])); d->_w[3] = ((d->_w[3]) + (s->_w[3])); } | |
27404 | void helper_paddl_mmx (MMXReg *d, MMXReg *s){ d->_l[0] = ((d->_l[0]) + (s->_l[0])); d->_l[1] = ((d->_l[1]) + (s->_l[1])); } | |
27405 | void helper_paddq_mmx (MMXReg *d, MMXReg *s){ d->q = ((d->q) + (s->q)); } | |
27406 | ||
27407 | void helper_psubb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = ((d->_b[0]) - (s->_b[0])); d->_b[1] = ((d->_b[1]) - (s->_b[1])); d->_b[2] = ((d->_b[2]) - (s->_b[2])); d->_b[3] = ((d->_b[3]) - (s->_b[3])); d->_b[4] = ((d->_b[4]) - (s->_b[4])); d->_b[5] = ((d->_b[5]) - (s->_b[5])); d->_b[6] = ((d->_b[6]) - (s->_b[6])); d->_b[7] = ((d->_b[7]) - (s->_b[7])); } | |
27408 | void helper_psubw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((d->_w[0]) - (s->_w[0])); d->_w[1] = ((d->_w[1]) - (s->_w[1])); d->_w[2] = ((d->_w[2]) - (s->_w[2])); d->_w[3] = ((d->_w[3]) - (s->_w[3])); } | |
27409 | void helper_psubl_mmx (MMXReg *d, MMXReg *s){ d->_l[0] = ((d->_l[0]) - (s->_l[0])); d->_l[1] = ((d->_l[1]) - (s->_l[1])); } | |
27410 | void helper_psubq_mmx (MMXReg *d, MMXReg *s){ d->q = ((d->q) - (s->q)); } | |
27411 | ||
27412 | void helper_paddusb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = satub((d->_b[0]) + (s->_b[0])); d->_b[1] = satub((d->_b[1]) + (s->_b[1])); d->_b[2] = satub((d->_b[2]) + (s->_b[2])); d->_b[3] = satub((d->_b[3]) + (s->_b[3])); d->_b[4] = satub((d->_b[4]) + (s->_b[4])); d->_b[5] = satub((d->_b[5]) + (s->_b[5])); d->_b[6] = satub((d->_b[6]) + (s->_b[6])); d->_b[7] = satub((d->_b[7]) + (s->_b[7])); } | |
27413 | void helper_paddsb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = satsb((int8_t)(d->_b[0]) + (int8_t)(s->_b[0])); d->_b[1] = satsb((int8_t)(d->_b[1]) + (int8_t)(s->_b[1])); d->_b[2] = satsb((int8_t)(d->_b[2]) + (int8_t)(s->_b[2])); d->_b[3] = satsb((int8_t)(d->_b[3]) + (int8_t)(s->_b[3])); d->_b[4] = satsb((int8_t)(d->_b[4]) + (int8_t)(s->_b[4])); d->_b[5] = satsb((int8_t)(d->_b[5]) + (int8_t)(s->_b[5])); d->_b[6] = satsb((int8_t)(d->_b[6]) + (int8_t)(s->_b[6])); d->_b[7] = satsb((int8_t)(d->_b[7]) + (int8_t)(s->_b[7])); } | |
27414 | void helper_psubusb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = satub((d->_b[0]) - (s->_b[0])); d->_b[1] = satub((d->_b[1]) - (s->_b[1])); d->_b[2] = satub((d->_b[2]) - (s->_b[2])); d->_b[3] = satub((d->_b[3]) - (s->_b[3])); d->_b[4] = satub((d->_b[4]) - (s->_b[4])); d->_b[5] = satub((d->_b[5]) - (s->_b[5])); d->_b[6] = satub((d->_b[6]) - (s->_b[6])); d->_b[7] = satub((d->_b[7]) - (s->_b[7])); } | |
27415 | void helper_psubsb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = satsb((int8_t)(d->_b[0]) - (int8_t)(s->_b[0])); d->_b[1] = satsb((int8_t)(d->_b[1]) - (int8_t)(s->_b[1])); d->_b[2] = satsb((int8_t)(d->_b[2]) - (int8_t)(s->_b[2])); d->_b[3] = satsb((int8_t)(d->_b[3]) - (int8_t)(s->_b[3])); d->_b[4] = satsb((int8_t)(d->_b[4]) - (int8_t)(s->_b[4])); d->_b[5] = satsb((int8_t)(d->_b[5]) - (int8_t)(s->_b[5])); d->_b[6] = satsb((int8_t)(d->_b[6]) - (int8_t)(s->_b[6])); d->_b[7] = satsb((int8_t)(d->_b[7]) - (int8_t)(s->_b[7])); } | |
27416 | ||
27417 | void helper_paddusw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = satuw((d->_w[0]) + (s->_w[0])); d->_w[1] = satuw((d->_w[1]) + (s->_w[1])); d->_w[2] = satuw((d->_w[2]) + (s->_w[2])); d->_w[3] = satuw((d->_w[3]) + (s->_w[3])); } | |
27418 | void helper_paddsw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = satsw((int16_t)(d->_w[0]) + (int16_t)(s->_w[0])); d->_w[1] = satsw((int16_t)(d->_w[1]) + (int16_t)(s->_w[1])); d->_w[2] = satsw((int16_t)(d->_w[2]) + (int16_t)(s->_w[2])); d->_w[3] = satsw((int16_t)(d->_w[3]) + (int16_t)(s->_w[3])); } | |
27419 | void helper_psubusw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = satuw((d->_w[0]) - (s->_w[0])); d->_w[1] = satuw((d->_w[1]) - (s->_w[1])); d->_w[2] = satuw((d->_w[2]) - (s->_w[2])); d->_w[3] = satuw((d->_w[3]) - (s->_w[3])); } | |
27420 | void helper_psubsw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = satsw((int16_t)(d->_w[0]) - (int16_t)(s->_w[0])); d->_w[1] = satsw((int16_t)(d->_w[1]) - (int16_t)(s->_w[1])); d->_w[2] = satsw((int16_t)(d->_w[2]) - (int16_t)(s->_w[2])); d->_w[3] = satsw((int16_t)(d->_w[3]) - (int16_t)(s->_w[3])); } | |
27421 | ||
27422 | void helper_pminub_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = ((d->_b[0]) < (s->_b[0])) ? (d->_b[0]) : (s->_b[0]); d->_b[1] = ((d->_b[1]) < (s->_b[1])) ? (d->_b[1]) : (s->_b[1]); d->_b[2] = ((d->_b[2]) < (s->_b[2])) ? (d->_b[2]) : (s->_b[2]); d->_b[3] = ((d->_b[3]) < (s->_b[3])) ? (d->_b[3]) : (s->_b[3]); d->_b[4] = ((d->_b[4]) < (s->_b[4])) ? (d->_b[4]) : (s->_b[4]); d->_b[5] = ((d->_b[5]) < (s->_b[5])) ? (d->_b[5]) : (s->_b[5]); d->_b[6] = ((d->_b[6]) < (s->_b[6])) ? (d->_b[6]) : (s->_b[6]); d->_b[7] = ((d->_b[7]) < (s->_b[7])) ? (d->_b[7]) : (s->_b[7]); } | |
27423 | void helper_pmaxub_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = ((d->_b[0]) > (s->_b[0])) ? (d->_b[0]) : (s->_b[0]); d->_b[1] = ((d->_b[1]) > (s->_b[1])) ? (d->_b[1]) : (s->_b[1]); d->_b[2] = ((d->_b[2]) > (s->_b[2])) ? (d->_b[2]) : (s->_b[2]); d->_b[3] = ((d->_b[3]) > (s->_b[3])) ? (d->_b[3]) : (s->_b[3]); d->_b[4] = ((d->_b[4]) > (s->_b[4])) ? (d->_b[4]) : (s->_b[4]); d->_b[5] = ((d->_b[5]) > (s->_b[5])) ? (d->_b[5]) : (s->_b[5]); d->_b[6] = ((d->_b[6]) > (s->_b[6])) ? (d->_b[6]) : (s->_b[6]); d->_b[7] = ((d->_b[7]) > (s->_b[7])) ? (d->_b[7]) : (s->_b[7]); } | |
27424 | ||
27425 | void helper_pminsw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((int16_t)(d->_w[0]) < (int16_t)(s->_w[0])) ? (d->_w[0]) : (s->_w[0]); d->_w[1] = ((int16_t)(d->_w[1]) < (int16_t)(s->_w[1])) ? (d->_w[1]) : (s->_w[1]); d->_w[2] = ((int16_t)(d->_w[2]) < (int16_t)(s->_w[2])) ? (d->_w[2]) : (s->_w[2]); d->_w[3] = ((int16_t)(d->_w[3]) < (int16_t)(s->_w[3])) ? (d->_w[3]) : (s->_w[3]); } | |
27426 | void helper_pmaxsw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((int16_t)(d->_w[0]) > (int16_t)(s->_w[0])) ? (d->_w[0]) : (s->_w[0]); d->_w[1] = ((int16_t)(d->_w[1]) > (int16_t)(s->_w[1])) ? (d->_w[1]) : (s->_w[1]); d->_w[2] = ((int16_t)(d->_w[2]) > (int16_t)(s->_w[2])) ? (d->_w[2]) : (s->_w[2]); d->_w[3] = ((int16_t)(d->_w[3]) > (int16_t)(s->_w[3])) ? (d->_w[3]) : (s->_w[3]); } | |
27427 | ||
27428 | void helper_pand_mmx (MMXReg *d, MMXReg *s){ d->q = (d->q) & (s->q); } | |
27429 | void helper_pandn_mmx (MMXReg *d, MMXReg *s){ d->q = ((~(d->q)) & (s->q)); } | |
27430 | void helper_por_mmx (MMXReg *d, MMXReg *s){ d->q = (d->q) | (s->q); } | |
27431 | void helper_pxor_mmx (MMXReg *d, MMXReg *s){ d->q = (d->q) ^ (s->q); } | |
27432 | ||
27433 | void helper_pcmpgtb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = (int8_t)(d->_b[0]) > (int8_t)(s->_b[0]) ? -1 : 0; d->_b[1] = (int8_t)(d->_b[1]) > (int8_t)(s->_b[1]) ? -1 : 0; d->_b[2] = (int8_t)(d->_b[2]) > (int8_t)(s->_b[2]) ? -1 : 0; d->_b[3] = (int8_t)(d->_b[3]) > (int8_t)(s->_b[3]) ? -1 : 0; d->_b[4] = (int8_t)(d->_b[4]) > (int8_t)(s->_b[4]) ? -1 : 0; d->_b[5] = (int8_t)(d->_b[5]) > (int8_t)(s->_b[5]) ? -1 : 0; d->_b[6] = (int8_t)(d->_b[6]) > (int8_t)(s->_b[6]) ? -1 : 0; d->_b[7] = (int8_t)(d->_b[7]) > (int8_t)(s->_b[7]) ? -1 : 0; } | |
27434 | void helper_pcmpgtw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = (int16_t)(d->_w[0]) > (int16_t)(s->_w[0]) ? -1 : 0; d->_w[1] = (int16_t)(d->_w[1]) > (int16_t)(s->_w[1]) ? -1 : 0; d->_w[2] = (int16_t)(d->_w[2]) > (int16_t)(s->_w[2]) ? -1 : 0; d->_w[3] = (int16_t)(d->_w[3]) > (int16_t)(s->_w[3]) ? -1 : 0; } | |
27435 | void helper_pcmpgtl_mmx (MMXReg *d, MMXReg *s){ d->_l[0] = (int32_t)(d->_l[0]) > (int32_t)(s->_l[0]) ? -1 : 0; d->_l[1] = (int32_t)(d->_l[1]) > (int32_t)(s->_l[1]) ? -1 : 0; } | |
27436 | ||
27437 | void helper_pcmpeqb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = (d->_b[0]) == (s->_b[0]) ? -1 : 0; d->_b[1] = (d->_b[1]) == (s->_b[1]) ? -1 : 0; d->_b[2] = (d->_b[2]) == (s->_b[2]) ? -1 : 0; d->_b[3] = (d->_b[3]) == (s->_b[3]) ? -1 : 0; d->_b[4] = (d->_b[4]) == (s->_b[4]) ? -1 : 0; d->_b[5] = (d->_b[5]) == (s->_b[5]) ? -1 : 0; d->_b[6] = (d->_b[6]) == (s->_b[6]) ? -1 : 0; d->_b[7] = (d->_b[7]) == (s->_b[7]) ? -1 : 0; } | |
27438 | void helper_pcmpeqw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = (d->_w[0]) == (s->_w[0]) ? -1 : 0; d->_w[1] = (d->_w[1]) == (s->_w[1]) ? -1 : 0; d->_w[2] = (d->_w[2]) == (s->_w[2]) ? -1 : 0; d->_w[3] = (d->_w[3]) == (s->_w[3]) ? -1 : 0; } | |
27439 | void helper_pcmpeql_mmx (MMXReg *d, MMXReg *s){ d->_l[0] = (d->_l[0]) == (s->_l[0]) ? -1 : 0; d->_l[1] = (d->_l[1]) == (s->_l[1]) ? -1 : 0; } | |
27440 | ||
27441 | void helper_pmullw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = (d->_w[0]) * (s->_w[0]); d->_w[1] = (d->_w[1]) * (s->_w[1]); d->_w[2] = (d->_w[2]) * (s->_w[2]); d->_w[3] = (d->_w[3]) * (s->_w[3]); } | |
27442 | ||
27443 | void helper_pmulhrw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((int16_t)(d->_w[0]) * (int16_t)(s->_w[0]) + 0x8000) >> 16; d->_w[1] = ((int16_t)(d->_w[1]) * (int16_t)(s->_w[1]) + 0x8000) >> 16; d->_w[2] = ((int16_t)(d->_w[2]) * (int16_t)(s->_w[2]) + 0x8000) >> 16; d->_w[3] = ((int16_t)(d->_w[3]) * (int16_t)(s->_w[3]) + 0x8000) >> 16; } | |
27444 | ||
27445 | void helper_pmulhuw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = (d->_w[0]) * (s->_w[0]) >> 16; d->_w[1] = (d->_w[1]) * (s->_w[1]) >> 16; d->_w[2] = (d->_w[2]) * (s->_w[2]) >> 16; d->_w[3] = (d->_w[3]) * (s->_w[3]) >> 16; } | |
27446 | void helper_pmulhw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = (int16_t)(d->_w[0]) * (int16_t)(s->_w[0]) >> 16; d->_w[1] = (int16_t)(d->_w[1]) * (int16_t)(s->_w[1]) >> 16; d->_w[2] = (int16_t)(d->_w[2]) * (int16_t)(s->_w[2]) >> 16; d->_w[3] = (int16_t)(d->_w[3]) * (int16_t)(s->_w[3]) >> 16; } | |
27447 | ||
27448 | void helper_pavgb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = ((d->_b[0]) + (s->_b[0]) + 1) >> 1; d->_b[1] = ((d->_b[1]) + (s->_b[1]) + 1) >> 1; d->_b[2] = ((d->_b[2]) + (s->_b[2]) + 1) >> 1; d->_b[3] = ((d->_b[3]) + (s->_b[3]) + 1) >> 1; d->_b[4] = ((d->_b[4]) + (s->_b[4]) + 1) >> 1; d->_b[5] = ((d->_b[5]) + (s->_b[5]) + 1) >> 1; d->_b[6] = ((d->_b[6]) + (s->_b[6]) + 1) >> 1; d->_b[7] = ((d->_b[7]) + (s->_b[7]) + 1) >> 1; } | |
27449 | void helper_pavgw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((d->_w[0]) + (s->_w[0]) + 1) >> 1; d->_w[1] = ((d->_w[1]) + (s->_w[1]) + 1) >> 1; d->_w[2] = ((d->_w[2]) + (s->_w[2]) + 1) >> 1; d->_w[3] = ((d->_w[3]) + (s->_w[3]) + 1) >> 1; } | |
27450 | ||
27451 | void helper_pmuludq_mmx (MMXReg *d, MMXReg *s) | |
27452 | { | |
27453 | d->q = (uint64_t)s->_l[0] * (uint64_t)d->_l[0]; | |
27454 | ||
27455 | ||
27456 | ||
27457 | } | |
27458 | ||
27459 | void helper_pmaddwd_mmx (MMXReg *d, MMXReg *s) | |
27460 | { | |
27461 | int i; | |
27462 | ||
27463 | for(i = 0; i < (2 << 0); i++) { | |
27464 | d->_l[i] = (int16_t)s->_w[2*i] * (int16_t)d->_w[2*i] + | |
27465 | (int16_t)s->_w[2*i+1] * (int16_t)d->_w[2*i+1]; | |
27466 | } | |
27467 | } | |
27468 | ||
27469 | ||
27470 | static __attribute__ (( always_inline )) __inline__ int abs1(int a) | |
27471 | { | |
27472 | if (a < 0) | |
27473 | return -a; | |
27474 | else | |
27475 | return a; | |
27476 | } | |
27477 | ||
27478 | void helper_psadbw_mmx (MMXReg *d, MMXReg *s) | |
27479 | { | |
27480 | unsigned int val; | |
27481 | ||
27482 | val = 0; | |
27483 | val += abs1(d->_b[0] - s->_b[0]); | |
27484 | val += abs1(d->_b[1] - s->_b[1]); | |
27485 | val += abs1(d->_b[2] - s->_b[2]); | |
27486 | val += abs1(d->_b[3] - s->_b[3]); | |
27487 | val += abs1(d->_b[4] - s->_b[4]); | |
27488 | val += abs1(d->_b[5] - s->_b[5]); | |
27489 | val += abs1(d->_b[6] - s->_b[6]); | |
27490 | val += abs1(d->_b[7] - s->_b[7]); | |
27491 | d->q = val; | |
27492 | # 463 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
27493 | } | |
27494 | ||
27495 | void helper_maskmov_mmx (MMXReg *d, MMXReg *s, target_ulong a0) | |
27496 | { | |
27497 | int i; | |
27498 | for(i = 0; i < (8 << 0); i++) { | |
27499 | if (s->_b[i] & 0x80) | |
27500 | stb_data(a0 + i, d->_b[i]); | |
27501 | } | |
27502 | } | |
27503 | ||
27504 | void helper_movl_mm_T0_mmx (MMXReg *d, uint32_t val) | |
27505 | { | |
27506 | d->_l[0] = val; | |
27507 | d->_l[1] = 0; | |
27508 | ||
27509 | ||
27510 | ||
27511 | } | |
27512 | # 494 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
27513 | void helper_pshufw_mmx (MMXReg *d, MMXReg *s, int order) | |
27514 | { | |
27515 | MMXReg r; | |
27516 | r._w[0] = s->_w[order & 3]; | |
27517 | r._w[1] = s->_w[(order >> 2) & 3]; | |
27518 | r._w[2] = s->_w[(order >> 4) & 3]; | |
27519 | r._w[3] = s->_w[(order >> 6) & 3]; | |
27520 | *d = r; | |
27521 | } | |
27522 | # 1023 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
27523 | uint32_t helper_pmovmskb_mmx(MMXReg *s) | |
27524 | { | |
27525 | uint32_t val; | |
27526 | val = 0; | |
27527 | val |= (s->_b[0] >> 7); | |
27528 | val |= (s->_b[1] >> 6) & 0x02; | |
27529 | val |= (s->_b[2] >> 5) & 0x04; | |
27530 | val |= (s->_b[3] >> 4) & 0x08; | |
27531 | val |= (s->_b[4] >> 3) & 0x10; | |
27532 | val |= (s->_b[5] >> 2) & 0x20; | |
27533 | val |= (s->_b[6] >> 1) & 0x40; | |
27534 | val |= (s->_b[7]) & 0x80; | |
27535 | # 1045 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
27536 | return val; | |
27537 | } | |
27538 | ||
27539 | void helper_packsswb_mmx (MMXReg *d, MMXReg *s) | |
27540 | { | |
27541 | MMXReg r; | |
27542 | ||
27543 | r._b[0] = satsb((int16_t)d->_w[0]); | |
27544 | r._b[1] = satsb((int16_t)d->_w[1]); | |
27545 | r._b[2] = satsb((int16_t)d->_w[2]); | |
27546 | r._b[3] = satsb((int16_t)d->_w[3]); | |
27547 | ||
27548 | ||
27549 | ||
27550 | ||
27551 | ||
27552 | ||
27553 | r._b[(4 << 0) + 0] = satsb((int16_t)s->_w[0]); | |
27554 | r._b[(4 << 0) + 1] = satsb((int16_t)s->_w[1]); | |
27555 | r._b[(4 << 0) + 2] = satsb((int16_t)s->_w[2]); | |
27556 | r._b[(4 << 0) + 3] = satsb((int16_t)s->_w[3]); | |
27557 | ||
27558 | ||
27559 | ||
27560 | ||
27561 | ||
27562 | ||
27563 | *d = r; | |
27564 | } | |
27565 | ||
27566 | void helper_packuswb_mmx (MMXReg *d, MMXReg *s) | |
27567 | { | |
27568 | MMXReg r; | |
27569 | ||
27570 | r._b[0] = satub((int16_t)d->_w[0]); | |
27571 | r._b[1] = satub((int16_t)d->_w[1]); | |
27572 | r._b[2] = satub((int16_t)d->_w[2]); | |
27573 | r._b[3] = satub((int16_t)d->_w[3]); | |
27574 | ||
27575 | ||
27576 | ||
27577 | ||
27578 | ||
27579 | ||
27580 | r._b[(4 << 0) + 0] = satub((int16_t)s->_w[0]); | |
27581 | r._b[(4 << 0) + 1] = satub((int16_t)s->_w[1]); | |
27582 | r._b[(4 << 0) + 2] = satub((int16_t)s->_w[2]); | |
27583 | r._b[(4 << 0) + 3] = satub((int16_t)s->_w[3]); | |
27584 | ||
27585 | ||
27586 | ||
27587 | ||
27588 | ||
27589 | ||
27590 | *d = r; | |
27591 | } | |
27592 | ||
27593 | void helper_packssdw_mmx (MMXReg *d, MMXReg *s) | |
27594 | { | |
27595 | MMXReg r; | |
27596 | ||
27597 | r._w[0] = satsw(d->_l[0]); | |
27598 | r._w[1] = satsw(d->_l[1]); | |
27599 | ||
27600 | ||
27601 | ||
27602 | ||
27603 | r._w[(2 << 0) + 0] = satsw(s->_l[0]); | |
27604 | r._w[(2 << 0) + 1] = satsw(s->_l[1]); | |
27605 | ||
27606 | ||
27607 | ||
27608 | ||
27609 | *d = r; | |
27610 | } | |
27611 | # 1189 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
27612 | void helper_punpcklbw_mmx (MMXReg *d, MMXReg *s) { MMXReg r; r._b[0] = d->_b[(0 << (0 + 2)) + 0]; r._b[1] = s->_b[(0 << (0 + 2)) + 0]; r._b[2] = d->_b[(0 << (0 + 2)) + 1]; r._b[3] = s->_b[(0 << (0 + 2)) + 1]; r._b[4] = d->_b[(0 << (0 + 2)) + 2]; r._b[5] = s->_b[(0 << (0 + 2)) + 2]; r._b[6] = d->_b[(0 << (0 + 2)) + 3]; r._b[7] = s->_b[(0 << (0 + 2)) + 3]; *d = r; } void helper_punpcklwd_mmx (MMXReg *d, MMXReg *s) { MMXReg r; r._w[0] = d->_w[(0 << (0 + 1)) + 0]; r._w[1] = s->_w[(0 << (0 + 1)) + 0]; r._w[2] = d->_w[(0 << (0 + 1)) + 1]; r._w[3] = s->_w[(0 << (0 + 1)) + 1]; *d = r; } void helper_punpckldq_mmx (MMXReg *d, MMXReg *s) { MMXReg r; r._l[0] = d->_l[(0 << 0) + 0]; r._l[1] = s->_l[(0 << 0) + 0]; *d = r; } | |
27613 | void helper_punpckhbw_mmx (MMXReg *d, MMXReg *s) { MMXReg r; r._b[0] = d->_b[(1 << (0 + 2)) + 0]; r._b[1] = s->_b[(1 << (0 + 2)) + 0]; r._b[2] = d->_b[(1 << (0 + 2)) + 1]; r._b[3] = s->_b[(1 << (0 + 2)) + 1]; r._b[4] = d->_b[(1 << (0 + 2)) + 2]; r._b[5] = s->_b[(1 << (0 + 2)) + 2]; r._b[6] = d->_b[(1 << (0 + 2)) + 3]; r._b[7] = s->_b[(1 << (0 + 2)) + 3]; *d = r; } void helper_punpckhwd_mmx (MMXReg *d, MMXReg *s) { MMXReg r; r._w[0] = d->_w[(1 << (0 + 1)) + 0]; r._w[1] = s->_w[(1 << (0 + 1)) + 0]; r._w[2] = d->_w[(1 << (0 + 1)) + 1]; r._w[3] = s->_w[(1 << (0 + 1)) + 1]; *d = r; } void helper_punpckhdq_mmx (MMXReg *d, MMXReg *s) { MMXReg r; r._l[0] = d->_l[(1 << 0) + 0]; r._l[1] = s->_l[(1 << 0) + 0]; *d = r; } | |
27614 | ||
27615 | ||
27616 | ||
27617 | void helper_pi2fd(MMXReg *d, MMXReg *s) | |
27618 | { | |
27619 | d->_s[0] = int32_to_float32(s->_l[0], &env->mmx_status); | |
27620 | d->_s[1] = int32_to_float32(s->_l[1], &env->mmx_status); | |
27621 | } | |
27622 | ||
27623 | void helper_pi2fw(MMXReg *d, MMXReg *s) | |
27624 | { | |
27625 | d->_s[0] = int32_to_float32((int16_t)s->_w[0], &env->mmx_status); | |
27626 | d->_s[1] = int32_to_float32((int16_t)s->_w[2], &env->mmx_status); | |
27627 | } | |
27628 | ||
27629 | void helper_pf2id(MMXReg *d, MMXReg *s) | |
27630 | { | |
27631 | d->_l[0] = float32_to_int32_round_to_zero(s->_s[0], &env->mmx_status); | |
27632 | d->_l[1] = float32_to_int32_round_to_zero(s->_s[1], &env->mmx_status); | |
27633 | } | |
27634 | ||
27635 | void helper_pf2iw(MMXReg *d, MMXReg *s) | |
27636 | { | |
27637 | d->_l[0] = satsw(float32_to_int32_round_to_zero(s->_s[0], &env->mmx_status)); | |
27638 | d->_l[1] = satsw(float32_to_int32_round_to_zero(s->_s[1], &env->mmx_status)); | |
27639 | } | |
27640 | ||
27641 | void helper_pfacc(MMXReg *d, MMXReg *s) | |
27642 | { | |
27643 | MMXReg r; | |
27644 | r._s[0] = float32_add(d->_s[0], d->_s[1], &env->mmx_status); | |
27645 | r._s[1] = float32_add(s->_s[0], s->_s[1], &env->mmx_status); | |
27646 | *d = r; | |
27647 | } | |
27648 | ||
27649 | void helper_pfadd(MMXReg *d, MMXReg *s) | |
27650 | { | |
27651 | d->_s[0] = float32_add(d->_s[0], s->_s[0], &env->mmx_status); | |
27652 | d->_s[1] = float32_add(d->_s[1], s->_s[1], &env->mmx_status); | |
27653 | } | |
27654 | ||
27655 | void helper_pfcmpeq(MMXReg *d, MMXReg *s) | |
27656 | { | |
27657 | d->_l[0] = float32_eq_quiet(d->_s[0], s->_s[0], &env->mmx_status) ? -1 : 0; | |
27658 | d->_l[1] = float32_eq_quiet(d->_s[1], s->_s[1], &env->mmx_status) ? -1 : 0; | |
27659 | } | |
27660 | ||
27661 | void helper_pfcmpge(MMXReg *d, MMXReg *s) | |
27662 | { | |
27663 | d->_l[0] = float32_le(s->_s[0], d->_s[0], &env->mmx_status) ? -1 : 0; | |
27664 | d->_l[1] = float32_le(s->_s[1], d->_s[1], &env->mmx_status) ? -1 : 0; | |
27665 | } | |
27666 | ||
27667 | void helper_pfcmpgt(MMXReg *d, MMXReg *s) | |
27668 | { | |
27669 | d->_l[0] = float32_lt(s->_s[0], d->_s[0], &env->mmx_status) ? -1 : 0; | |
27670 | d->_l[1] = float32_lt(s->_s[1], d->_s[1], &env->mmx_status) ? -1 : 0; | |
27671 | } | |
27672 | ||
27673 | void helper_pfmax(MMXReg *d, MMXReg *s) | |
27674 | { | |
27675 | if (float32_lt(d->_s[0], s->_s[0], &env->mmx_status)) | |
27676 | d->_s[0] = s->_s[0]; | |
27677 | if (float32_lt(d->_s[1], s->_s[1], &env->mmx_status)) | |
27678 | d->_s[1] = s->_s[1]; | |
27679 | } | |
27680 | ||
27681 | void helper_pfmin(MMXReg *d, MMXReg *s) | |
27682 | { | |
27683 | if (float32_lt(s->_s[0], d->_s[0], &env->mmx_status)) | |
27684 | d->_s[0] = s->_s[0]; | |
27685 | if (float32_lt(s->_s[1], d->_s[1], &env->mmx_status)) | |
27686 | d->_s[1] = s->_s[1]; | |
27687 | } | |
27688 | ||
27689 | void helper_pfmul(MMXReg *d, MMXReg *s) | |
27690 | { | |
27691 | d->_s[0] = float32_mul(d->_s[0], s->_s[0], &env->mmx_status); | |
27692 | d->_s[1] = float32_mul(d->_s[1], s->_s[1], &env->mmx_status); | |
27693 | } | |
27694 | ||
27695 | void helper_pfnacc(MMXReg *d, MMXReg *s) | |
27696 | { | |
27697 | MMXReg r; | |
27698 | r._s[0] = float32_sub(d->_s[0], d->_s[1], &env->mmx_status); | |
27699 | r._s[1] = float32_sub(s->_s[0], s->_s[1], &env->mmx_status); | |
27700 | *d = r; | |
27701 | } | |
27702 | ||
27703 | void helper_pfpnacc(MMXReg *d, MMXReg *s) | |
27704 | { | |
27705 | MMXReg r; | |
27706 | r._s[0] = float32_sub(d->_s[0], d->_s[1], &env->mmx_status); | |
27707 | r._s[1] = float32_add(s->_s[0], s->_s[1], &env->mmx_status); | |
27708 | *d = r; | |
27709 | } | |
27710 | ||
27711 | void helper_pfrcp(MMXReg *d, MMXReg *s) | |
27712 | { | |
27713 | d->_s[0] = float32_div((0x3f800000), s->_s[0], &env->mmx_status); | |
27714 | d->_s[1] = d->_s[0]; | |
27715 | } | |
27716 | ||
27717 | void helper_pfrsqrt(MMXReg *d, MMXReg *s) | |
27718 | { | |
27719 | d->_l[1] = s->_l[0] & 0x7fffffff; | |
27720 | d->_s[1] = float32_div((0x3f800000), | |
27721 | float32_sqrt(d->_s[1], &env->mmx_status), | |
27722 | &env->mmx_status); | |
27723 | d->_l[1] |= s->_l[0] & 0x80000000; | |
27724 | d->_l[0] = d->_l[1]; | |
27725 | } | |
27726 | ||
27727 | void helper_pfsub(MMXReg *d, MMXReg *s) | |
27728 | { | |
27729 | d->_s[0] = float32_sub(d->_s[0], s->_s[0], &env->mmx_status); | |
27730 | d->_s[1] = float32_sub(d->_s[1], s->_s[1], &env->mmx_status); | |
27731 | } | |
27732 | ||
27733 | void helper_pfsubr(MMXReg *d, MMXReg *s) | |
27734 | { | |
27735 | d->_s[0] = float32_sub(s->_s[0], d->_s[0], &env->mmx_status); | |
27736 | d->_s[1] = float32_sub(s->_s[1], d->_s[1], &env->mmx_status); | |
27737 | } | |
27738 | ||
27739 | void helper_pswapd(MMXReg *d, MMXReg *s) | |
27740 | { | |
27741 | MMXReg r; | |
27742 | r._l[0] = s->_l[1]; | |
27743 | r._l[1] = s->_l[0]; | |
27744 | *d = r; | |
27745 | } | |
27746 | ||
27747 | ||
27748 | ||
27749 | void helper_pshufb_mmx (MMXReg *d, MMXReg *s) | |
27750 | { | |
27751 | int i; | |
27752 | MMXReg r; | |
27753 | ||
27754 | for (i = 0; i < (8 << 0); i++) | |
27755 | r._b[i] = (s->_b[i] & 0x80) ? 0 : (d->_b[s->_b[i] & ((8 << 0) - 1)]); | |
27756 | ||
27757 | *d = r; | |
27758 | } | |
27759 | ||
27760 | void helper_phaddw_mmx (MMXReg *d, MMXReg *s) | |
27761 | { | |
27762 | d->_w[0] = (int16_t)d->_w[0] + (int16_t)d->_w[1]; | |
27763 | d->_w[1] = (int16_t)d->_w[2] + (int16_t)d->_w[3]; | |
27764 | ; | |
27765 | ; | |
27766 | d->_w[(2 << 0) + 0] = (int16_t)s->_w[0] + (int16_t)s->_w[1]; | |
27767 | d->_w[(2 << 0) + 1] = (int16_t)s->_w[2] + (int16_t)s->_w[3]; | |
27768 | ; | |
27769 | ; | |
27770 | } | |
27771 | ||
27772 | void helper_phaddd_mmx (MMXReg *d, MMXReg *s) | |
27773 | { | |
27774 | d->_l[0] = (int32_t)d->_l[0] + (int32_t)d->_l[1]; | |
27775 | ; | |
27776 | d->_l[(1 << 0) + 0] = (int32_t)s->_l[0] + (int32_t)s->_l[1]; | |
27777 | ; | |
27778 | } | |
27779 | ||
27780 | void helper_phaddsw_mmx (MMXReg *d, MMXReg *s) | |
27781 | { | |
27782 | d->_w[0] = satsw((int16_t)d->_w[0] + (int16_t)d->_w[1]); | |
27783 | d->_w[1] = satsw((int16_t)d->_w[2] + (int16_t)d->_w[3]); | |
27784 | ; | |
27785 | ; | |
27786 | d->_w[(2 << 0) + 0] = satsw((int16_t)s->_w[0] + (int16_t)s->_w[1]); | |
27787 | d->_w[(2 << 0) + 1] = satsw((int16_t)s->_w[2] + (int16_t)s->_w[3]); | |
27788 | ; | |
27789 | ; | |
27790 | } | |
27791 | ||
27792 | void helper_pmaddubsw_mmx (MMXReg *d, MMXReg *s) | |
27793 | { | |
27794 | d->_w[0] = satsw((int8_t)s->_b[0] * (uint8_t)d->_b[0] + | |
27795 | (int8_t)s->_b[1] * (uint8_t)d->_b[1]); | |
27796 | d->_w[1] = satsw((int8_t)s->_b[2] * (uint8_t)d->_b[2] + | |
27797 | (int8_t)s->_b[3] * (uint8_t)d->_b[3]); | |
27798 | d->_w[2] = satsw((int8_t)s->_b[4] * (uint8_t)d->_b[4] + | |
27799 | (int8_t)s->_b[5] * (uint8_t)d->_b[5]); | |
27800 | d->_w[3] = satsw((int8_t)s->_b[6] * (uint8_t)d->_b[6] + | |
27801 | (int8_t)s->_b[7] * (uint8_t)d->_b[7]); | |
27802 | # 1389 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
27803 | } | |
27804 | ||
27805 | void helper_phsubw_mmx (MMXReg *d, MMXReg *s) | |
27806 | { | |
27807 | d->_w[0] = (int16_t)d->_w[0] - (int16_t)d->_w[1]; | |
27808 | d->_w[1] = (int16_t)d->_w[2] - (int16_t)d->_w[3]; | |
27809 | ; | |
27810 | ; | |
27811 | d->_w[(2 << 0) + 0] = (int16_t)s->_w[0] - (int16_t)s->_w[1]; | |
27812 | d->_w[(2 << 0) + 1] = (int16_t)s->_w[2] - (int16_t)s->_w[3]; | |
27813 | ; | |
27814 | ; | |
27815 | } | |
27816 | ||
27817 | void helper_phsubd_mmx (MMXReg *d, MMXReg *s) | |
27818 | { | |
27819 | d->_l[0] = (int32_t)d->_l[0] - (int32_t)d->_l[1]; | |
27820 | ; | |
27821 | d->_l[(1 << 0) + 0] = (int32_t)s->_l[0] - (int32_t)s->_l[1]; | |
27822 | ; | |
27823 | } | |
27824 | ||
27825 | void helper_phsubsw_mmx (MMXReg *d, MMXReg *s) | |
27826 | { | |
27827 | d->_w[0] = satsw((int16_t)d->_w[0] - (int16_t)d->_w[1]); | |
27828 | d->_w[1] = satsw((int16_t)d->_w[2] - (int16_t)d->_w[3]); | |
27829 | ; | |
27830 | ; | |
27831 | d->_w[(2 << 0) + 0] = satsw((int16_t)s->_w[0] - (int16_t)s->_w[1]); | |
27832 | d->_w[(2 << 0) + 1] = satsw((int16_t)s->_w[2] - (int16_t)s->_w[3]); | |
27833 | ; | |
27834 | ; | |
27835 | } | |
27836 | ||
27837 | ||
27838 | ||
27839 | ||
27840 | void helper_pabsb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = s->_b[0] > (127) ? -(int8_t ) s->_b[0] : s->_b[0]; d->_b[1] = s->_b[1] > (127) ? -(int8_t ) s->_b[1] : s->_b[1]; d->_b[2] = s->_b[2] > (127) ? -(int8_t ) s->_b[2] : s->_b[2]; d->_b[3] = s->_b[3] > (127) ? -(int8_t ) s->_b[3] : s->_b[3]; d->_b[4] = s->_b[4] > (127) ? -(int8_t ) s->_b[4] : s->_b[4]; d->_b[5] = s->_b[5] > (127) ? -(int8_t ) s->_b[5] : s->_b[5]; d->_b[6] = s->_b[6] > (127) ? -(int8_t ) s->_b[6] : s->_b[6]; d->_b[7] = s->_b[7] > (127) ? -(int8_t ) s->_b[7] : s->_b[7]; } | |
27841 | void helper_pabsw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = s->_w[0] > (32767) ? -(int16_t) s->_w[0] : s->_w[0]; d->_w[1] = s->_w[1] > (32767) ? -(int16_t) s->_w[1] : s->_w[1]; d->_w[2] = s->_w[2] > (32767) ? -(int16_t) s->_w[2] : s->_w[2]; d->_w[3] = s->_w[3] > (32767) ? -(int16_t) s->_w[3] : s->_w[3]; } | |
27842 | void helper_pabsd_mmx (MMXReg *d, MMXReg *s){ d->_l[0] = s->_l[0] > (2147483647) ? -(int32_t) s->_l[0] : s->_l[0]; d->_l[1] = s->_l[1] > (2147483647) ? -(int32_t) s->_l[1] : s->_l[1]; } | |
27843 | ||
27844 | ||
27845 | void helper_pmulhrsw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((int16_t) d->_w[0] * (int16_t) s->_w[0] + 0x4000) >> 15; d->_w[1] = ((int16_t) d->_w[1] * (int16_t) s->_w[1] + 0x4000) >> 15; d->_w[2] = ((int16_t) d->_w[2] * (int16_t) s->_w[2] + 0x4000) >> 15; d->_w[3] = ((int16_t) d->_w[3] * (int16_t) s->_w[3] + 0x4000) >> 15; } | |
27846 | ||
27847 | ||
27848 | ||
27849 | ||
27850 | void helper_psignb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = s->_b[0] <= (127) ? s->_b[0] ? d->_b[0] : 0 : -(int8_t ) d->_b[0]; d->_b[1] = s->_b[1] <= (127) ? s->_b[1] ? d->_b[1] : 0 : -(int8_t ) d->_b[1]; d->_b[2] = s->_b[2] <= (127) ? s->_b[2] ? d->_b[2] : 0 : -(int8_t ) d->_b[2]; d->_b[3] = s->_b[3] <= (127) ? s->_b[3] ? d->_b[3] : 0 : -(int8_t ) d->_b[3]; d->_b[4] = s->_b[4] <= (127) ? s->_b[4] ? d->_b[4] : 0 : -(int8_t ) d->_b[4]; d->_b[5] = s->_b[5] <= (127) ? s->_b[5] ? d->_b[5] : 0 : -(int8_t ) d->_b[5]; d->_b[6] = s->_b[6] <= (127) ? s->_b[6] ? d->_b[6] : 0 : -(int8_t ) d->_b[6]; d->_b[7] = s->_b[7] <= (127) ? s->_b[7] ? d->_b[7] : 0 : -(int8_t ) d->_b[7]; } | |
27851 | void helper_psignw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = s->_w[0] <= (32767) ? s->_w[0] ? d->_w[0] : 0 : -(int16_t) d->_w[0]; d->_w[1] = s->_w[1] <= (32767) ? s->_w[1] ? d->_w[1] : 0 : -(int16_t) d->_w[1]; d->_w[2] = s->_w[2] <= (32767) ? s->_w[2] ? d->_w[2] : 0 : -(int16_t) d->_w[2]; d->_w[3] = s->_w[3] <= (32767) ? s->_w[3] ? d->_w[3] : 0 : -(int16_t) d->_w[3]; } | |
27852 | void helper_psignd_mmx (MMXReg *d, MMXReg *s){ d->_l[0] = s->_l[0] <= (2147483647) ? s->_l[0] ? d->_l[0] : 0 : -(int32_t) d->_l[0]; d->_l[1] = s->_l[1] <= (2147483647) ? s->_l[1] ? d->_l[1] : 0 : -(int32_t) d->_l[1]; } | |
27853 | ||
27854 | void helper_palignr_mmx (MMXReg *d, MMXReg *s, int32_t shift) | |
27855 | { | |
27856 | MMXReg r; | |
27857 | ||
27858 | ||
27859 | if (shift >= (16 << 0)) { | |
27860 | r.q = 0; | |
27861 | ; | |
27862 | } else { | |
27863 | shift <<= 3; | |
27864 | ||
27865 | ||
27866 | r.q = (shift - 0 < 64 && shift - 0 > -64 ? shift - 0 > 0 ? s->q >> (shift - 0) : (s->q << -(shift - 0)) : 0) | | |
27867 | (shift - 64 < 64 && shift - 64 > -64 ? shift - 64 > 0 ? d->q >> (shift - 64) : (d->q << -(shift - 64)) : 0); | |
27868 | # 1465 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
27869 | } | |
27870 | ||
27871 | *d = r; | |
27872 | } | |
27873 | # 5695 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
27874 | ||
27875 | ||
27876 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" 1 | |
27877 | # 38 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
27878 | void helper_psrlw_xmm(XMMReg *d, XMMReg *s) | |
27879 | { | |
27880 | int shift; | |
27881 | ||
27882 | if (s->_q[0] > 15) { | |
27883 | d->_q[0] = 0; | |
27884 | ||
27885 | d->_q[1] = 0; | |
27886 | ||
27887 | } else { | |
27888 | shift = s->_b[0]; | |
27889 | d->_w[0] >>= shift; | |
27890 | d->_w[1] >>= shift; | |
27891 | d->_w[2] >>= shift; | |
27892 | d->_w[3] >>= shift; | |
27893 | ||
27894 | d->_w[4] >>= shift; | |
27895 | d->_w[5] >>= shift; | |
27896 | d->_w[6] >>= shift; | |
27897 | d->_w[7] >>= shift; | |
27898 | ||
27899 | } | |
27900 | } | |
27901 | ||
27902 | void helper_psraw_xmm(XMMReg *d, XMMReg *s) | |
27903 | { | |
27904 | int shift; | |
27905 | ||
27906 | if (s->_q[0] > 15) { | |
27907 | shift = 15; | |
27908 | } else { | |
27909 | shift = s->_b[0]; | |
27910 | } | |
27911 | d->_w[0] = (int16_t)d->_w[0] >> shift; | |
27912 | d->_w[1] = (int16_t)d->_w[1] >> shift; | |
27913 | d->_w[2] = (int16_t)d->_w[2] >> shift; | |
27914 | d->_w[3] = (int16_t)d->_w[3] >> shift; | |
27915 | ||
27916 | d->_w[4] = (int16_t)d->_w[4] >> shift; | |
27917 | d->_w[5] = (int16_t)d->_w[5] >> shift; | |
27918 | d->_w[6] = (int16_t)d->_w[6] >> shift; | |
27919 | d->_w[7] = (int16_t)d->_w[7] >> shift; | |
27920 | ||
27921 | } | |
27922 | ||
27923 | void helper_psllw_xmm(XMMReg *d, XMMReg *s) | |
27924 | { | |
27925 | int shift; | |
27926 | ||
27927 | if (s->_q[0] > 15) { | |
27928 | d->_q[0] = 0; | |
27929 | ||
27930 | d->_q[1] = 0; | |
27931 | ||
27932 | } else { | |
27933 | shift = s->_b[0]; | |
27934 | d->_w[0] <<= shift; | |
27935 | d->_w[1] <<= shift; | |
27936 | d->_w[2] <<= shift; | |
27937 | d->_w[3] <<= shift; | |
27938 | ||
27939 | d->_w[4] <<= shift; | |
27940 | d->_w[5] <<= shift; | |
27941 | d->_w[6] <<= shift; | |
27942 | d->_w[7] <<= shift; | |
27943 | ||
27944 | } | |
27945 | } | |
27946 | ||
27947 | void helper_psrld_xmm(XMMReg *d, XMMReg *s) | |
27948 | { | |
27949 | int shift; | |
27950 | ||
27951 | if (s->_q[0] > 31) { | |
27952 | d->_q[0] = 0; | |
27953 | ||
27954 | d->_q[1] = 0; | |
27955 | ||
27956 | } else { | |
27957 | shift = s->_b[0]; | |
27958 | d->_l[0] >>= shift; | |
27959 | d->_l[1] >>= shift; | |
27960 | ||
27961 | d->_l[2] >>= shift; | |
27962 | d->_l[3] >>= shift; | |
27963 | ||
27964 | } | |
27965 | } | |
27966 | ||
27967 | void helper_psrad_xmm(XMMReg *d, XMMReg *s) | |
27968 | { | |
27969 | int shift; | |
27970 | ||
27971 | if (s->_q[0] > 31) { | |
27972 | shift = 31; | |
27973 | } else { | |
27974 | shift = s->_b[0]; | |
27975 | } | |
27976 | d->_l[0] = (int32_t)d->_l[0] >> shift; | |
27977 | d->_l[1] = (int32_t)d->_l[1] >> shift; | |
27978 | ||
27979 | d->_l[2] = (int32_t)d->_l[2] >> shift; | |
27980 | d->_l[3] = (int32_t)d->_l[3] >> shift; | |
27981 | ||
27982 | } | |
27983 | ||
27984 | void helper_pslld_xmm(XMMReg *d, XMMReg *s) | |
27985 | { | |
27986 | int shift; | |
27987 | ||
27988 | if (s->_q[0] > 31) { | |
27989 | d->_q[0] = 0; | |
27990 | ||
27991 | d->_q[1] = 0; | |
27992 | ||
27993 | } else { | |
27994 | shift = s->_b[0]; | |
27995 | d->_l[0] <<= shift; | |
27996 | d->_l[1] <<= shift; | |
27997 | ||
27998 | d->_l[2] <<= shift; | |
27999 | d->_l[3] <<= shift; | |
28000 | ||
28001 | } | |
28002 | } | |
28003 | ||
28004 | void helper_psrlq_xmm(XMMReg *d, XMMReg *s) | |
28005 | { | |
28006 | int shift; | |
28007 | ||
28008 | if (s->_q[0] > 63) { | |
28009 | d->_q[0] = 0; | |
28010 | ||
28011 | d->_q[1] = 0; | |
28012 | ||
28013 | } else { | |
28014 | shift = s->_b[0]; | |
28015 | d->_q[0] >>= shift; | |
28016 | ||
28017 | d->_q[1] >>= shift; | |
28018 | ||
28019 | } | |
28020 | } | |
28021 | ||
28022 | void helper_psllq_xmm(XMMReg *d, XMMReg *s) | |
28023 | { | |
28024 | int shift; | |
28025 | ||
28026 | if (s->_q[0] > 63) { | |
28027 | d->_q[0] = 0; | |
28028 | ||
28029 | d->_q[1] = 0; | |
28030 | ||
28031 | } else { | |
28032 | shift = s->_b[0]; | |
28033 | d->_q[0] <<= shift; | |
28034 | ||
28035 | d->_q[1] <<= shift; | |
28036 | ||
28037 | } | |
28038 | } | |
28039 | ||
28040 | ||
28041 | void helper_psrldq_xmm(XMMReg *d, XMMReg *s) | |
28042 | { | |
28043 | int shift, i; | |
28044 | ||
28045 | shift = s->_l[0]; | |
28046 | if (shift > 16) | |
28047 | shift = 16; | |
28048 | for(i = 0; i < 16 - shift; i++) | |
28049 | d->_b[i] = d->_b[i + shift]; | |
28050 | for(i = 16 - shift; i < 16; i++) | |
28051 | d->_b[i] = 0; | |
28052 | } | |
28053 | ||
28054 | void helper_pslldq_xmm(XMMReg *d, XMMReg *s) | |
28055 | { | |
28056 | int shift, i; | |
28057 | ||
28058 | shift = s->_l[0]; | |
28059 | if (shift > 16) | |
28060 | shift = 16; | |
28061 | for(i = 15; i >= shift; i--) | |
28062 | d->_b[i] = d->_b[i - shift]; | |
28063 | for(i = 0; i < shift; i++) | |
28064 | d->_b[i] = 0; | |
28065 | } | |
28066 | # 361 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28067 | void helper_paddb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((d->_b[0]) + (s->_b[0])); d->_b[1] = ((d->_b[1]) + (s->_b[1])); d->_b[2] = ((d->_b[2]) + (s->_b[2])); d->_b[3] = ((d->_b[3]) + (s->_b[3])); d->_b[4] = ((d->_b[4]) + (s->_b[4])); d->_b[5] = ((d->_b[5]) + (s->_b[5])); d->_b[6] = ((d->_b[6]) + (s->_b[6])); d->_b[7] = ((d->_b[7]) + (s->_b[7])); d->_b[8] = ((d->_b[8]) + (s->_b[8])); d->_b[9] = ((d->_b[9]) + (s->_b[9])); d->_b[10] = ((d->_b[10]) + (s->_b[10])); d->_b[11] = ((d->_b[11]) + (s->_b[11])); d->_b[12] = ((d->_b[12]) + (s->_b[12])); d->_b[13] = ((d->_b[13]) + (s->_b[13])); d->_b[14] = ((d->_b[14]) + (s->_b[14])); d->_b[15] = ((d->_b[15]) + (s->_b[15]));} | |
28068 | void helper_paddw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = ((d->_w[0]) + (s->_w[0])); d->_w[1] = ((d->_w[1]) + (s->_w[1])); d->_w[2] = ((d->_w[2]) + (s->_w[2])); d->_w[3] = ((d->_w[3]) + (s->_w[3])); d->_w[4] = ((d->_w[4]) + (s->_w[4])); d->_w[5] = ((d->_w[5]) + (s->_w[5])); d->_w[6] = ((d->_w[6]) + (s->_w[6])); d->_w[7] = ((d->_w[7]) + (s->_w[7]));} | |
28069 | void helper_paddl_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = ((d->_l[0]) + (s->_l[0])); d->_l[1] = ((d->_l[1]) + (s->_l[1])); d->_l[2] = ((d->_l[2]) + (s->_l[2])); d->_l[3] = ((d->_l[3]) + (s->_l[3]));} | |
28070 | void helper_paddq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = ((d->_q[0]) + (s->_q[0])); d->_q[1] = ((d->_q[1]) + (s->_q[1]));} | |
28071 | ||
28072 | void helper_psubb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((d->_b[0]) - (s->_b[0])); d->_b[1] = ((d->_b[1]) - (s->_b[1])); d->_b[2] = ((d->_b[2]) - (s->_b[2])); d->_b[3] = ((d->_b[3]) - (s->_b[3])); d->_b[4] = ((d->_b[4]) - (s->_b[4])); d->_b[5] = ((d->_b[5]) - (s->_b[5])); d->_b[6] = ((d->_b[6]) - (s->_b[6])); d->_b[7] = ((d->_b[7]) - (s->_b[7])); d->_b[8] = ((d->_b[8]) - (s->_b[8])); d->_b[9] = ((d->_b[9]) - (s->_b[9])); d->_b[10] = ((d->_b[10]) - (s->_b[10])); d->_b[11] = ((d->_b[11]) - (s->_b[11])); d->_b[12] = ((d->_b[12]) - (s->_b[12])); d->_b[13] = ((d->_b[13]) - (s->_b[13])); d->_b[14] = ((d->_b[14]) - (s->_b[14])); d->_b[15] = ((d->_b[15]) - (s->_b[15]));} | |
28073 | void helper_psubw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = ((d->_w[0]) - (s->_w[0])); d->_w[1] = ((d->_w[1]) - (s->_w[1])); d->_w[2] = ((d->_w[2]) - (s->_w[2])); d->_w[3] = ((d->_w[3]) - (s->_w[3])); d->_w[4] = ((d->_w[4]) - (s->_w[4])); d->_w[5] = ((d->_w[5]) - (s->_w[5])); d->_w[6] = ((d->_w[6]) - (s->_w[6])); d->_w[7] = ((d->_w[7]) - (s->_w[7]));} | |
28074 | void helper_psubl_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = ((d->_l[0]) - (s->_l[0])); d->_l[1] = ((d->_l[1]) - (s->_l[1])); d->_l[2] = ((d->_l[2]) - (s->_l[2])); d->_l[3] = ((d->_l[3]) - (s->_l[3]));} | |
28075 | void helper_psubq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = ((d->_q[0]) - (s->_q[0])); d->_q[1] = ((d->_q[1]) - (s->_q[1]));} | |
28076 | ||
28077 | void helper_paddusb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = satub((d->_b[0]) + (s->_b[0])); d->_b[1] = satub((d->_b[1]) + (s->_b[1])); d->_b[2] = satub((d->_b[2]) + (s->_b[2])); d->_b[3] = satub((d->_b[3]) + (s->_b[3])); d->_b[4] = satub((d->_b[4]) + (s->_b[4])); d->_b[5] = satub((d->_b[5]) + (s->_b[5])); d->_b[6] = satub((d->_b[6]) + (s->_b[6])); d->_b[7] = satub((d->_b[7]) + (s->_b[7])); d->_b[8] = satub((d->_b[8]) + (s->_b[8])); d->_b[9] = satub((d->_b[9]) + (s->_b[9])); d->_b[10] = satub((d->_b[10]) + (s->_b[10])); d->_b[11] = satub((d->_b[11]) + (s->_b[11])); d->_b[12] = satub((d->_b[12]) + (s->_b[12])); d->_b[13] = satub((d->_b[13]) + (s->_b[13])); d->_b[14] = satub((d->_b[14]) + (s->_b[14])); d->_b[15] = satub((d->_b[15]) + (s->_b[15]));} | |
28078 | void helper_paddsb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = satsb((int8_t)(d->_b[0]) + (int8_t)(s->_b[0])); d->_b[1] = satsb((int8_t)(d->_b[1]) + (int8_t)(s->_b[1])); d->_b[2] = satsb((int8_t)(d->_b[2]) + (int8_t)(s->_b[2])); d->_b[3] = satsb((int8_t)(d->_b[3]) + (int8_t)(s->_b[3])); d->_b[4] = satsb((int8_t)(d->_b[4]) + (int8_t)(s->_b[4])); d->_b[5] = satsb((int8_t)(d->_b[5]) + (int8_t)(s->_b[5])); d->_b[6] = satsb((int8_t)(d->_b[6]) + (int8_t)(s->_b[6])); d->_b[7] = satsb((int8_t)(d->_b[7]) + (int8_t)(s->_b[7])); d->_b[8] = satsb((int8_t)(d->_b[8]) + (int8_t)(s->_b[8])); d->_b[9] = satsb((int8_t)(d->_b[9]) + (int8_t)(s->_b[9])); d->_b[10] = satsb((int8_t)(d->_b[10]) + (int8_t)(s->_b[10])); d->_b[11] = satsb((int8_t)(d->_b[11]) + (int8_t)(s->_b[11])); d->_b[12] = satsb((int8_t)(d->_b[12]) + (int8_t)(s->_b[12])); d->_b[13] = satsb((int8_t)(d->_b[13]) + (int8_t)(s->_b[13])); d->_b[14] = satsb((int8_t)(d->_b[14]) + (int8_t)(s->_b[14])); d->_b[15] = satsb((int8_t)(d->_b[15]) + (int8_t)(s->_b[15]));} | |
28079 | void helper_psubusb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = satub((d->_b[0]) - (s->_b[0])); d->_b[1] = satub((d->_b[1]) - (s->_b[1])); d->_b[2] = satub((d->_b[2]) - (s->_b[2])); d->_b[3] = satub((d->_b[3]) - (s->_b[3])); d->_b[4] = satub((d->_b[4]) - (s->_b[4])); d->_b[5] = satub((d->_b[5]) - (s->_b[5])); d->_b[6] = satub((d->_b[6]) - (s->_b[6])); d->_b[7] = satub((d->_b[7]) - (s->_b[7])); d->_b[8] = satub((d->_b[8]) - (s->_b[8])); d->_b[9] = satub((d->_b[9]) - (s->_b[9])); d->_b[10] = satub((d->_b[10]) - (s->_b[10])); d->_b[11] = satub((d->_b[11]) - (s->_b[11])); d->_b[12] = satub((d->_b[12]) - (s->_b[12])); d->_b[13] = satub((d->_b[13]) - (s->_b[13])); d->_b[14] = satub((d->_b[14]) - (s->_b[14])); d->_b[15] = satub((d->_b[15]) - (s->_b[15]));} | |
28080 | void helper_psubsb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = satsb((int8_t)(d->_b[0]) - (int8_t)(s->_b[0])); d->_b[1] = satsb((int8_t)(d->_b[1]) - (int8_t)(s->_b[1])); d->_b[2] = satsb((int8_t)(d->_b[2]) - (int8_t)(s->_b[2])); d->_b[3] = satsb((int8_t)(d->_b[3]) - (int8_t)(s->_b[3])); d->_b[4] = satsb((int8_t)(d->_b[4]) - (int8_t)(s->_b[4])); d->_b[5] = satsb((int8_t)(d->_b[5]) - (int8_t)(s->_b[5])); d->_b[6] = satsb((int8_t)(d->_b[6]) - (int8_t)(s->_b[6])); d->_b[7] = satsb((int8_t)(d->_b[7]) - (int8_t)(s->_b[7])); d->_b[8] = satsb((int8_t)(d->_b[8]) - (int8_t)(s->_b[8])); d->_b[9] = satsb((int8_t)(d->_b[9]) - (int8_t)(s->_b[9])); d->_b[10] = satsb((int8_t)(d->_b[10]) - (int8_t)(s->_b[10])); d->_b[11] = satsb((int8_t)(d->_b[11]) - (int8_t)(s->_b[11])); d->_b[12] = satsb((int8_t)(d->_b[12]) - (int8_t)(s->_b[12])); d->_b[13] = satsb((int8_t)(d->_b[13]) - (int8_t)(s->_b[13])); d->_b[14] = satsb((int8_t)(d->_b[14]) - (int8_t)(s->_b[14])); d->_b[15] = satsb((int8_t)(d->_b[15]) - (int8_t)(s->_b[15]));} | |
28081 | ||
28082 | void helper_paddusw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = satuw((d->_w[0]) + (s->_w[0])); d->_w[1] = satuw((d->_w[1]) + (s->_w[1])); d->_w[2] = satuw((d->_w[2]) + (s->_w[2])); d->_w[3] = satuw((d->_w[3]) + (s->_w[3])); d->_w[4] = satuw((d->_w[4]) + (s->_w[4])); d->_w[5] = satuw((d->_w[5]) + (s->_w[5])); d->_w[6] = satuw((d->_w[6]) + (s->_w[6])); d->_w[7] = satuw((d->_w[7]) + (s->_w[7]));} | |
28083 | void helper_paddsw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = satsw((int16_t)(d->_w[0]) + (int16_t)(s->_w[0])); d->_w[1] = satsw((int16_t)(d->_w[1]) + (int16_t)(s->_w[1])); d->_w[2] = satsw((int16_t)(d->_w[2]) + (int16_t)(s->_w[2])); d->_w[3] = satsw((int16_t)(d->_w[3]) + (int16_t)(s->_w[3])); d->_w[4] = satsw((int16_t)(d->_w[4]) + (int16_t)(s->_w[4])); d->_w[5] = satsw((int16_t)(d->_w[5]) + (int16_t)(s->_w[5])); d->_w[6] = satsw((int16_t)(d->_w[6]) + (int16_t)(s->_w[6])); d->_w[7] = satsw((int16_t)(d->_w[7]) + (int16_t)(s->_w[7]));} | |
28084 | void helper_psubusw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = satuw((d->_w[0]) - (s->_w[0])); d->_w[1] = satuw((d->_w[1]) - (s->_w[1])); d->_w[2] = satuw((d->_w[2]) - (s->_w[2])); d->_w[3] = satuw((d->_w[3]) - (s->_w[3])); d->_w[4] = satuw((d->_w[4]) - (s->_w[4])); d->_w[5] = satuw((d->_w[5]) - (s->_w[5])); d->_w[6] = satuw((d->_w[6]) - (s->_w[6])); d->_w[7] = satuw((d->_w[7]) - (s->_w[7]));} | |
28085 | void helper_psubsw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = satsw((int16_t)(d->_w[0]) - (int16_t)(s->_w[0])); d->_w[1] = satsw((int16_t)(d->_w[1]) - (int16_t)(s->_w[1])); d->_w[2] = satsw((int16_t)(d->_w[2]) - (int16_t)(s->_w[2])); d->_w[3] = satsw((int16_t)(d->_w[3]) - (int16_t)(s->_w[3])); d->_w[4] = satsw((int16_t)(d->_w[4]) - (int16_t)(s->_w[4])); d->_w[5] = satsw((int16_t)(d->_w[5]) - (int16_t)(s->_w[5])); d->_w[6] = satsw((int16_t)(d->_w[6]) - (int16_t)(s->_w[6])); d->_w[7] = satsw((int16_t)(d->_w[7]) - (int16_t)(s->_w[7]));} | |
28086 | ||
28087 | void helper_pminub_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((d->_b[0]) < (s->_b[0])) ? (d->_b[0]) : (s->_b[0]); d->_b[1] = ((d->_b[1]) < (s->_b[1])) ? (d->_b[1]) : (s->_b[1]); d->_b[2] = ((d->_b[2]) < (s->_b[2])) ? (d->_b[2]) : (s->_b[2]); d->_b[3] = ((d->_b[3]) < (s->_b[3])) ? (d->_b[3]) : (s->_b[3]); d->_b[4] = ((d->_b[4]) < (s->_b[4])) ? (d->_b[4]) : (s->_b[4]); d->_b[5] = ((d->_b[5]) < (s->_b[5])) ? (d->_b[5]) : (s->_b[5]); d->_b[6] = ((d->_b[6]) < (s->_b[6])) ? (d->_b[6]) : (s->_b[6]); d->_b[7] = ((d->_b[7]) < (s->_b[7])) ? (d->_b[7]) : (s->_b[7]); d->_b[8] = ((d->_b[8]) < (s->_b[8])) ? (d->_b[8]) : (s->_b[8]); d->_b[9] = ((d->_b[9]) < (s->_b[9])) ? (d->_b[9]) : (s->_b[9]); d->_b[10] = ((d->_b[10]) < (s->_b[10])) ? (d->_b[10]) : (s->_b[10]); d->_b[11] = ((d->_b[11]) < (s->_b[11])) ? (d->_b[11]) : (s->_b[11]); d->_b[12] = ((d->_b[12]) < (s->_b[12])) ? (d->_b[12]) : (s->_b[12]); d->_b[13] = ((d->_b[13]) < (s->_b[13])) ? (d->_b[13]) : (s->_b[13]); d->_b[14] = ((d->_b[14]) < (s->_b[14])) ? (d->_b[14]) : (s->_b[14]); d->_b[15] = ((d->_b[15]) < (s->_b[15])) ? (d->_b[15]) : (s->_b[15]);} | |
28088 | void helper_pmaxub_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((d->_b[0]) > (s->_b[0])) ? (d->_b[0]) : (s->_b[0]); d->_b[1] = ((d->_b[1]) > (s->_b[1])) ? (d->_b[1]) : (s->_b[1]); d->_b[2] = ((d->_b[2]) > (s->_b[2])) ? (d->_b[2]) : (s->_b[2]); d->_b[3] = ((d->_b[3]) > (s->_b[3])) ? (d->_b[3]) : (s->_b[3]); d->_b[4] = ((d->_b[4]) > (s->_b[4])) ? (d->_b[4]) : (s->_b[4]); d->_b[5] = ((d->_b[5]) > (s->_b[5])) ? (d->_b[5]) : (s->_b[5]); d->_b[6] = ((d->_b[6]) > (s->_b[6])) ? (d->_b[6]) : (s->_b[6]); d->_b[7] = ((d->_b[7]) > (s->_b[7])) ? (d->_b[7]) : (s->_b[7]); d->_b[8] = ((d->_b[8]) > (s->_b[8])) ? (d->_b[8]) : (s->_b[8]); d->_b[9] = ((d->_b[9]) > (s->_b[9])) ? (d->_b[9]) : (s->_b[9]); d->_b[10] = ((d->_b[10]) > (s->_b[10])) ? (d->_b[10]) : (s->_b[10]); d->_b[11] = ((d->_b[11]) > (s->_b[11])) ? (d->_b[11]) : (s->_b[11]); d->_b[12] = ((d->_b[12]) > (s->_b[12])) ? (d->_b[12]) : (s->_b[12]); d->_b[13] = ((d->_b[13]) > (s->_b[13])) ? (d->_b[13]) : (s->_b[13]); d->_b[14] = ((d->_b[14]) > (s->_b[14])) ? (d->_b[14]) : (s->_b[14]); d->_b[15] = ((d->_b[15]) > (s->_b[15])) ? (d->_b[15]) : (s->_b[15]);} | |
28089 | ||
28090 | void helper_pminsw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = ((int16_t)(d->_w[0]) < (int16_t)(s->_w[0])) ? (d->_w[0]) : (s->_w[0]); d->_w[1] = ((int16_t)(d->_w[1]) < (int16_t)(s->_w[1])) ? (d->_w[1]) : (s->_w[1]); d->_w[2] = ((int16_t)(d->_w[2]) < (int16_t)(s->_w[2])) ? (d->_w[2]) : (s->_w[2]); d->_w[3] = ((int16_t)(d->_w[3]) < (int16_t)(s->_w[3])) ? (d->_w[3]) : (s->_w[3]); d->_w[4] = ((int16_t)(d->_w[4]) < (int16_t)(s->_w[4])) ? (d->_w[4]) : (s->_w[4]); d->_w[5] = ((int16_t)(d->_w[5]) < (int16_t)(s->_w[5])) ? (d->_w[5]) : (s->_w[5]); d->_w[6] = ((int16_t)(d->_w[6]) < (int16_t)(s->_w[6])) ? (d->_w[6]) : (s->_w[6]); d->_w[7] = ((int16_t)(d->_w[7]) < (int16_t)(s->_w[7])) ? (d->_w[7]) : (s->_w[7]);} | |
28091 | void helper_pmaxsw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = ((int16_t)(d->_w[0]) > (int16_t)(s->_w[0])) ? (d->_w[0]) : (s->_w[0]); d->_w[1] = ((int16_t)(d->_w[1]) > (int16_t)(s->_w[1])) ? (d->_w[1]) : (s->_w[1]); d->_w[2] = ((int16_t)(d->_w[2]) > (int16_t)(s->_w[2])) ? (d->_w[2]) : (s->_w[2]); d->_w[3] = ((int16_t)(d->_w[3]) > (int16_t)(s->_w[3])) ? (d->_w[3]) : (s->_w[3]); d->_w[4] = ((int16_t)(d->_w[4]) > (int16_t)(s->_w[4])) ? (d->_w[4]) : (s->_w[4]); d->_w[5] = ((int16_t)(d->_w[5]) > (int16_t)(s->_w[5])) ? (d->_w[5]) : (s->_w[5]); d->_w[6] = ((int16_t)(d->_w[6]) > (int16_t)(s->_w[6])) ? (d->_w[6]) : (s->_w[6]); d->_w[7] = ((int16_t)(d->_w[7]) > (int16_t)(s->_w[7])) ? (d->_w[7]) : (s->_w[7]);} | |
28092 | ||
28093 | void helper_pand_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (d->_q[0]) & (s->_q[0]); d->_q[1] = (d->_q[1]) & (s->_q[1]);} | |
28094 | void helper_pandn_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = ((~(d->_q[0])) & (s->_q[0])); d->_q[1] = ((~(d->_q[1])) & (s->_q[1]));} | |
28095 | void helper_por_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (d->_q[0]) | (s->_q[0]); d->_q[1] = (d->_q[1]) | (s->_q[1]);} | |
28096 | void helper_pxor_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (d->_q[0]) ^ (s->_q[0]); d->_q[1] = (d->_q[1]) ^ (s->_q[1]);} | |
28097 | ||
28098 | void helper_pcmpgtb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = (int8_t)(d->_b[0]) > (int8_t)(s->_b[0]) ? -1 : 0; d->_b[1] = (int8_t)(d->_b[1]) > (int8_t)(s->_b[1]) ? -1 : 0; d->_b[2] = (int8_t)(d->_b[2]) > (int8_t)(s->_b[2]) ? -1 : 0; d->_b[3] = (int8_t)(d->_b[3]) > (int8_t)(s->_b[3]) ? -1 : 0; d->_b[4] = (int8_t)(d->_b[4]) > (int8_t)(s->_b[4]) ? -1 : 0; d->_b[5] = (int8_t)(d->_b[5]) > (int8_t)(s->_b[5]) ? -1 : 0; d->_b[6] = (int8_t)(d->_b[6]) > (int8_t)(s->_b[6]) ? -1 : 0; d->_b[7] = (int8_t)(d->_b[7]) > (int8_t)(s->_b[7]) ? -1 : 0; d->_b[8] = (int8_t)(d->_b[8]) > (int8_t)(s->_b[8]) ? -1 : 0; d->_b[9] = (int8_t)(d->_b[9]) > (int8_t)(s->_b[9]) ? -1 : 0; d->_b[10] = (int8_t)(d->_b[10]) > (int8_t)(s->_b[10]) ? -1 : 0; d->_b[11] = (int8_t)(d->_b[11]) > (int8_t)(s->_b[11]) ? -1 : 0; d->_b[12] = (int8_t)(d->_b[12]) > (int8_t)(s->_b[12]) ? -1 : 0; d->_b[13] = (int8_t)(d->_b[13]) > (int8_t)(s->_b[13]) ? -1 : 0; d->_b[14] = (int8_t)(d->_b[14]) > (int8_t)(s->_b[14]) ? -1 : 0; d->_b[15] = (int8_t)(d->_b[15]) > (int8_t)(s->_b[15]) ? -1 : 0;} | |
28099 | void helper_pcmpgtw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (int16_t)(d->_w[0]) > (int16_t)(s->_w[0]) ? -1 : 0; d->_w[1] = (int16_t)(d->_w[1]) > (int16_t)(s->_w[1]) ? -1 : 0; d->_w[2] = (int16_t)(d->_w[2]) > (int16_t)(s->_w[2]) ? -1 : 0; d->_w[3] = (int16_t)(d->_w[3]) > (int16_t)(s->_w[3]) ? -1 : 0; d->_w[4] = (int16_t)(d->_w[4]) > (int16_t)(s->_w[4]) ? -1 : 0; d->_w[5] = (int16_t)(d->_w[5]) > (int16_t)(s->_w[5]) ? -1 : 0; d->_w[6] = (int16_t)(d->_w[6]) > (int16_t)(s->_w[6]) ? -1 : 0; d->_w[7] = (int16_t)(d->_w[7]) > (int16_t)(s->_w[7]) ? -1 : 0;} | |
28100 | void helper_pcmpgtl_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (int32_t)(d->_l[0]) > (int32_t)(s->_l[0]) ? -1 : 0; d->_l[1] = (int32_t)(d->_l[1]) > (int32_t)(s->_l[1]) ? -1 : 0; d->_l[2] = (int32_t)(d->_l[2]) > (int32_t)(s->_l[2]) ? -1 : 0; d->_l[3] = (int32_t)(d->_l[3]) > (int32_t)(s->_l[3]) ? -1 : 0;} | |
28101 | ||
28102 | void helper_pcmpeqb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = (d->_b[0]) == (s->_b[0]) ? -1 : 0; d->_b[1] = (d->_b[1]) == (s->_b[1]) ? -1 : 0; d->_b[2] = (d->_b[2]) == (s->_b[2]) ? -1 : 0; d->_b[3] = (d->_b[3]) == (s->_b[3]) ? -1 : 0; d->_b[4] = (d->_b[4]) == (s->_b[4]) ? -1 : 0; d->_b[5] = (d->_b[5]) == (s->_b[5]) ? -1 : 0; d->_b[6] = (d->_b[6]) == (s->_b[6]) ? -1 : 0; d->_b[7] = (d->_b[7]) == (s->_b[7]) ? -1 : 0; d->_b[8] = (d->_b[8]) == (s->_b[8]) ? -1 : 0; d->_b[9] = (d->_b[9]) == (s->_b[9]) ? -1 : 0; d->_b[10] = (d->_b[10]) == (s->_b[10]) ? -1 : 0; d->_b[11] = (d->_b[11]) == (s->_b[11]) ? -1 : 0; d->_b[12] = (d->_b[12]) == (s->_b[12]) ? -1 : 0; d->_b[13] = (d->_b[13]) == (s->_b[13]) ? -1 : 0; d->_b[14] = (d->_b[14]) == (s->_b[14]) ? -1 : 0; d->_b[15] = (d->_b[15]) == (s->_b[15]) ? -1 : 0;} | |
28103 | void helper_pcmpeqw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (d->_w[0]) == (s->_w[0]) ? -1 : 0; d->_w[1] = (d->_w[1]) == (s->_w[1]) ? -1 : 0; d->_w[2] = (d->_w[2]) == (s->_w[2]) ? -1 : 0; d->_w[3] = (d->_w[3]) == (s->_w[3]) ? -1 : 0; d->_w[4] = (d->_w[4]) == (s->_w[4]) ? -1 : 0; d->_w[5] = (d->_w[5]) == (s->_w[5]) ? -1 : 0; d->_w[6] = (d->_w[6]) == (s->_w[6]) ? -1 : 0; d->_w[7] = (d->_w[7]) == (s->_w[7]) ? -1 : 0;} | |
28104 | void helper_pcmpeql_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (d->_l[0]) == (s->_l[0]) ? -1 : 0; d->_l[1] = (d->_l[1]) == (s->_l[1]) ? -1 : 0; d->_l[2] = (d->_l[2]) == (s->_l[2]) ? -1 : 0; d->_l[3] = (d->_l[3]) == (s->_l[3]) ? -1 : 0;} | |
28105 | ||
28106 | void helper_pmullw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (d->_w[0]) * (s->_w[0]); d->_w[1] = (d->_w[1]) * (s->_w[1]); d->_w[2] = (d->_w[2]) * (s->_w[2]); d->_w[3] = (d->_w[3]) * (s->_w[3]); d->_w[4] = (d->_w[4]) * (s->_w[4]); d->_w[5] = (d->_w[5]) * (s->_w[5]); d->_w[6] = (d->_w[6]) * (s->_w[6]); d->_w[7] = (d->_w[7]) * (s->_w[7]);} | |
28107 | ||
28108 | ||
28109 | ||
28110 | void helper_pmulhuw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (d->_w[0]) * (s->_w[0]) >> 16; d->_w[1] = (d->_w[1]) * (s->_w[1]) >> 16; d->_w[2] = (d->_w[2]) * (s->_w[2]) >> 16; d->_w[3] = (d->_w[3]) * (s->_w[3]) >> 16; d->_w[4] = (d->_w[4]) * (s->_w[4]) >> 16; d->_w[5] = (d->_w[5]) * (s->_w[5]) >> 16; d->_w[6] = (d->_w[6]) * (s->_w[6]) >> 16; d->_w[7] = (d->_w[7]) * (s->_w[7]) >> 16;} | |
28111 | void helper_pmulhw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (int16_t)(d->_w[0]) * (int16_t)(s->_w[0]) >> 16; d->_w[1] = (int16_t)(d->_w[1]) * (int16_t)(s->_w[1]) >> 16; d->_w[2] = (int16_t)(d->_w[2]) * (int16_t)(s->_w[2]) >> 16; d->_w[3] = (int16_t)(d->_w[3]) * (int16_t)(s->_w[3]) >> 16; d->_w[4] = (int16_t)(d->_w[4]) * (int16_t)(s->_w[4]) >> 16; d->_w[5] = (int16_t)(d->_w[5]) * (int16_t)(s->_w[5]) >> 16; d->_w[6] = (int16_t)(d->_w[6]) * (int16_t)(s->_w[6]) >> 16; d->_w[7] = (int16_t)(d->_w[7]) * (int16_t)(s->_w[7]) >> 16;} | |
28112 | ||
28113 | void helper_pavgb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((d->_b[0]) + (s->_b[0]) + 1) >> 1; d->_b[1] = ((d->_b[1]) + (s->_b[1]) + 1) >> 1; d->_b[2] = ((d->_b[2]) + (s->_b[2]) + 1) >> 1; d->_b[3] = ((d->_b[3]) + (s->_b[3]) + 1) >> 1; d->_b[4] = ((d->_b[4]) + (s->_b[4]) + 1) >> 1; d->_b[5] = ((d->_b[5]) + (s->_b[5]) + 1) >> 1; d->_b[6] = ((d->_b[6]) + (s->_b[6]) + 1) >> 1; d->_b[7] = ((d->_b[7]) + (s->_b[7]) + 1) >> 1; d->_b[8] = ((d->_b[8]) + (s->_b[8]) + 1) >> 1; d->_b[9] = ((d->_b[9]) + (s->_b[9]) + 1) >> 1; d->_b[10] = ((d->_b[10]) + (s->_b[10]) + 1) >> 1; d->_b[11] = ((d->_b[11]) + (s->_b[11]) + 1) >> 1; d->_b[12] = ((d->_b[12]) + (s->_b[12]) + 1) >> 1; d->_b[13] = ((d->_b[13]) + (s->_b[13]) + 1) >> 1; d->_b[14] = ((d->_b[14]) + (s->_b[14]) + 1) >> 1; d->_b[15] = ((d->_b[15]) + (s->_b[15]) + 1) >> 1;} | |
28114 | void helper_pavgw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = ((d->_w[0]) + (s->_w[0]) + 1) >> 1; d->_w[1] = ((d->_w[1]) + (s->_w[1]) + 1) >> 1; d->_w[2] = ((d->_w[2]) + (s->_w[2]) + 1) >> 1; d->_w[3] = ((d->_w[3]) + (s->_w[3]) + 1) >> 1; d->_w[4] = ((d->_w[4]) + (s->_w[4]) + 1) >> 1; d->_w[5] = ((d->_w[5]) + (s->_w[5]) + 1) >> 1; d->_w[6] = ((d->_w[6]) + (s->_w[6]) + 1) >> 1; d->_w[7] = ((d->_w[7]) + (s->_w[7]) + 1) >> 1;} | |
28115 | ||
28116 | void helper_pmuludq_xmm (XMMReg *d, XMMReg *s) | |
28117 | { | |
28118 | d->_q[0] = (uint64_t)s->_l[0] * (uint64_t)d->_l[0]; | |
28119 | ||
28120 | d->_q[1] = (uint64_t)s->_l[2] * (uint64_t)d->_l[2]; | |
28121 | ||
28122 | } | |
28123 | ||
28124 | void helper_pmaddwd_xmm (XMMReg *d, XMMReg *s) | |
28125 | { | |
28126 | int i; | |
28127 | ||
28128 | for(i = 0; i < (2 << 1); i++) { | |
28129 | d->_l[i] = (int16_t)s->_w[2*i] * (int16_t)d->_w[2*i] + | |
28130 | (int16_t)s->_w[2*i+1] * (int16_t)d->_w[2*i+1]; | |
28131 | } | |
28132 | } | |
28133 | # 437 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28134 | void helper_psadbw_xmm (XMMReg *d, XMMReg *s) | |
28135 | { | |
28136 | unsigned int val; | |
28137 | ||
28138 | val = 0; | |
28139 | val += abs1(d->_b[0] - s->_b[0]); | |
28140 | val += abs1(d->_b[1] - s->_b[1]); | |
28141 | val += abs1(d->_b[2] - s->_b[2]); | |
28142 | val += abs1(d->_b[3] - s->_b[3]); | |
28143 | val += abs1(d->_b[4] - s->_b[4]); | |
28144 | val += abs1(d->_b[5] - s->_b[5]); | |
28145 | val += abs1(d->_b[6] - s->_b[6]); | |
28146 | val += abs1(d->_b[7] - s->_b[7]); | |
28147 | d->_q[0] = val; | |
28148 | ||
28149 | val = 0; | |
28150 | val += abs1(d->_b[8] - s->_b[8]); | |
28151 | val += abs1(d->_b[9] - s->_b[9]); | |
28152 | val += abs1(d->_b[10] - s->_b[10]); | |
28153 | val += abs1(d->_b[11] - s->_b[11]); | |
28154 | val += abs1(d->_b[12] - s->_b[12]); | |
28155 | val += abs1(d->_b[13] - s->_b[13]); | |
28156 | val += abs1(d->_b[14] - s->_b[14]); | |
28157 | val += abs1(d->_b[15] - s->_b[15]); | |
28158 | d->_q[1] = val; | |
28159 | ||
28160 | } | |
28161 | ||
28162 | void helper_maskmov_xmm (XMMReg *d, XMMReg *s, target_ulong a0) | |
28163 | { | |
28164 | int i; | |
28165 | for(i = 0; i < (8 << 1); i++) { | |
28166 | if (s->_b[i] & 0x80) | |
28167 | stb_data(a0 + i, d->_b[i]); | |
28168 | } | |
28169 | } | |
28170 | ||
28171 | void helper_movl_mm_T0_xmm (XMMReg *d, uint32_t val) | |
28172 | { | |
28173 | d->_l[0] = val; | |
28174 | d->_l[1] = 0; | |
28175 | ||
28176 | d->_q[1] = 0; | |
28177 | ||
28178 | } | |
28179 | # 504 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28180 | void helper_shufps(XMMReg *d, XMMReg *s, int order) | |
28181 | { | |
28182 | XMMReg r; | |
28183 | r._l[0] = d->_l[order & 3]; | |
28184 | r._l[1] = d->_l[(order >> 2) & 3]; | |
28185 | r._l[2] = s->_l[(order >> 4) & 3]; | |
28186 | r._l[3] = s->_l[(order >> 6) & 3]; | |
28187 | *d = r; | |
28188 | } | |
28189 | ||
28190 | void helper_shufpd(XMMReg *d, XMMReg *s, int order) | |
28191 | { | |
28192 | XMMReg r; | |
28193 | r._q[0] = d->_q[order & 1]; | |
28194 | r._q[1] = s->_q[(order >> 1) & 1]; | |
28195 | *d = r; | |
28196 | } | |
28197 | ||
28198 | void helper_pshufd_xmm (XMMReg *d, XMMReg *s, int order) | |
28199 | { | |
28200 | XMMReg r; | |
28201 | r._l[0] = s->_l[order & 3]; | |
28202 | r._l[1] = s->_l[(order >> 2) & 3]; | |
28203 | r._l[2] = s->_l[(order >> 4) & 3]; | |
28204 | r._l[3] = s->_l[(order >> 6) & 3]; | |
28205 | *d = r; | |
28206 | } | |
28207 | ||
28208 | void helper_pshuflw_xmm (XMMReg *d, XMMReg *s, int order) | |
28209 | { | |
28210 | XMMReg r; | |
28211 | r._w[0] = s->_w[order & 3]; | |
28212 | r._w[1] = s->_w[(order >> 2) & 3]; | |
28213 | r._w[2] = s->_w[(order >> 4) & 3]; | |
28214 | r._w[3] = s->_w[(order >> 6) & 3]; | |
28215 | r._q[1] = s->_q[1]; | |
28216 | *d = r; | |
28217 | } | |
28218 | ||
28219 | void helper_pshufhw_xmm (XMMReg *d, XMMReg *s, int order) | |
28220 | { | |
28221 | XMMReg r; | |
28222 | r._q[0] = s->_q[0]; | |
28223 | r._w[4] = s->_w[4 + (order & 3)]; | |
28224 | r._w[5] = s->_w[4 + ((order >> 2) & 3)]; | |
28225 | r._w[6] = s->_w[4 + ((order >> 4) & 3)]; | |
28226 | r._w[7] = s->_w[4 + ((order >> 6) & 3)]; | |
28227 | *d = r; | |
28228 | } | |
28229 | # 596 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28230 | void helper_addps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_add(d->_s[0], s->_s[0], &env->sse_status); d->_s[1] = float32_add(d->_s[1], s->_s[1], &env->sse_status); d->_s[2] = float32_add(d->_s[2], s->_s[2], &env->sse_status); d->_s[3] = float32_add(d->_s[3], s->_s[3], &env->sse_status);}void helper_addss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_add(d->_s[0], s->_s[0], &env->sse_status);}void helper_addpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_add(d->_d[0], s->_d[0], &env->sse_status); d->_d[1] = float64_add(d->_d[1], s->_d[1], &env->sse_status);}void helper_addsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_add(d->_d[0], s->_d[0], &env->sse_status);} | |
28231 | void helper_subps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_sub(d->_s[0], s->_s[0], &env->sse_status); d->_s[1] = float32_sub(d->_s[1], s->_s[1], &env->sse_status); d->_s[2] = float32_sub(d->_s[2], s->_s[2], &env->sse_status); d->_s[3] = float32_sub(d->_s[3], s->_s[3], &env->sse_status);}void helper_subss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_sub(d->_s[0], s->_s[0], &env->sse_status);}void helper_subpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_sub(d->_d[0], s->_d[0], &env->sse_status); d->_d[1] = float64_sub(d->_d[1], s->_d[1], &env->sse_status);}void helper_subsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_sub(d->_d[0], s->_d[0], &env->sse_status);} | |
28232 | void helper_mulps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_mul(d->_s[0], s->_s[0], &env->sse_status); d->_s[1] = float32_mul(d->_s[1], s->_s[1], &env->sse_status); d->_s[2] = float32_mul(d->_s[2], s->_s[2], &env->sse_status); d->_s[3] = float32_mul(d->_s[3], s->_s[3], &env->sse_status);}void helper_mulss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_mul(d->_s[0], s->_s[0], &env->sse_status);}void helper_mulpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_mul(d->_d[0], s->_d[0], &env->sse_status); d->_d[1] = float64_mul(d->_d[1], s->_d[1], &env->sse_status);}void helper_mulsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_mul(d->_d[0], s->_d[0], &env->sse_status);} | |
28233 | void helper_divps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_div(d->_s[0], s->_s[0], &env->sse_status); d->_s[1] = float32_div(d->_s[1], s->_s[1], &env->sse_status); d->_s[2] = float32_div(d->_s[2], s->_s[2], &env->sse_status); d->_s[3] = float32_div(d->_s[3], s->_s[3], &env->sse_status);}void helper_divss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_div(d->_s[0], s->_s[0], &env->sse_status);}void helper_divpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_div(d->_d[0], s->_d[0], &env->sse_status); d->_d[1] = float64_div(d->_d[1], s->_d[1], &env->sse_status);}void helper_divsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_div(d->_d[0], s->_d[0], &env->sse_status);} | |
28234 | void helper_minps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_lt(d->_s[0], s->_s[0], &env->sse_status) ? (d->_s[0]) : (s->_s[0]); d->_s[1] = float32_lt(d->_s[1], s->_s[1], &env->sse_status) ? (d->_s[1]) : (s->_s[1]); d->_s[2] = float32_lt(d->_s[2], s->_s[2], &env->sse_status) ? (d->_s[2]) : (s->_s[2]); d->_s[3] = float32_lt(d->_s[3], s->_s[3], &env->sse_status) ? (d->_s[3]) : (s->_s[3]);}void helper_minss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_lt(d->_s[0], s->_s[0], &env->sse_status) ? (d->_s[0]) : (s->_s[0]);}void helper_minpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_lt(d->_d[0], s->_d[0], &env->sse_status) ? (d->_d[0]) : (s->_d[0]); d->_d[1] = float64_lt(d->_d[1], s->_d[1], &env->sse_status) ? (d->_d[1]) : (s->_d[1]);}void helper_minsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_lt(d->_d[0], s->_d[0], &env->sse_status) ? (d->_d[0]) : (s->_d[0]);} | |
28235 | void helper_maxps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_lt(s->_s[0], d->_s[0], &env->sse_status) ? (d->_s[0]) : (s->_s[0]); d->_s[1] = float32_lt(s->_s[1], d->_s[1], &env->sse_status) ? (d->_s[1]) : (s->_s[1]); d->_s[2] = float32_lt(s->_s[2], d->_s[2], &env->sse_status) ? (d->_s[2]) : (s->_s[2]); d->_s[3] = float32_lt(s->_s[3], d->_s[3], &env->sse_status) ? (d->_s[3]) : (s->_s[3]);}void helper_maxss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_lt(s->_s[0], d->_s[0], &env->sse_status) ? (d->_s[0]) : (s->_s[0]);}void helper_maxpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_lt(s->_d[0], d->_d[0], &env->sse_status) ? (d->_d[0]) : (s->_d[0]); d->_d[1] = float64_lt(s->_d[1], d->_d[1], &env->sse_status) ? (d->_d[1]) : (s->_d[1]);}void helper_maxsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_lt(s->_d[0], d->_d[0], &env->sse_status) ? (d->_d[0]) : (s->_d[0]);} | |
28236 | void helper_sqrtps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_sqrt(s->_s[0], &env->sse_status); d->_s[1] = float32_sqrt(s->_s[1], &env->sse_status); d->_s[2] = float32_sqrt(s->_s[2], &env->sse_status); d->_s[3] = float32_sqrt(s->_s[3], &env->sse_status);}void helper_sqrtss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_sqrt(s->_s[0], &env->sse_status);}void helper_sqrtpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_sqrt(s->_d[0], &env->sse_status); d->_d[1] = float64_sqrt(s->_d[1], &env->sse_status);}void helper_sqrtsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_sqrt(s->_d[0], &env->sse_status);} | |
28237 | ||
28238 | ||
28239 | ||
28240 | void helper_cvtps2pd(XMMReg *d, XMMReg *s) | |
28241 | { | |
28242 | float32 s0, s1; | |
28243 | s0 = s->_s[0]; | |
28244 | s1 = s->_s[1]; | |
28245 | d->_d[0] = float32_to_float64(s0, &env->sse_status); | |
28246 | d->_d[1] = float32_to_float64(s1, &env->sse_status); | |
28247 | } | |
28248 | ||
28249 | void helper_cvtpd2ps(XMMReg *d, XMMReg *s) | |
28250 | { | |
28251 | d->_s[0] = float64_to_float32(s->_d[0], &env->sse_status); | |
28252 | d->_s[1] = float64_to_float32(s->_d[1], &env->sse_status); | |
28253 | d->_q[1] = 0; | |
28254 | } | |
28255 | ||
28256 | void helper_cvtss2sd(XMMReg *d, XMMReg *s) | |
28257 | { | |
28258 | d->_d[0] = float32_to_float64(s->_s[0], &env->sse_status); | |
28259 | } | |
28260 | ||
28261 | void helper_cvtsd2ss(XMMReg *d, XMMReg *s) | |
28262 | { | |
28263 | d->_s[0] = float64_to_float32(s->_d[0], &env->sse_status); | |
28264 | } | |
28265 | ||
28266 | ||
28267 | void helper_cvtdq2ps(XMMReg *d, XMMReg *s) | |
28268 | { | |
28269 | d->_s[0] = int32_to_float32(s->_l[0], &env->sse_status); | |
28270 | d->_s[1] = int32_to_float32(s->_l[1], &env->sse_status); | |
28271 | d->_s[2] = int32_to_float32(s->_l[2], &env->sse_status); | |
28272 | d->_s[3] = int32_to_float32(s->_l[3], &env->sse_status); | |
28273 | } | |
28274 | ||
28275 | void helper_cvtdq2pd(XMMReg *d, XMMReg *s) | |
28276 | { | |
28277 | int32_t l0, l1; | |
28278 | l0 = (int32_t)s->_l[0]; | |
28279 | l1 = (int32_t)s->_l[1]; | |
28280 | d->_d[0] = int32_to_float64(l0, &env->sse_status); | |
28281 | d->_d[1] = int32_to_float64(l1, &env->sse_status); | |
28282 | } | |
28283 | ||
28284 | void helper_cvtpi2ps(XMMReg *d, MMXReg *s) | |
28285 | { | |
28286 | d->_s[0] = int32_to_float32(s->_l[0], &env->sse_status); | |
28287 | d->_s[1] = int32_to_float32(s->_l[1], &env->sse_status); | |
28288 | } | |
28289 | ||
28290 | void helper_cvtpi2pd(XMMReg *d, MMXReg *s) | |
28291 | { | |
28292 | d->_d[0] = int32_to_float64(s->_l[0], &env->sse_status); | |
28293 | d->_d[1] = int32_to_float64(s->_l[1], &env->sse_status); | |
28294 | } | |
28295 | ||
28296 | void helper_cvtsi2ss(XMMReg *d, uint32_t val) | |
28297 | { | |
28298 | d->_s[0] = int32_to_float32(val, &env->sse_status); | |
28299 | } | |
28300 | ||
28301 | void helper_cvtsi2sd(XMMReg *d, uint32_t val) | |
28302 | { | |
28303 | d->_d[0] = int32_to_float64(val, &env->sse_status); | |
28304 | } | |
28305 | # 685 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28306 | void helper_cvtps2dq(XMMReg *d, XMMReg *s) | |
28307 | { | |
28308 | d->_l[0] = float32_to_int32(s->_s[0], &env->sse_status); | |
28309 | d->_l[1] = float32_to_int32(s->_s[1], &env->sse_status); | |
28310 | d->_l[2] = float32_to_int32(s->_s[2], &env->sse_status); | |
28311 | d->_l[3] = float32_to_int32(s->_s[3], &env->sse_status); | |
28312 | } | |
28313 | ||
28314 | void helper_cvtpd2dq(XMMReg *d, XMMReg *s) | |
28315 | { | |
28316 | d->_l[0] = float64_to_int32(s->_d[0], &env->sse_status); | |
28317 | d->_l[1] = float64_to_int32(s->_d[1], &env->sse_status); | |
28318 | d->_q[1] = 0; | |
28319 | } | |
28320 | ||
28321 | void helper_cvtps2pi(MMXReg *d, XMMReg *s) | |
28322 | { | |
28323 | d->_l[0] = float32_to_int32(s->_s[0], &env->sse_status); | |
28324 | d->_l[1] = float32_to_int32(s->_s[1], &env->sse_status); | |
28325 | } | |
28326 | ||
28327 | void helper_cvtpd2pi(MMXReg *d, XMMReg *s) | |
28328 | { | |
28329 | d->_l[0] = float64_to_int32(s->_d[0], &env->sse_status); | |
28330 | d->_l[1] = float64_to_int32(s->_d[1], &env->sse_status); | |
28331 | } | |
28332 | ||
28333 | int32_t helper_cvtss2si(XMMReg *s) | |
28334 | { | |
28335 | return float32_to_int32(s->_s[0], &env->sse_status); | |
28336 | } | |
28337 | ||
28338 | int32_t helper_cvtsd2si(XMMReg *s) | |
28339 | { | |
28340 | return float64_to_int32(s->_d[0], &env->sse_status); | |
28341 | } | |
28342 | # 735 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28343 | void helper_cvttps2dq(XMMReg *d, XMMReg *s) | |
28344 | { | |
28345 | d->_l[0] = float32_to_int32_round_to_zero(s->_s[0], &env->sse_status); | |
28346 | d->_l[1] = float32_to_int32_round_to_zero(s->_s[1], &env->sse_status); | |
28347 | d->_l[2] = float32_to_int32_round_to_zero(s->_s[2], &env->sse_status); | |
28348 | d->_l[3] = float32_to_int32_round_to_zero(s->_s[3], &env->sse_status); | |
28349 | } | |
28350 | ||
28351 | void helper_cvttpd2dq(XMMReg *d, XMMReg *s) | |
28352 | { | |
28353 | d->_l[0] = float64_to_int32_round_to_zero(s->_d[0], &env->sse_status); | |
28354 | d->_l[1] = float64_to_int32_round_to_zero(s->_d[1], &env->sse_status); | |
28355 | d->_q[1] = 0; | |
28356 | } | |
28357 | ||
28358 | void helper_cvttps2pi(MMXReg *d, XMMReg *s) | |
28359 | { | |
28360 | d->_l[0] = float32_to_int32_round_to_zero(s->_s[0], &env->sse_status); | |
28361 | d->_l[1] = float32_to_int32_round_to_zero(s->_s[1], &env->sse_status); | |
28362 | } | |
28363 | ||
28364 | void helper_cvttpd2pi(MMXReg *d, XMMReg *s) | |
28365 | { | |
28366 | d->_l[0] = float64_to_int32_round_to_zero(s->_d[0], &env->sse_status); | |
28367 | d->_l[1] = float64_to_int32_round_to_zero(s->_d[1], &env->sse_status); | |
28368 | } | |
28369 | ||
28370 | int32_t helper_cvttss2si(XMMReg *s) | |
28371 | { | |
28372 | return float32_to_int32_round_to_zero(s->_s[0], &env->sse_status); | |
28373 | } | |
28374 | ||
28375 | int32_t helper_cvttsd2si(XMMReg *s) | |
28376 | { | |
28377 | return float64_to_int32_round_to_zero(s->_d[0], &env->sse_status); | |
28378 | } | |
28379 | # 784 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28380 | void helper_rsqrtps(XMMReg *d, XMMReg *s) | |
28381 | { | |
28382 | d->_s[0] = float32_div((0x3f800000), | |
28383 | float32_sqrt(s->_s[0], &env->sse_status), | |
28384 | &env->sse_status); | |
28385 | d->_s[1] = float32_div((0x3f800000), | |
28386 | float32_sqrt(s->_s[1], &env->sse_status), | |
28387 | &env->sse_status); | |
28388 | d->_s[2] = float32_div((0x3f800000), | |
28389 | float32_sqrt(s->_s[2], &env->sse_status), | |
28390 | &env->sse_status); | |
28391 | d->_s[3] = float32_div((0x3f800000), | |
28392 | float32_sqrt(s->_s[3], &env->sse_status), | |
28393 | &env->sse_status); | |
28394 | } | |
28395 | ||
28396 | void helper_rsqrtss(XMMReg *d, XMMReg *s) | |
28397 | { | |
28398 | d->_s[0] = float32_div((0x3f800000), | |
28399 | float32_sqrt(s->_s[0], &env->sse_status), | |
28400 | &env->sse_status); | |
28401 | } | |
28402 | ||
28403 | void helper_rcpps(XMMReg *d, XMMReg *s) | |
28404 | { | |
28405 | d->_s[0] = float32_div((0x3f800000), s->_s[0], &env->sse_status); | |
28406 | d->_s[1] = float32_div((0x3f800000), s->_s[1], &env->sse_status); | |
28407 | d->_s[2] = float32_div((0x3f800000), s->_s[2], &env->sse_status); | |
28408 | d->_s[3] = float32_div((0x3f800000), s->_s[3], &env->sse_status); | |
28409 | } | |
28410 | ||
28411 | void helper_rcpss(XMMReg *d, XMMReg *s) | |
28412 | { | |
28413 | d->_s[0] = float32_div((0x3f800000), s->_s[0], &env->sse_status); | |
28414 | } | |
28415 | ||
28416 | static __attribute__ (( always_inline )) __inline__ uint64_t helper_extrq(uint64_t src, int shift, int len) | |
28417 | { | |
28418 | uint64_t mask; | |
28419 | ||
28420 | if (len == 0) { | |
28421 | mask = ~0LL; | |
28422 | } else { | |
28423 | mask = (1ULL << len) - 1; | |
28424 | } | |
28425 | return (src >> shift) & mask; | |
28426 | } | |
28427 | ||
28428 | void helper_extrq_r(XMMReg *d, XMMReg *s) | |
28429 | { | |
28430 | d->_q[0] = helper_extrq(d->_q[0], s->_b[1], s->_b[0]); | |
28431 | } | |
28432 | ||
28433 | void helper_extrq_i(XMMReg *d, int index, int length) | |
28434 | { | |
28435 | d->_q[0] = helper_extrq(d->_q[0], index, length); | |
28436 | } | |
28437 | ||
28438 | static __attribute__ (( always_inline )) __inline__ uint64_t helper_insertq(uint64_t src, int shift, int len) | |
28439 | { | |
28440 | uint64_t mask; | |
28441 | ||
28442 | if (len == 0) { | |
28443 | mask = ~0ULL; | |
28444 | } else { | |
28445 | mask = (1ULL << len) - 1; | |
28446 | } | |
28447 | return (src & ~(mask << shift)) | ((src & mask) << shift); | |
28448 | } | |
28449 | ||
28450 | void helper_insertq_r(XMMReg *d, XMMReg *s) | |
28451 | { | |
28452 | d->_q[0] = helper_insertq(s->_q[0], s->_b[9], s->_b[8]); | |
28453 | } | |
28454 | ||
28455 | void helper_insertq_i(XMMReg *d, int index, int length) | |
28456 | { | |
28457 | d->_q[0] = helper_insertq(d->_q[0], index, length); | |
28458 | } | |
28459 | ||
28460 | void helper_haddps(XMMReg *d, XMMReg *s) | |
28461 | { | |
28462 | XMMReg r; | |
28463 | r._s[0] = float32_add(d->_s[0], d->_s[1], &env->sse_status); | |
28464 | r._s[1] = float32_add(d->_s[2], d->_s[3], &env->sse_status); | |
28465 | r._s[2] = float32_add(s->_s[0], s->_s[1], &env->sse_status); | |
28466 | r._s[3] = float32_add(s->_s[2], s->_s[3], &env->sse_status); | |
28467 | *d = r; | |
28468 | } | |
28469 | ||
28470 | void helper_haddpd(XMMReg *d, XMMReg *s) | |
28471 | { | |
28472 | XMMReg r; | |
28473 | r._d[0] = float64_add(d->_d[0], d->_d[1], &env->sse_status); | |
28474 | r._d[1] = float64_add(s->_d[0], s->_d[1], &env->sse_status); | |
28475 | *d = r; | |
28476 | } | |
28477 | ||
28478 | void helper_hsubps(XMMReg *d, XMMReg *s) | |
28479 | { | |
28480 | XMMReg r; | |
28481 | r._s[0] = float32_sub(d->_s[0], d->_s[1], &env->sse_status); | |
28482 | r._s[1] = float32_sub(d->_s[2], d->_s[3], &env->sse_status); | |
28483 | r._s[2] = float32_sub(s->_s[0], s->_s[1], &env->sse_status); | |
28484 | r._s[3] = float32_sub(s->_s[2], s->_s[3], &env->sse_status); | |
28485 | *d = r; | |
28486 | } | |
28487 | ||
28488 | void helper_hsubpd(XMMReg *d, XMMReg *s) | |
28489 | { | |
28490 | XMMReg r; | |
28491 | r._d[0] = float64_sub(d->_d[0], d->_d[1], &env->sse_status); | |
28492 | r._d[1] = float64_sub(s->_d[0], s->_d[1], &env->sse_status); | |
28493 | *d = r; | |
28494 | } | |
28495 | ||
28496 | void helper_addsubps(XMMReg *d, XMMReg *s) | |
28497 | { | |
28498 | d->_s[0] = float32_sub(d->_s[0], s->_s[0], &env->sse_status); | |
28499 | d->_s[1] = float32_add(d->_s[1], s->_s[1], &env->sse_status); | |
28500 | d->_s[2] = float32_sub(d->_s[2], s->_s[2], &env->sse_status); | |
28501 | d->_s[3] = float32_add(d->_s[3], s->_s[3], &env->sse_status); | |
28502 | } | |
28503 | ||
28504 | void helper_addsubpd(XMMReg *d, XMMReg *s) | |
28505 | { | |
28506 | d->_d[0] = float64_sub(d->_d[0], s->_d[0], &env->sse_status); | |
28507 | d->_d[1] = float64_add(d->_d[1], s->_d[1], &env->sse_status); | |
28508 | } | |
28509 | # 948 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28510 | void helper_cmpeqps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_eq_quiet(d->_s[0], s->_s[0], &env->sse_status) ? -1 : 0; d->_l[1] = float32_eq_quiet(d->_s[1], s->_s[1], &env->sse_status) ? -1 : 0; d->_l[2] = float32_eq_quiet(d->_s[2], s->_s[2], &env->sse_status) ? -1 : 0; d->_l[3] = float32_eq_quiet(d->_s[3], s->_s[3], &env->sse_status) ? -1 : 0;}void helper_cmpeqss (XMMReg *d, XMMReg *s){ d->_l[0] = float32_eq_quiet(d->_s[0], s->_s[0], &env->sse_status) ? -1 : 0;}void helper_cmpeqpd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_eq_quiet(d->_d[0], s->_d[0], &env->sse_status) ? -1 : 0; d->_q[1] = float64_eq_quiet(d->_d[1], s->_d[1], &env->sse_status) ? -1 : 0;}void helper_cmpeqsd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_eq_quiet(d->_d[0], s->_d[0], &env->sse_status) ? -1 : 0;} | |
28511 | void helper_cmpltps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_lt(d->_s[0], s->_s[0], &env->sse_status) ? -1 : 0; d->_l[1] = float32_lt(d->_s[1], s->_s[1], &env->sse_status) ? -1 : 0; d->_l[2] = float32_lt(d->_s[2], s->_s[2], &env->sse_status) ? -1 : 0; d->_l[3] = float32_lt(d->_s[3], s->_s[3], &env->sse_status) ? -1 : 0;}void helper_cmpltss (XMMReg *d, XMMReg *s){ d->_l[0] = float32_lt(d->_s[0], s->_s[0], &env->sse_status) ? -1 : 0;}void helper_cmpltpd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_lt(d->_d[0], s->_d[0], &env->sse_status) ? -1 : 0; d->_q[1] = float64_lt(d->_d[1], s->_d[1], &env->sse_status) ? -1 : 0;}void helper_cmpltsd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_lt(d->_d[0], s->_d[0], &env->sse_status) ? -1 : 0;} | |
28512 | void helper_cmpleps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_le(d->_s[0], s->_s[0], &env->sse_status) ? -1 : 0; d->_l[1] = float32_le(d->_s[1], s->_s[1], &env->sse_status) ? -1 : 0; d->_l[2] = float32_le(d->_s[2], s->_s[2], &env->sse_status) ? -1 : 0; d->_l[3] = float32_le(d->_s[3], s->_s[3], &env->sse_status) ? -1 : 0;}void helper_cmpless (XMMReg *d, XMMReg *s){ d->_l[0] = float32_le(d->_s[0], s->_s[0], &env->sse_status) ? -1 : 0;}void helper_cmplepd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_le(d->_d[0], s->_d[0], &env->sse_status) ? -1 : 0; d->_q[1] = float64_le(d->_d[1], s->_d[1], &env->sse_status) ? -1 : 0;}void helper_cmplesd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_le(d->_d[0], s->_d[0], &env->sse_status) ? -1 : 0;} | |
28513 | void helper_cmpunordps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_unordered_quiet(d->_s[0], s->_s[0], &env->sse_status) ? - 1 : 0; d->_l[1] = float32_unordered_quiet(d->_s[1], s->_s[1], &env->sse_status) ? - 1 : 0; d->_l[2] = float32_unordered_quiet(d->_s[2], s->_s[2], &env->sse_status) ? - 1 : 0; d->_l[3] = float32_unordered_quiet(d->_s[3], s->_s[3], &env->sse_status) ? - 1 : 0;}void helper_cmpunordss (XMMReg *d, XMMReg *s){ d->_l[0] = float32_unordered_quiet(d->_s[0], s->_s[0], &env->sse_status) ? - 1 : 0;}void helper_cmpunordpd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_unordered_quiet(d->_d[0], s->_d[0], &env->sse_status) ? - 1 : 0; d->_q[1] = float64_unordered_quiet(d->_d[1], s->_d[1], &env->sse_status) ? - 1 : 0;}void helper_cmpunordsd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_unordered_quiet(d->_d[0], s->_d[0], &env->sse_status) ? - 1 : 0;} | |
28514 | void helper_cmpneqps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_eq_quiet(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1; d->_l[1] = float32_eq_quiet(d->_s[1], s->_s[1], &env->sse_status) ? 0 : -1; d->_l[2] = float32_eq_quiet(d->_s[2], s->_s[2], &env->sse_status) ? 0 : -1; d->_l[3] = float32_eq_quiet(d->_s[3], s->_s[3], &env->sse_status) ? 0 : -1;}void helper_cmpneqss (XMMReg *d, XMMReg *s){ d->_l[0] = float32_eq_quiet(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1;}void helper_cmpneqpd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_eq_quiet(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1; d->_q[1] = float64_eq_quiet(d->_d[1], s->_d[1], &env->sse_status) ? 0 : -1;}void helper_cmpneqsd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_eq_quiet(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1;} | |
28515 | void helper_cmpnltps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_lt(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1; d->_l[1] = float32_lt(d->_s[1], s->_s[1], &env->sse_status) ? 0 : -1; d->_l[2] = float32_lt(d->_s[2], s->_s[2], &env->sse_status) ? 0 : -1; d->_l[3] = float32_lt(d->_s[3], s->_s[3], &env->sse_status) ? 0 : -1;}void helper_cmpnltss (XMMReg *d, XMMReg *s){ d->_l[0] = float32_lt(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1;}void helper_cmpnltpd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_lt(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1; d->_q[1] = float64_lt(d->_d[1], s->_d[1], &env->sse_status) ? 0 : -1;}void helper_cmpnltsd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_lt(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1;} | |
28516 | void helper_cmpnleps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_le(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1; d->_l[1] = float32_le(d->_s[1], s->_s[1], &env->sse_status) ? 0 : -1; d->_l[2] = float32_le(d->_s[2], s->_s[2], &env->sse_status) ? 0 : -1; d->_l[3] = float32_le(d->_s[3], s->_s[3], &env->sse_status) ? 0 : -1;}void helper_cmpnless (XMMReg *d, XMMReg *s){ d->_l[0] = float32_le(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1;}void helper_cmpnlepd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_le(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1; d->_q[1] = float64_le(d->_d[1], s->_d[1], &env->sse_status) ? 0 : -1;}void helper_cmpnlesd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_le(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1;} | |
28517 | void helper_cmpordps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_unordered_quiet(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1; d->_l[1] = float32_unordered_quiet(d->_s[1], s->_s[1], &env->sse_status) ? 0 : -1; d->_l[2] = float32_unordered_quiet(d->_s[2], s->_s[2], &env->sse_status) ? 0 : -1; d->_l[3] = float32_unordered_quiet(d->_s[3], s->_s[3], &env->sse_status) ? 0 : -1;}void helper_cmpordss (XMMReg *d, XMMReg *s){ d->_l[0] = float32_unordered_quiet(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1;}void helper_cmpordpd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_unordered_quiet(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1; d->_q[1] = float64_unordered_quiet(d->_d[1], s->_d[1], &env->sse_status) ? 0 : -1;}void helper_cmpordsd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_unordered_quiet(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1;} | |
28518 | ||
28519 | static const int comis_eflags[4] = {0x0001, 0x0040, 0, 0x0040 | 0x0004 | 0x0001}; | |
28520 | ||
28521 | void helper_ucomiss(XMMReg *d, XMMReg *s) | |
28522 | { | |
28523 | int ret; | |
28524 | float32 s0, s1; | |
28525 | ||
28526 | s0 = d->_s[0]; | |
28527 | s1 = s->_s[0]; | |
28528 | ret = float32_compare_quiet(s0, s1, &env->sse_status); | |
28529 | (env->cc_src) = comis_eflags[ret + 1]; | |
28530 | } | |
28531 | ||
28532 | void helper_comiss(XMMReg *d, XMMReg *s) | |
28533 | { | |
28534 | int ret; | |
28535 | float32 s0, s1; | |
28536 | ||
28537 | s0 = d->_s[0]; | |
28538 | s1 = s->_s[0]; | |
28539 | ret = float32_compare(s0, s1, &env->sse_status); | |
28540 | (env->cc_src) = comis_eflags[ret + 1]; | |
28541 | } | |
28542 | ||
28543 | void helper_ucomisd(XMMReg *d, XMMReg *s) | |
28544 | { | |
28545 | int ret; | |
28546 | float64 d0, d1; | |
28547 | ||
28548 | d0 = d->_d[0]; | |
28549 | d1 = s->_d[0]; | |
28550 | ret = float64_compare_quiet(d0, d1, &env->sse_status); | |
28551 | (env->cc_src) = comis_eflags[ret + 1]; | |
28552 | } | |
28553 | ||
28554 | void helper_comisd(XMMReg *d, XMMReg *s) | |
28555 | { | |
28556 | int ret; | |
28557 | float64 d0, d1; | |
28558 | ||
28559 | d0 = d->_d[0]; | |
28560 | d1 = s->_d[0]; | |
28561 | ret = float64_compare(d0, d1, &env->sse_status); | |
28562 | (env->cc_src) = comis_eflags[ret + 1]; | |
28563 | } | |
28564 | ||
28565 | uint32_t helper_movmskps(XMMReg *s) | |
28566 | { | |
28567 | int b0, b1, b2, b3; | |
28568 | b0 = s->_l[0] >> 31; | |
28569 | b1 = s->_l[1] >> 31; | |
28570 | b2 = s->_l[2] >> 31; | |
28571 | b3 = s->_l[3] >> 31; | |
28572 | return b0 | (b1 << 1) | (b2 << 2) | (b3 << 3); | |
28573 | } | |
28574 | ||
28575 | uint32_t helper_movmskpd(XMMReg *s) | |
28576 | { | |
28577 | int b0, b1; | |
28578 | b0 = s->_l[1] >> 31; | |
28579 | b1 = s->_l[3] >> 31; | |
28580 | return b0 | (b1 << 1); | |
28581 | } | |
28582 | ||
28583 | ||
28584 | ||
28585 | uint32_t helper_pmovmskb_xmm(XMMReg *s) | |
28586 | { | |
28587 | uint32_t val; | |
28588 | val = 0; | |
28589 | val |= (s->_b[0] >> 7); | |
28590 | val |= (s->_b[1] >> 6) & 0x02; | |
28591 | val |= (s->_b[2] >> 5) & 0x04; | |
28592 | val |= (s->_b[3] >> 4) & 0x08; | |
28593 | val |= (s->_b[4] >> 3) & 0x10; | |
28594 | val |= (s->_b[5] >> 2) & 0x20; | |
28595 | val |= (s->_b[6] >> 1) & 0x40; | |
28596 | val |= (s->_b[7]) & 0x80; | |
28597 | ||
28598 | val |= (s->_b[8] << 1) & 0x0100; | |
28599 | val |= (s->_b[9] << 2) & 0x0200; | |
28600 | val |= (s->_b[10] << 3) & 0x0400; | |
28601 | val |= (s->_b[11] << 4) & 0x0800; | |
28602 | val |= (s->_b[12] << 5) & 0x1000; | |
28603 | val |= (s->_b[13] << 6) & 0x2000; | |
28604 | val |= (s->_b[14] << 7) & 0x4000; | |
28605 | val |= (s->_b[15] << 8) & 0x8000; | |
28606 | ||
28607 | return val; | |
28608 | } | |
28609 | ||
28610 | void helper_packsswb_xmm (XMMReg *d, XMMReg *s) | |
28611 | { | |
28612 | XMMReg r; | |
28613 | ||
28614 | r._b[0] = satsb((int16_t)d->_w[0]); | |
28615 | r._b[1] = satsb((int16_t)d->_w[1]); | |
28616 | r._b[2] = satsb((int16_t)d->_w[2]); | |
28617 | r._b[3] = satsb((int16_t)d->_w[3]); | |
28618 | ||
28619 | r._b[4] = satsb((int16_t)d->_w[4]); | |
28620 | r._b[5] = satsb((int16_t)d->_w[5]); | |
28621 | r._b[6] = satsb((int16_t)d->_w[6]); | |
28622 | r._b[7] = satsb((int16_t)d->_w[7]); | |
28623 | ||
28624 | r._b[(4 << 1) + 0] = satsb((int16_t)s->_w[0]); | |
28625 | r._b[(4 << 1) + 1] = satsb((int16_t)s->_w[1]); | |
28626 | r._b[(4 << 1) + 2] = satsb((int16_t)s->_w[2]); | |
28627 | r._b[(4 << 1) + 3] = satsb((int16_t)s->_w[3]); | |
28628 | ||
28629 | r._b[12] = satsb((int16_t)s->_w[4]); | |
28630 | r._b[13] = satsb((int16_t)s->_w[5]); | |
28631 | r._b[14] = satsb((int16_t)s->_w[6]); | |
28632 | r._b[15] = satsb((int16_t)s->_w[7]); | |
28633 | ||
28634 | *d = r; | |
28635 | } | |
28636 | ||
28637 | void helper_packuswb_xmm (XMMReg *d, XMMReg *s) | |
28638 | { | |
28639 | XMMReg r; | |
28640 | ||
28641 | r._b[0] = satub((int16_t)d->_w[0]); | |
28642 | r._b[1] = satub((int16_t)d->_w[1]); | |
28643 | r._b[2] = satub((int16_t)d->_w[2]); | |
28644 | r._b[3] = satub((int16_t)d->_w[3]); | |
28645 | ||
28646 | r._b[4] = satub((int16_t)d->_w[4]); | |
28647 | r._b[5] = satub((int16_t)d->_w[5]); | |
28648 | r._b[6] = satub((int16_t)d->_w[6]); | |
28649 | r._b[7] = satub((int16_t)d->_w[7]); | |
28650 | ||
28651 | r._b[(4 << 1) + 0] = satub((int16_t)s->_w[0]); | |
28652 | r._b[(4 << 1) + 1] = satub((int16_t)s->_w[1]); | |
28653 | r._b[(4 << 1) + 2] = satub((int16_t)s->_w[2]); | |
28654 | r._b[(4 << 1) + 3] = satub((int16_t)s->_w[3]); | |
28655 | ||
28656 | r._b[12] = satub((int16_t)s->_w[4]); | |
28657 | r._b[13] = satub((int16_t)s->_w[5]); | |
28658 | r._b[14] = satub((int16_t)s->_w[6]); | |
28659 | r._b[15] = satub((int16_t)s->_w[7]); | |
28660 | ||
28661 | *d = r; | |
28662 | } | |
28663 | ||
28664 | void helper_packssdw_xmm (XMMReg *d, XMMReg *s) | |
28665 | { | |
28666 | XMMReg r; | |
28667 | ||
28668 | r._w[0] = satsw(d->_l[0]); | |
28669 | r._w[1] = satsw(d->_l[1]); | |
28670 | ||
28671 | r._w[2] = satsw(d->_l[2]); | |
28672 | r._w[3] = satsw(d->_l[3]); | |
28673 | ||
28674 | r._w[(2 << 1) + 0] = satsw(s->_l[0]); | |
28675 | r._w[(2 << 1) + 1] = satsw(s->_l[1]); | |
28676 | ||
28677 | r._w[6] = satsw(s->_l[2]); | |
28678 | r._w[7] = satsw(s->_l[3]); | |
28679 | ||
28680 | *d = r; | |
28681 | } | |
28682 | # 1189 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28683 | void helper_punpcklbw_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._b[0] = d->_b[(0 << (1 + 2)) + 0]; r._b[1] = s->_b[(0 << (1 + 2)) + 0]; r._b[2] = d->_b[(0 << (1 + 2)) + 1]; r._b[3] = s->_b[(0 << (1 + 2)) + 1]; r._b[4] = d->_b[(0 << (1 + 2)) + 2]; r._b[5] = s->_b[(0 << (1 + 2)) + 2]; r._b[6] = d->_b[(0 << (1 + 2)) + 3]; r._b[7] = s->_b[(0 << (1 + 2)) + 3]; r._b[8] = d->_b[(0 << (1 + 2)) + 4]; r._b[9] = s->_b[(0 << (1 + 2)) + 4]; r._b[10] = d->_b[(0 << (1 + 2)) + 5]; r._b[11] = s->_b[(0 << (1 + 2)) + 5]; r._b[12] = d->_b[(0 << (1 + 2)) + 6]; r._b[13] = s->_b[(0 << (1 + 2)) + 6]; r._b[14] = d->_b[(0 << (1 + 2)) + 7]; r._b[15] = s->_b[(0 << (1 + 2)) + 7]; *d = r; } void helper_punpcklwd_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._w[0] = d->_w[(0 << (1 + 1)) + 0]; r._w[1] = s->_w[(0 << (1 + 1)) + 0]; r._w[2] = d->_w[(0 << (1 + 1)) + 1]; r._w[3] = s->_w[(0 << (1 + 1)) + 1]; r._w[4] = d->_w[(0 << (1 + 1)) + 2]; r._w[5] = s->_w[(0 << (1 + 1)) + 2]; r._w[6] = d->_w[(0 << (1 + 1)) + 3]; r._w[7] = s->_w[(0 << (1 + 1)) + 3]; *d = r; } void helper_punpckldq_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._l[0] = d->_l[(0 << 1) + 0]; r._l[1] = s->_l[(0 << 1) + 0]; r._l[2] = d->_l[(0 << 1) + 1]; r._l[3] = s->_l[(0 << 1) + 1]; *d = r; } void helper_punpcklqdq_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._q[0] = d->_q[0]; r._q[1] = s->_q[0]; *d = r; } | |
28684 | void helper_punpckhbw_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._b[0] = d->_b[(1 << (1 + 2)) + 0]; r._b[1] = s->_b[(1 << (1 + 2)) + 0]; r._b[2] = d->_b[(1 << (1 + 2)) + 1]; r._b[3] = s->_b[(1 << (1 + 2)) + 1]; r._b[4] = d->_b[(1 << (1 + 2)) + 2]; r._b[5] = s->_b[(1 << (1 + 2)) + 2]; r._b[6] = d->_b[(1 << (1 + 2)) + 3]; r._b[7] = s->_b[(1 << (1 + 2)) + 3]; r._b[8] = d->_b[(1 << (1 + 2)) + 4]; r._b[9] = s->_b[(1 << (1 + 2)) + 4]; r._b[10] = d->_b[(1 << (1 + 2)) + 5]; r._b[11] = s->_b[(1 << (1 + 2)) + 5]; r._b[12] = d->_b[(1 << (1 + 2)) + 6]; r._b[13] = s->_b[(1 << (1 + 2)) + 6]; r._b[14] = d->_b[(1 << (1 + 2)) + 7]; r._b[15] = s->_b[(1 << (1 + 2)) + 7]; *d = r; } void helper_punpckhwd_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._w[0] = d->_w[(1 << (1 + 1)) + 0]; r._w[1] = s->_w[(1 << (1 + 1)) + 0]; r._w[2] = d->_w[(1 << (1 + 1)) + 1]; r._w[3] = s->_w[(1 << (1 + 1)) + 1]; r._w[4] = d->_w[(1 << (1 + 1)) + 2]; r._w[5] = s->_w[(1 << (1 + 1)) + 2]; r._w[6] = d->_w[(1 << (1 + 1)) + 3]; r._w[7] = s->_w[(1 << (1 + 1)) + 3]; *d = r; } void helper_punpckhdq_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._l[0] = d->_l[(1 << 1) + 0]; r._l[1] = s->_l[(1 << 1) + 0]; r._l[2] = d->_l[(1 << 1) + 1]; r._l[3] = s->_l[(1 << 1) + 1]; *d = r; } void helper_punpckhqdq_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._q[0] = d->_q[1]; r._q[1] = s->_q[1]; *d = r; } | |
28685 | # 1326 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28686 | void helper_pshufb_xmm (XMMReg *d, XMMReg *s) | |
28687 | { | |
28688 | int i; | |
28689 | XMMReg r; | |
28690 | ||
28691 | for (i = 0; i < (8 << 1); i++) | |
28692 | r._b[i] = (s->_b[i] & 0x80) ? 0 : (d->_b[s->_b[i] & ((8 << 1) - 1)]); | |
28693 | ||
28694 | *d = r; | |
28695 | } | |
28696 | ||
28697 | void helper_phaddw_xmm (XMMReg *d, XMMReg *s) | |
28698 | { | |
28699 | d->_w[0] = (int16_t)d->_w[0] + (int16_t)d->_w[1]; | |
28700 | d->_w[1] = (int16_t)d->_w[2] + (int16_t)d->_w[3]; | |
28701 | d->_w[2] = (int16_t)d->_w[4] + (int16_t)d->_w[5]; | |
28702 | d->_w[3] = (int16_t)d->_w[6] + (int16_t)d->_w[7]; | |
28703 | d->_w[(2 << 1) + 0] = (int16_t)s->_w[0] + (int16_t)s->_w[1]; | |
28704 | d->_w[(2 << 1) + 1] = (int16_t)s->_w[2] + (int16_t)s->_w[3]; | |
28705 | d->_w[6] = (int16_t)s->_w[4] + (int16_t)s->_w[5]; | |
28706 | d->_w[7] = (int16_t)s->_w[6] + (int16_t)s->_w[7]; | |
28707 | } | |
28708 | ||
28709 | void helper_phaddd_xmm (XMMReg *d, XMMReg *s) | |
28710 | { | |
28711 | d->_l[0] = (int32_t)d->_l[0] + (int32_t)d->_l[1]; | |
28712 | d->_l[1] = (int32_t)d->_l[2] + (int32_t)d->_l[3]; | |
28713 | d->_l[(1 << 1) + 0] = (int32_t)s->_l[0] + (int32_t)s->_l[1]; | |
28714 | d->_l[3] = (int32_t)s->_l[2] + (int32_t)s->_l[3]; | |
28715 | } | |
28716 | ||
28717 | void helper_phaddsw_xmm (XMMReg *d, XMMReg *s) | |
28718 | { | |
28719 | d->_w[0] = satsw((int16_t)d->_w[0] + (int16_t)d->_w[1]); | |
28720 | d->_w[1] = satsw((int16_t)d->_w[2] + (int16_t)d->_w[3]); | |
28721 | d->_w[2] = satsw((int16_t)d->_w[4] + (int16_t)d->_w[5]); | |
28722 | d->_w[3] = satsw((int16_t)d->_w[6] + (int16_t)d->_w[7]); | |
28723 | d->_w[(2 << 1) + 0] = satsw((int16_t)s->_w[0] + (int16_t)s->_w[1]); | |
28724 | d->_w[(2 << 1) + 1] = satsw((int16_t)s->_w[2] + (int16_t)s->_w[3]); | |
28725 | d->_w[6] = satsw((int16_t)s->_w[4] + (int16_t)s->_w[5]); | |
28726 | d->_w[7] = satsw((int16_t)s->_w[6] + (int16_t)s->_w[7]); | |
28727 | } | |
28728 | ||
28729 | void helper_pmaddubsw_xmm (XMMReg *d, XMMReg *s) | |
28730 | { | |
28731 | d->_w[0] = satsw((int8_t)s->_b[0] * (uint8_t)d->_b[0] + | |
28732 | (int8_t)s->_b[1] * (uint8_t)d->_b[1]); | |
28733 | d->_w[1] = satsw((int8_t)s->_b[2] * (uint8_t)d->_b[2] + | |
28734 | (int8_t)s->_b[3] * (uint8_t)d->_b[3]); | |
28735 | d->_w[2] = satsw((int8_t)s->_b[4] * (uint8_t)d->_b[4] + | |
28736 | (int8_t)s->_b[5] * (uint8_t)d->_b[5]); | |
28737 | d->_w[3] = satsw((int8_t)s->_b[6] * (uint8_t)d->_b[6] + | |
28738 | (int8_t)s->_b[7] * (uint8_t)d->_b[7]); | |
28739 | ||
28740 | d->_w[4] = satsw((int8_t)s->_b[8] * (uint8_t)d->_b[8] + | |
28741 | (int8_t)s->_b[9] * (uint8_t)d->_b[9]); | |
28742 | d->_w[5] = satsw((int8_t)s->_b[10] * (uint8_t)d->_b[10] + | |
28743 | (int8_t)s->_b[11] * (uint8_t)d->_b[11]); | |
28744 | d->_w[6] = satsw((int8_t)s->_b[12] * (uint8_t)d->_b[12] + | |
28745 | (int8_t)s->_b[13] * (uint8_t)d->_b[13]); | |
28746 | d->_w[7] = satsw((int8_t)s->_b[14] * (uint8_t)d->_b[14] + | |
28747 | (int8_t)s->_b[15] * (uint8_t)d->_b[15]); | |
28748 | ||
28749 | } | |
28750 | ||
28751 | void helper_phsubw_xmm (XMMReg *d, XMMReg *s) | |
28752 | { | |
28753 | d->_w[0] = (int16_t)d->_w[0] - (int16_t)d->_w[1]; | |
28754 | d->_w[1] = (int16_t)d->_w[2] - (int16_t)d->_w[3]; | |
28755 | d->_w[2] = (int16_t)d->_w[4] - (int16_t)d->_w[5]; | |
28756 | d->_w[3] = (int16_t)d->_w[6] - (int16_t)d->_w[7]; | |
28757 | d->_w[(2 << 1) + 0] = (int16_t)s->_w[0] - (int16_t)s->_w[1]; | |
28758 | d->_w[(2 << 1) + 1] = (int16_t)s->_w[2] - (int16_t)s->_w[3]; | |
28759 | d->_w[6] = (int16_t)s->_w[4] - (int16_t)s->_w[5]; | |
28760 | d->_w[7] = (int16_t)s->_w[6] - (int16_t)s->_w[7]; | |
28761 | } | |
28762 | ||
28763 | void helper_phsubd_xmm (XMMReg *d, XMMReg *s) | |
28764 | { | |
28765 | d->_l[0] = (int32_t)d->_l[0] - (int32_t)d->_l[1]; | |
28766 | d->_l[1] = (int32_t)d->_l[2] - (int32_t)d->_l[3]; | |
28767 | d->_l[(1 << 1) + 0] = (int32_t)s->_l[0] - (int32_t)s->_l[1]; | |
28768 | d->_l[3] = (int32_t)s->_l[2] - (int32_t)s->_l[3]; | |
28769 | } | |
28770 | ||
28771 | void helper_phsubsw_xmm (XMMReg *d, XMMReg *s) | |
28772 | { | |
28773 | d->_w[0] = satsw((int16_t)d->_w[0] - (int16_t)d->_w[1]); | |
28774 | d->_w[1] = satsw((int16_t)d->_w[2] - (int16_t)d->_w[3]); | |
28775 | d->_w[2] = satsw((int16_t)d->_w[4] - (int16_t)d->_w[5]); | |
28776 | d->_w[3] = satsw((int16_t)d->_w[6] - (int16_t)d->_w[7]); | |
28777 | d->_w[(2 << 1) + 0] = satsw((int16_t)s->_w[0] - (int16_t)s->_w[1]); | |
28778 | d->_w[(2 << 1) + 1] = satsw((int16_t)s->_w[2] - (int16_t)s->_w[3]); | |
28779 | d->_w[6] = satsw((int16_t)s->_w[4] - (int16_t)s->_w[5]); | |
28780 | d->_w[7] = satsw((int16_t)s->_w[6] - (int16_t)s->_w[7]); | |
28781 | } | |
28782 | ||
28783 | ||
28784 | ||
28785 | ||
28786 | void helper_pabsb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = s->_b[0] > (127) ? -(int8_t ) s->_b[0] : s->_b[0]; d->_b[1] = s->_b[1] > (127) ? -(int8_t ) s->_b[1] : s->_b[1]; d->_b[2] = s->_b[2] > (127) ? -(int8_t ) s->_b[2] : s->_b[2]; d->_b[3] = s->_b[3] > (127) ? -(int8_t ) s->_b[3] : s->_b[3]; d->_b[4] = s->_b[4] > (127) ? -(int8_t ) s->_b[4] : s->_b[4]; d->_b[5] = s->_b[5] > (127) ? -(int8_t ) s->_b[5] : s->_b[5]; d->_b[6] = s->_b[6] > (127) ? -(int8_t ) s->_b[6] : s->_b[6]; d->_b[7] = s->_b[7] > (127) ? -(int8_t ) s->_b[7] : s->_b[7]; d->_b[8] = s->_b[8] > (127) ? -(int8_t ) s->_b[8] : s->_b[8]; d->_b[9] = s->_b[9] > (127) ? -(int8_t ) s->_b[9] : s->_b[9]; d->_b[10] = s->_b[10] > (127) ? -(int8_t ) s->_b[10] : s->_b[10]; d->_b[11] = s->_b[11] > (127) ? -(int8_t ) s->_b[11] : s->_b[11]; d->_b[12] = s->_b[12] > (127) ? -(int8_t ) s->_b[12] : s->_b[12]; d->_b[13] = s->_b[13] > (127) ? -(int8_t ) s->_b[13] : s->_b[13]; d->_b[14] = s->_b[14] > (127) ? -(int8_t ) s->_b[14] : s->_b[14]; d->_b[15] = s->_b[15] > (127) ? -(int8_t ) s->_b[15] : s->_b[15];} | |
28787 | void helper_pabsw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = s->_w[0] > (32767) ? -(int16_t) s->_w[0] : s->_w[0]; d->_w[1] = s->_w[1] > (32767) ? -(int16_t) s->_w[1] : s->_w[1]; d->_w[2] = s->_w[2] > (32767) ? -(int16_t) s->_w[2] : s->_w[2]; d->_w[3] = s->_w[3] > (32767) ? -(int16_t) s->_w[3] : s->_w[3]; d->_w[4] = s->_w[4] > (32767) ? -(int16_t) s->_w[4] : s->_w[4]; d->_w[5] = s->_w[5] > (32767) ? -(int16_t) s->_w[5] : s->_w[5]; d->_w[6] = s->_w[6] > (32767) ? -(int16_t) s->_w[6] : s->_w[6]; d->_w[7] = s->_w[7] > (32767) ? -(int16_t) s->_w[7] : s->_w[7];} | |
28788 | void helper_pabsd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = s->_l[0] > (2147483647) ? -(int32_t) s->_l[0] : s->_l[0]; d->_l[1] = s->_l[1] > (2147483647) ? -(int32_t) s->_l[1] : s->_l[1]; d->_l[2] = s->_l[2] > (2147483647) ? -(int32_t) s->_l[2] : s->_l[2]; d->_l[3] = s->_l[3] > (2147483647) ? -(int32_t) s->_l[3] : s->_l[3];} | |
28789 | ||
28790 | ||
28791 | void helper_pmulhrsw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = ((int16_t) d->_w[0] * (int16_t) s->_w[0] + 0x4000) >> 15; d->_w[1] = ((int16_t) d->_w[1] * (int16_t) s->_w[1] + 0x4000) >> 15; d->_w[2] = ((int16_t) d->_w[2] * (int16_t) s->_w[2] + 0x4000) >> 15; d->_w[3] = ((int16_t) d->_w[3] * (int16_t) s->_w[3] + 0x4000) >> 15; d->_w[4] = ((int16_t) d->_w[4] * (int16_t) s->_w[4] + 0x4000) >> 15; d->_w[5] = ((int16_t) d->_w[5] * (int16_t) s->_w[5] + 0x4000) >> 15; d->_w[6] = ((int16_t) d->_w[6] * (int16_t) s->_w[6] + 0x4000) >> 15; d->_w[7] = ((int16_t) d->_w[7] * (int16_t) s->_w[7] + 0x4000) >> 15;} | |
28792 | ||
28793 | ||
28794 | ||
28795 | ||
28796 | void helper_psignb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = s->_b[0] <= (127) ? s->_b[0] ? d->_b[0] : 0 : -(int8_t ) d->_b[0]; d->_b[1] = s->_b[1] <= (127) ? s->_b[1] ? d->_b[1] : 0 : -(int8_t ) d->_b[1]; d->_b[2] = s->_b[2] <= (127) ? s->_b[2] ? d->_b[2] : 0 : -(int8_t ) d->_b[2]; d->_b[3] = s->_b[3] <= (127) ? s->_b[3] ? d->_b[3] : 0 : -(int8_t ) d->_b[3]; d->_b[4] = s->_b[4] <= (127) ? s->_b[4] ? d->_b[4] : 0 : -(int8_t ) d->_b[4]; d->_b[5] = s->_b[5] <= (127) ? s->_b[5] ? d->_b[5] : 0 : -(int8_t ) d->_b[5]; d->_b[6] = s->_b[6] <= (127) ? s->_b[6] ? d->_b[6] : 0 : -(int8_t ) d->_b[6]; d->_b[7] = s->_b[7] <= (127) ? s->_b[7] ? d->_b[7] : 0 : -(int8_t ) d->_b[7]; d->_b[8] = s->_b[8] <= (127) ? s->_b[8] ? d->_b[8] : 0 : -(int8_t ) d->_b[8]; d->_b[9] = s->_b[9] <= (127) ? s->_b[9] ? d->_b[9] : 0 : -(int8_t ) d->_b[9]; d->_b[10] = s->_b[10] <= (127) ? s->_b[10] ? d->_b[10] : 0 : -(int8_t ) d->_b[10]; d->_b[11] = s->_b[11] <= (127) ? s->_b[11] ? d->_b[11] : 0 : -(int8_t ) d->_b[11]; d->_b[12] = s->_b[12] <= (127) ? s->_b[12] ? d->_b[12] : 0 : -(int8_t ) d->_b[12]; d->_b[13] = s->_b[13] <= (127) ? s->_b[13] ? d->_b[13] : 0 : -(int8_t ) d->_b[13]; d->_b[14] = s->_b[14] <= (127) ? s->_b[14] ? d->_b[14] : 0 : -(int8_t ) d->_b[14]; d->_b[15] = s->_b[15] <= (127) ? s->_b[15] ? d->_b[15] : 0 : -(int8_t ) d->_b[15];} | |
28797 | void helper_psignw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = s->_w[0] <= (32767) ? s->_w[0] ? d->_w[0] : 0 : -(int16_t) d->_w[0]; d->_w[1] = s->_w[1] <= (32767) ? s->_w[1] ? d->_w[1] : 0 : -(int16_t) d->_w[1]; d->_w[2] = s->_w[2] <= (32767) ? s->_w[2] ? d->_w[2] : 0 : -(int16_t) d->_w[2]; d->_w[3] = s->_w[3] <= (32767) ? s->_w[3] ? d->_w[3] : 0 : -(int16_t) d->_w[3]; d->_w[4] = s->_w[4] <= (32767) ? s->_w[4] ? d->_w[4] : 0 : -(int16_t) d->_w[4]; d->_w[5] = s->_w[5] <= (32767) ? s->_w[5] ? d->_w[5] : 0 : -(int16_t) d->_w[5]; d->_w[6] = s->_w[6] <= (32767) ? s->_w[6] ? d->_w[6] : 0 : -(int16_t) d->_w[6]; d->_w[7] = s->_w[7] <= (32767) ? s->_w[7] ? d->_w[7] : 0 : -(int16_t) d->_w[7];} | |
28798 | void helper_psignd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = s->_l[0] <= (2147483647) ? s->_l[0] ? d->_l[0] : 0 : -(int32_t) d->_l[0]; d->_l[1] = s->_l[1] <= (2147483647) ? s->_l[1] ? d->_l[1] : 0 : -(int32_t) d->_l[1]; d->_l[2] = s->_l[2] <= (2147483647) ? s->_l[2] ? d->_l[2] : 0 : -(int32_t) d->_l[2]; d->_l[3] = s->_l[3] <= (2147483647) ? s->_l[3] ? d->_l[3] : 0 : -(int32_t) d->_l[3];} | |
28799 | ||
28800 | void helper_palignr_xmm (XMMReg *d, XMMReg *s, int32_t shift) | |
28801 | { | |
28802 | XMMReg r; | |
28803 | ||
28804 | ||
28805 | if (shift >= (16 << 1)) { | |
28806 | r._q[0] = 0; | |
28807 | r._q[1] = 0; | |
28808 | } else { | |
28809 | shift <<= 3; | |
28810 | ||
28811 | ||
28812 | ||
28813 | ||
28814 | ||
28815 | r._q[0] = (shift - 0 < 64 && shift - 0 > -64 ? shift - 0 > 0 ? s->_q[0] >> (shift - 0) : (s->_q[0] << -(shift - 0)) : 0) | | |
28816 | (shift - 64 < 64 && shift - 64 > -64 ? shift - 64 > 0 ? s->_q[1] >> (shift - 64) : (s->_q[1] << -(shift - 64)) : 0) | | |
28817 | (shift - 128 < 64 && shift - 128 > -64 ? shift - 128 > 0 ? d->_q[0] >> (shift - 128) : (d->_q[0] << -(shift - 128)) : 0) | | |
28818 | (shift - 192 < 64 && shift - 192 > -64 ? shift - 192 > 0 ? d->_q[1] >> (shift - 192) : (d->_q[1] << -(shift - 192)) : 0); | |
28819 | r._q[1] = (shift + 64 < 64 && shift + 64 > -64 ? shift + 64 > 0 ? s->_q[0] >> (shift + 64) : (s->_q[0] << -(shift + 64)) : 0) | | |
28820 | (shift - 0 < 64 && shift - 0 > -64 ? shift - 0 > 0 ? s->_q[1] >> (shift - 0) : (s->_q[1] << -(shift - 0)) : 0) | | |
28821 | (shift - 64 < 64 && shift - 64 > -64 ? shift - 64 > 0 ? d->_q[0] >> (shift - 64) : (d->_q[0] << -(shift - 64)) : 0) | | |
28822 | (shift - 128 < 64 && shift - 128 > -64 ? shift - 128 > 0 ? d->_q[1] >> (shift - 128) : (d->_q[1] << -(shift - 128)) : 0); | |
28823 | ||
28824 | ||
28825 | } | |
28826 | ||
28827 | *d = r; | |
28828 | } | |
28829 | # 1531 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28830 | void helper_pblendvb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = (env->xmm_regs[0]._b[0] & 0x80) ? s->_b[0] : d->_b[0]; d->_b[1] = (env->xmm_regs[0]._b[1] & 0x80) ? s->_b[1] : d->_b[1]; if (16 > 2) { d->_b[2] = (env->xmm_regs[0]._b[2] & 0x80) ? s->_b[2] : d->_b[2]; d->_b[3] = (env->xmm_regs[0]._b[3] & 0x80) ? s->_b[3] : d->_b[3]; if (16 > 4) { d->_b[4] = (env->xmm_regs[0]._b[4] & 0x80) ? s->_b[4] : d->_b[4]; d->_b[5] = (env->xmm_regs[0]._b[5] & 0x80) ? s->_b[5] : d->_b[5]; d->_b[6] = (env->xmm_regs[0]._b[6] & 0x80) ? s->_b[6] : d->_b[6]; d->_b[7] = (env->xmm_regs[0]._b[7] & 0x80) ? s->_b[7] : d->_b[7]; if (16 > 8) { d->_b[8] = (env->xmm_regs[0]._b[8] & 0x80) ? s->_b[8] : d->_b[8]; d->_b[9] = (env->xmm_regs[0]._b[9] & 0x80) ? s->_b[9] : d->_b[9]; d->_b[10] = (env->xmm_regs[0]._b[10] & 0x80) ? s->_b[10] : d->_b[10]; d->_b[11] = (env->xmm_regs[0]._b[11] & 0x80) ? s->_b[11] : d->_b[11]; d->_b[12] = (env->xmm_regs[0]._b[12] & 0x80) ? s->_b[12] : d->_b[12]; d->_b[13] = (env->xmm_regs[0]._b[13] & 0x80) ? s->_b[13] : d->_b[13]; d->_b[14] = (env->xmm_regs[0]._b[14] & 0x80) ? s->_b[14] : d->_b[14]; d->_b[15] = (env->xmm_regs[0]._b[15] & 0x80) ? s->_b[15] : d->_b[15]; } } }} | |
28831 | void helper_blendvps_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (env->xmm_regs[0]._l[0] & 0x80000000) ? s->_l[0] : d->_l[0]; d->_l[1] = (env->xmm_regs[0]._l[1] & 0x80000000) ? s->_l[1] : d->_l[1]; if (4 > 2) { d->_l[2] = (env->xmm_regs[0]._l[2] & 0x80000000) ? s->_l[2] : d->_l[2]; d->_l[3] = (env->xmm_regs[0]._l[3] & 0x80000000) ? s->_l[3] : d->_l[3]; if (4 > 4) { d->_l[4] = (env->xmm_regs[0]._l[4] & 0x80000000) ? s->_l[4] : d->_l[4]; d->_l[5] = (env->xmm_regs[0]._l[5] & 0x80000000) ? s->_l[5] : d->_l[5]; d->_l[6] = (env->xmm_regs[0]._l[6] & 0x80000000) ? s->_l[6] : d->_l[6]; d->_l[7] = (env->xmm_regs[0]._l[7] & 0x80000000) ? s->_l[7] : d->_l[7]; if (4 > 8) { d->_l[8] = (env->xmm_regs[0]._l[8] & 0x80000000) ? s->_l[8] : d->_l[8]; d->_l[9] = (env->xmm_regs[0]._l[9] & 0x80000000) ? s->_l[9] : d->_l[9]; d->_l[10] = (env->xmm_regs[0]._l[10] & 0x80000000) ? s->_l[10] : d->_l[10]; d->_l[11] = (env->xmm_regs[0]._l[11] & 0x80000000) ? s->_l[11] : d->_l[11]; d->_l[12] = (env->xmm_regs[0]._l[12] & 0x80000000) ? s->_l[12] : d->_l[12]; d->_l[13] = (env->xmm_regs[0]._l[13] & 0x80000000) ? s->_l[13] : d->_l[13]; d->_l[14] = (env->xmm_regs[0]._l[14] & 0x80000000) ? s->_l[14] : d->_l[14]; d->_l[15] = (env->xmm_regs[0]._l[15] & 0x80000000) ? s->_l[15] : d->_l[15]; } } }} | |
28832 | void helper_blendvpd_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (env->xmm_regs[0]._q[0] & 0x8000000000000000LL) ? s->_q[0] : d->_q[0]; d->_q[1] = (env->xmm_regs[0]._q[1] & 0x8000000000000000LL) ? s->_q[1] : d->_q[1]; if (2 > 2) { d->_q[2] = (env->xmm_regs[0]._q[2] & 0x8000000000000000LL) ? s->_q[2] : d->_q[2]; d->_q[3] = (env->xmm_regs[0]._q[3] & 0x8000000000000000LL) ? s->_q[3] : d->_q[3]; if (2 > 4) { d->_q[4] = (env->xmm_regs[0]._q[4] & 0x8000000000000000LL) ? s->_q[4] : d->_q[4]; d->_q[5] = (env->xmm_regs[0]._q[5] & 0x8000000000000000LL) ? s->_q[5] : d->_q[5]; d->_q[6] = (env->xmm_regs[0]._q[6] & 0x8000000000000000LL) ? s->_q[6] : d->_q[6]; d->_q[7] = (env->xmm_regs[0]._q[7] & 0x8000000000000000LL) ? s->_q[7] : d->_q[7]; if (2 > 8) { d->_q[8] = (env->xmm_regs[0]._q[8] & 0x8000000000000000LL) ? s->_q[8] : d->_q[8]; d->_q[9] = (env->xmm_regs[0]._q[9] & 0x8000000000000000LL) ? s->_q[9] : d->_q[9]; d->_q[10] = (env->xmm_regs[0]._q[10] & 0x8000000000000000LL) ? s->_q[10] : d->_q[10]; d->_q[11] = (env->xmm_regs[0]._q[11] & 0x8000000000000000LL) ? s->_q[11] : d->_q[11]; d->_q[12] = (env->xmm_regs[0]._q[12] & 0x8000000000000000LL) ? s->_q[12] : d->_q[12]; d->_q[13] = (env->xmm_regs[0]._q[13] & 0x8000000000000000LL) ? s->_q[13] : d->_q[13]; d->_q[14] = (env->xmm_regs[0]._q[14] & 0x8000000000000000LL) ? s->_q[14] : d->_q[14]; d->_q[15] = (env->xmm_regs[0]._q[15] & 0x8000000000000000LL) ? s->_q[15] : d->_q[15]; } } }} | |
28833 | ||
28834 | void helper_ptest_xmm (XMMReg *d, XMMReg *s) | |
28835 | { | |
28836 | uint64_t zf = (s->_q[0] & d->_q[0]) | (s->_q[1] & d->_q[1]); | |
28837 | uint64_t cf = (s->_q[0] & ~d->_q[0]) | (s->_q[1] & ~d->_q[1]); | |
28838 | ||
28839 | (env->cc_src) = (zf ? 0 : 0x0040) | (cf ? 0 : 0x0001); | |
28840 | } | |
28841 | # 1560 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28842 | void helper_pmovsxbw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (int8_t) s->_b[0]; d->_w[1] = (int8_t) s->_b[1]; if (8 > 2) { d->_w[2] = (int8_t) s->_b[2]; d->_w[3] = (int8_t) s->_b[3]; if (8 > 4) { d->_w[4] = (int8_t) s->_b[4]; d->_w[5] = (int8_t) s->_b[5]; d->_w[6] = (int8_t) s->_b[6]; d->_w[7] = (int8_t) s->_b[7]; } }} | |
28843 | void helper_pmovsxbd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (int8_t) s->_b[0]; d->_l[1] = (int8_t) s->_b[1]; if (4 > 2) { d->_l[2] = (int8_t) s->_b[2]; d->_l[3] = (int8_t) s->_b[3]; if (4 > 4) { d->_l[4] = (int8_t) s->_b[4]; d->_l[5] = (int8_t) s->_b[5]; d->_l[6] = (int8_t) s->_b[6]; d->_l[7] = (int8_t) s->_b[7]; } }} | |
28844 | void helper_pmovsxbq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (int8_t) s->_b[0]; d->_q[1] = (int8_t) s->_b[1]; if (2 > 2) { d->_q[2] = (int8_t) s->_b[2]; d->_q[3] = (int8_t) s->_b[3]; if (2 > 4) { d->_q[4] = (int8_t) s->_b[4]; d->_q[5] = (int8_t) s->_b[5]; d->_q[6] = (int8_t) s->_b[6]; d->_q[7] = (int8_t) s->_b[7]; } }} | |
28845 | void helper_pmovsxwd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (int16_t) s->_w[0]; d->_l[1] = (int16_t) s->_w[1]; if (4 > 2) { d->_l[2] = (int16_t) s->_w[2]; d->_l[3] = (int16_t) s->_w[3]; if (4 > 4) { d->_l[4] = (int16_t) s->_w[4]; d->_l[5] = (int16_t) s->_w[5]; d->_l[6] = (int16_t) s->_w[6]; d->_l[7] = (int16_t) s->_w[7]; } }} | |
28846 | void helper_pmovsxwq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (int16_t) s->_w[0]; d->_q[1] = (int16_t) s->_w[1]; if (2 > 2) { d->_q[2] = (int16_t) s->_w[2]; d->_q[3] = (int16_t) s->_w[3]; if (2 > 4) { d->_q[4] = (int16_t) s->_w[4]; d->_q[5] = (int16_t) s->_w[5]; d->_q[6] = (int16_t) s->_w[6]; d->_q[7] = (int16_t) s->_w[7]; } }} | |
28847 | void helper_pmovsxdq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (int32_t) s->_l[0]; d->_q[1] = (int32_t) s->_l[1]; if (2 > 2) { d->_q[2] = (int32_t) s->_l[2]; d->_q[3] = (int32_t) s->_l[3]; if (2 > 4) { d->_q[4] = (int32_t) s->_l[4]; d->_q[5] = (int32_t) s->_l[5]; d->_q[6] = (int32_t) s->_l[6]; d->_q[7] = (int32_t) s->_l[7]; } }} | |
28848 | void helper_pmovzxbw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = s->_b[0]; d->_w[1] = s->_b[1]; if (8 > 2) { d->_w[2] = s->_b[2]; d->_w[3] = s->_b[3]; if (8 > 4) { d->_w[4] = s->_b[4]; d->_w[5] = s->_b[5]; d->_w[6] = s->_b[6]; d->_w[7] = s->_b[7]; } }} | |
28849 | void helper_pmovzxbd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = s->_b[0]; d->_l[1] = s->_b[1]; if (4 > 2) { d->_l[2] = s->_b[2]; d->_l[3] = s->_b[3]; if (4 > 4) { d->_l[4] = s->_b[4]; d->_l[5] = s->_b[5]; d->_l[6] = s->_b[6]; d->_l[7] = s->_b[7]; } }} | |
28850 | void helper_pmovzxbq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = s->_b[0]; d->_q[1] = s->_b[1]; if (2 > 2) { d->_q[2] = s->_b[2]; d->_q[3] = s->_b[3]; if (2 > 4) { d->_q[4] = s->_b[4]; d->_q[5] = s->_b[5]; d->_q[6] = s->_b[6]; d->_q[7] = s->_b[7]; } }} | |
28851 | void helper_pmovzxwd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = s->_w[0]; d->_l[1] = s->_w[1]; if (4 > 2) { d->_l[2] = s->_w[2]; d->_l[3] = s->_w[3]; if (4 > 4) { d->_l[4] = s->_w[4]; d->_l[5] = s->_w[5]; d->_l[6] = s->_w[6]; d->_l[7] = s->_w[7]; } }} | |
28852 | void helper_pmovzxwq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = s->_w[0]; d->_q[1] = s->_w[1]; if (2 > 2) { d->_q[2] = s->_w[2]; d->_q[3] = s->_w[3]; if (2 > 4) { d->_q[4] = s->_w[4]; d->_q[5] = s->_w[5]; d->_q[6] = s->_w[6]; d->_q[7] = s->_w[7]; } }} | |
28853 | void helper_pmovzxdq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = s->_l[0]; d->_q[1] = s->_l[1]; if (2 > 2) { d->_q[2] = s->_l[2]; d->_q[3] = s->_l[3]; if (2 > 4) { d->_q[4] = s->_l[4]; d->_q[5] = s->_l[5]; d->_q[6] = s->_l[6]; d->_q[7] = s->_l[7]; } }} | |
28854 | ||
28855 | void helper_pmuldq_xmm (XMMReg *d, XMMReg *s) | |
28856 | { | |
28857 | d->_q[0] = (int64_t) (int32_t) d->_l[0] * (int32_t) s->_l[0]; | |
28858 | d->_q[1] = (int64_t) (int32_t) d->_l[2] * (int32_t) s->_l[2]; | |
28859 | } | |
28860 | ||
28861 | ||
28862 | void helper_pcmpeqq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = d->_q[0] == s->_q[0] ? -1 : 0; d->_q[1] = d->_q[1] == s->_q[1] ? -1 : 0;} | |
28863 | ||
28864 | void helper_packusdw_xmm (XMMReg *d, XMMReg *s) | |
28865 | { | |
28866 | d->_w[0] = satuw((int32_t) d->_l[0]); | |
28867 | d->_w[1] = satuw((int32_t) d->_l[1]); | |
28868 | d->_w[2] = satuw((int32_t) d->_l[2]); | |
28869 | d->_w[3] = satuw((int32_t) d->_l[3]); | |
28870 | d->_w[4] = satuw((int32_t) s->_l[0]); | |
28871 | d->_w[5] = satuw((int32_t) s->_l[1]); | |
28872 | d->_w[6] = satuw((int32_t) s->_l[2]); | |
28873 | d->_w[7] = satuw((int32_t) s->_l[3]); | |
28874 | } | |
28875 | ||
28876 | ||
28877 | ||
28878 | ||
28879 | ||
28880 | void helper_pminsb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((((int8_t) d->_b[0]) < ((int8_t) s->_b[0])) ? ((int8_t) d->_b[0]) : ((int8_t) s->_b[0])); d->_b[1] = ((((int8_t) d->_b[1]) < ((int8_t) s->_b[1])) ? ((int8_t) d->_b[1]) : ((int8_t) s->_b[1])); d->_b[2] = ((((int8_t) d->_b[2]) < ((int8_t) s->_b[2])) ? ((int8_t) d->_b[2]) : ((int8_t) s->_b[2])); d->_b[3] = ((((int8_t) d->_b[3]) < ((int8_t) s->_b[3])) ? ((int8_t) d->_b[3]) : ((int8_t) s->_b[3])); d->_b[4] = ((((int8_t) d->_b[4]) < ((int8_t) s->_b[4])) ? ((int8_t) d->_b[4]) : ((int8_t) s->_b[4])); d->_b[5] = ((((int8_t) d->_b[5]) < ((int8_t) s->_b[5])) ? ((int8_t) d->_b[5]) : ((int8_t) s->_b[5])); d->_b[6] = ((((int8_t) d->_b[6]) < ((int8_t) s->_b[6])) ? ((int8_t) d->_b[6]) : ((int8_t) s->_b[6])); d->_b[7] = ((((int8_t) d->_b[7]) < ((int8_t) s->_b[7])) ? ((int8_t) d->_b[7]) : ((int8_t) s->_b[7])); d->_b[8] = ((((int8_t) d->_b[8]) < ((int8_t) s->_b[8])) ? ((int8_t) d->_b[8]) : ((int8_t) s->_b[8])); d->_b[9] = ((((int8_t) d->_b[9]) < ((int8_t) s->_b[9])) ? ((int8_t) d->_b[9]) : ((int8_t) s->_b[9])); d->_b[10] = ((((int8_t) d->_b[10]) < ((int8_t) s->_b[10])) ? ((int8_t) d->_b[10]) : ((int8_t) s->_b[10])); d->_b[11] = ((((int8_t) d->_b[11]) < ((int8_t) s->_b[11])) ? ((int8_t) d->_b[11]) : ((int8_t) s->_b[11])); d->_b[12] = ((((int8_t) d->_b[12]) < ((int8_t) s->_b[12])) ? ((int8_t) d->_b[12]) : ((int8_t) s->_b[12])); d->_b[13] = ((((int8_t) d->_b[13]) < ((int8_t) s->_b[13])) ? ((int8_t) d->_b[13]) : ((int8_t) s->_b[13])); d->_b[14] = ((((int8_t) d->_b[14]) < ((int8_t) s->_b[14])) ? ((int8_t) d->_b[14]) : ((int8_t) s->_b[14])); d->_b[15] = ((((int8_t) d->_b[15]) < ((int8_t) s->_b[15])) ? ((int8_t) d->_b[15]) : ((int8_t) s->_b[15]));} | |
28881 | void helper_pminsd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = ((((int32_t) d->_l[0]) < ((int32_t) s->_l[0])) ? ((int32_t) d->_l[0]) : ((int32_t) s->_l[0])); d->_l[1] = ((((int32_t) d->_l[1]) < ((int32_t) s->_l[1])) ? ((int32_t) d->_l[1]) : ((int32_t) s->_l[1])); d->_l[2] = ((((int32_t) d->_l[2]) < ((int32_t) s->_l[2])) ? ((int32_t) d->_l[2]) : ((int32_t) s->_l[2])); d->_l[3] = ((((int32_t) d->_l[3]) < ((int32_t) s->_l[3])) ? ((int32_t) d->_l[3]) : ((int32_t) s->_l[3]));} | |
28882 | void helper_pminuw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (((d->_w[0]) < (s->_w[0])) ? (d->_w[0]) : (s->_w[0])); d->_w[1] = (((d->_w[1]) < (s->_w[1])) ? (d->_w[1]) : (s->_w[1])); d->_w[2] = (((d->_w[2]) < (s->_w[2])) ? (d->_w[2]) : (s->_w[2])); d->_w[3] = (((d->_w[3]) < (s->_w[3])) ? (d->_w[3]) : (s->_w[3])); d->_w[4] = (((d->_w[4]) < (s->_w[4])) ? (d->_w[4]) : (s->_w[4])); d->_w[5] = (((d->_w[5]) < (s->_w[5])) ? (d->_w[5]) : (s->_w[5])); d->_w[6] = (((d->_w[6]) < (s->_w[6])) ? (d->_w[6]) : (s->_w[6])); d->_w[7] = (((d->_w[7]) < (s->_w[7])) ? (d->_w[7]) : (s->_w[7]));} | |
28883 | void helper_pminud_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (((d->_l[0]) < (s->_l[0])) ? (d->_l[0]) : (s->_l[0])); d->_l[1] = (((d->_l[1]) < (s->_l[1])) ? (d->_l[1]) : (s->_l[1])); d->_l[2] = (((d->_l[2]) < (s->_l[2])) ? (d->_l[2]) : (s->_l[2])); d->_l[3] = (((d->_l[3]) < (s->_l[3])) ? (d->_l[3]) : (s->_l[3]));} | |
28884 | void helper_pmaxsb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((((int8_t) d->_b[0]) > ((int8_t) s->_b[0])) ? ((int8_t) d->_b[0]) : ((int8_t) s->_b[0])); d->_b[1] = ((((int8_t) d->_b[1]) > ((int8_t) s->_b[1])) ? ((int8_t) d->_b[1]) : ((int8_t) s->_b[1])); d->_b[2] = ((((int8_t) d->_b[2]) > ((int8_t) s->_b[2])) ? ((int8_t) d->_b[2]) : ((int8_t) s->_b[2])); d->_b[3] = ((((int8_t) d->_b[3]) > ((int8_t) s->_b[3])) ? ((int8_t) d->_b[3]) : ((int8_t) s->_b[3])); d->_b[4] = ((((int8_t) d->_b[4]) > ((int8_t) s->_b[4])) ? ((int8_t) d->_b[4]) : ((int8_t) s->_b[4])); d->_b[5] = ((((int8_t) d->_b[5]) > ((int8_t) s->_b[5])) ? ((int8_t) d->_b[5]) : ((int8_t) s->_b[5])); d->_b[6] = ((((int8_t) d->_b[6]) > ((int8_t) s->_b[6])) ? ((int8_t) d->_b[6]) : ((int8_t) s->_b[6])); d->_b[7] = ((((int8_t) d->_b[7]) > ((int8_t) s->_b[7])) ? ((int8_t) d->_b[7]) : ((int8_t) s->_b[7])); d->_b[8] = ((((int8_t) d->_b[8]) > ((int8_t) s->_b[8])) ? ((int8_t) d->_b[8]) : ((int8_t) s->_b[8])); d->_b[9] = ((((int8_t) d->_b[9]) > ((int8_t) s->_b[9])) ? ((int8_t) d->_b[9]) : ((int8_t) s->_b[9])); d->_b[10] = ((((int8_t) d->_b[10]) > ((int8_t) s->_b[10])) ? ((int8_t) d->_b[10]) : ((int8_t) s->_b[10])); d->_b[11] = ((((int8_t) d->_b[11]) > ((int8_t) s->_b[11])) ? ((int8_t) d->_b[11]) : ((int8_t) s->_b[11])); d->_b[12] = ((((int8_t) d->_b[12]) > ((int8_t) s->_b[12])) ? ((int8_t) d->_b[12]) : ((int8_t) s->_b[12])); d->_b[13] = ((((int8_t) d->_b[13]) > ((int8_t) s->_b[13])) ? ((int8_t) d->_b[13]) : ((int8_t) s->_b[13])); d->_b[14] = ((((int8_t) d->_b[14]) > ((int8_t) s->_b[14])) ? ((int8_t) d->_b[14]) : ((int8_t) s->_b[14])); d->_b[15] = ((((int8_t) d->_b[15]) > ((int8_t) s->_b[15])) ? ((int8_t) d->_b[15]) : ((int8_t) s->_b[15]));} | |
28885 | void helper_pmaxsd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = ((((int32_t) d->_l[0]) > ((int32_t) s->_l[0])) ? ((int32_t) d->_l[0]) : ((int32_t) s->_l[0])); d->_l[1] = ((((int32_t) d->_l[1]) > ((int32_t) s->_l[1])) ? ((int32_t) d->_l[1]) : ((int32_t) s->_l[1])); d->_l[2] = ((((int32_t) d->_l[2]) > ((int32_t) s->_l[2])) ? ((int32_t) d->_l[2]) : ((int32_t) s->_l[2])); d->_l[3] = ((((int32_t) d->_l[3]) > ((int32_t) s->_l[3])) ? ((int32_t) d->_l[3]) : ((int32_t) s->_l[3]));} | |
28886 | void helper_pmaxuw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (((d->_w[0]) > (s->_w[0])) ? (d->_w[0]) : (s->_w[0])); d->_w[1] = (((d->_w[1]) > (s->_w[1])) ? (d->_w[1]) : (s->_w[1])); d->_w[2] = (((d->_w[2]) > (s->_w[2])) ? (d->_w[2]) : (s->_w[2])); d->_w[3] = (((d->_w[3]) > (s->_w[3])) ? (d->_w[3]) : (s->_w[3])); d->_w[4] = (((d->_w[4]) > (s->_w[4])) ? (d->_w[4]) : (s->_w[4])); d->_w[5] = (((d->_w[5]) > (s->_w[5])) ? (d->_w[5]) : (s->_w[5])); d->_w[6] = (((d->_w[6]) > (s->_w[6])) ? (d->_w[6]) : (s->_w[6])); d->_w[7] = (((d->_w[7]) > (s->_w[7])) ? (d->_w[7]) : (s->_w[7]));} | |
28887 | void helper_pmaxud_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (((d->_l[0]) > (s->_l[0])) ? (d->_l[0]) : (s->_l[0])); d->_l[1] = (((d->_l[1]) > (s->_l[1])) ? (d->_l[1]) : (s->_l[1])); d->_l[2] = (((d->_l[2]) > (s->_l[2])) ? (d->_l[2]) : (s->_l[2])); d->_l[3] = (((d->_l[3]) > (s->_l[3])) ? (d->_l[3]) : (s->_l[3]));} | |
28888 | ||
28889 | ||
28890 | void helper_pmulld_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (int32_t) d->_l[0] * (int32_t) s->_l[0]; d->_l[1] = (int32_t) d->_l[1] * (int32_t) s->_l[1]; d->_l[2] = (int32_t) d->_l[2] * (int32_t) s->_l[2]; d->_l[3] = (int32_t) d->_l[3] * (int32_t) s->_l[3];} | |
28891 | ||
28892 | void helper_phminposuw_xmm (XMMReg *d, XMMReg *s) | |
28893 | { | |
28894 | int idx = 0; | |
28895 | ||
28896 | if (s->_w[1] < s->_w[idx]) | |
28897 | idx = 1; | |
28898 | if (s->_w[2] < s->_w[idx]) | |
28899 | idx = 2; | |
28900 | if (s->_w[3] < s->_w[idx]) | |
28901 | idx = 3; | |
28902 | if (s->_w[4] < s->_w[idx]) | |
28903 | idx = 4; | |
28904 | if (s->_w[5] < s->_w[idx]) | |
28905 | idx = 5; | |
28906 | if (s->_w[6] < s->_w[idx]) | |
28907 | idx = 6; | |
28908 | if (s->_w[7] < s->_w[idx]) | |
28909 | idx = 7; | |
28910 | ||
28911 | d->_q[1] = 0; | |
28912 | d->_l[1] = 0; | |
28913 | d->_w[1] = idx; | |
28914 | d->_w[0] = s->_w[idx]; | |
28915 | } | |
28916 | ||
28917 | void helper_roundps_xmm (XMMReg *d, XMMReg *s, uint32_t mode) | |
28918 | { | |
28919 | signed char prev_rounding_mode; | |
28920 | ||
28921 | prev_rounding_mode = env->sse_status.float_rounding_mode; | |
28922 | if (!(mode & (1 << 2))) | |
28923 | switch (mode & 3) { | |
28924 | case 0: | |
28925 | set_float_rounding_mode(float_round_nearest_even, &env->sse_status); | |
28926 | break; | |
28927 | case 1: | |
28928 | set_float_rounding_mode(float_round_down, &env->sse_status); | |
28929 | break; | |
28930 | case 2: | |
28931 | set_float_rounding_mode(float_round_up, &env->sse_status); | |
28932 | break; | |
28933 | case 3: | |
28934 | set_float_rounding_mode(float_round_to_zero, &env->sse_status); | |
28935 | break; | |
28936 | } | |
28937 | ||
28938 | d->_s[0] = float32_round_to_int(s->_s[0], &env->sse_status); | |
28939 | d->_s[1] = float32_round_to_int(s->_s[1], &env->sse_status); | |
28940 | d->_s[2] = float32_round_to_int(s->_s[2], &env->sse_status); | |
28941 | d->_s[3] = float32_round_to_int(s->_s[3], &env->sse_status); | |
28942 | # 1668 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28943 | env->sse_status.float_rounding_mode = prev_rounding_mode; | |
28944 | } | |
28945 | ||
28946 | void helper_roundpd_xmm (XMMReg *d, XMMReg *s, uint32_t mode) | |
28947 | { | |
28948 | signed char prev_rounding_mode; | |
28949 | ||
28950 | prev_rounding_mode = env->sse_status.float_rounding_mode; | |
28951 | if (!(mode & (1 << 2))) | |
28952 | switch (mode & 3) { | |
28953 | case 0: | |
28954 | set_float_rounding_mode(float_round_nearest_even, &env->sse_status); | |
28955 | break; | |
28956 | case 1: | |
28957 | set_float_rounding_mode(float_round_down, &env->sse_status); | |
28958 | break; | |
28959 | case 2: | |
28960 | set_float_rounding_mode(float_round_up, &env->sse_status); | |
28961 | break; | |
28962 | case 3: | |
28963 | set_float_rounding_mode(float_round_to_zero, &env->sse_status); | |
28964 | break; | |
28965 | } | |
28966 | ||
28967 | d->_d[0] = float64_round_to_int(s->_d[0], &env->sse_status); | |
28968 | d->_d[1] = float64_round_to_int(s->_d[1], &env->sse_status); | |
28969 | # 1702 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28970 | env->sse_status.float_rounding_mode = prev_rounding_mode; | |
28971 | } | |
28972 | ||
28973 | void helper_roundss_xmm (XMMReg *d, XMMReg *s, uint32_t mode) | |
28974 | { | |
28975 | signed char prev_rounding_mode; | |
28976 | ||
28977 | prev_rounding_mode = env->sse_status.float_rounding_mode; | |
28978 | if (!(mode & (1 << 2))) | |
28979 | switch (mode & 3) { | |
28980 | case 0: | |
28981 | set_float_rounding_mode(float_round_nearest_even, &env->sse_status); | |
28982 | break; | |
28983 | case 1: | |
28984 | set_float_rounding_mode(float_round_down, &env->sse_status); | |
28985 | break; | |
28986 | case 2: | |
28987 | set_float_rounding_mode(float_round_up, &env->sse_status); | |
28988 | break; | |
28989 | case 3: | |
28990 | set_float_rounding_mode(float_round_to_zero, &env->sse_status); | |
28991 | break; | |
28992 | } | |
28993 | ||
28994 | d->_s[0] = float32_round_to_int(s->_s[0], &env->sse_status); | |
28995 | # 1735 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
28996 | env->sse_status.float_rounding_mode = prev_rounding_mode; | |
28997 | } | |
28998 | ||
28999 | void helper_roundsd_xmm (XMMReg *d, XMMReg *s, uint32_t mode) | |
29000 | { | |
29001 | signed char prev_rounding_mode; | |
29002 | ||
29003 | prev_rounding_mode = env->sse_status.float_rounding_mode; | |
29004 | if (!(mode & (1 << 2))) | |
29005 | switch (mode & 3) { | |
29006 | case 0: | |
29007 | set_float_rounding_mode(float_round_nearest_even, &env->sse_status); | |
29008 | break; | |
29009 | case 1: | |
29010 | set_float_rounding_mode(float_round_down, &env->sse_status); | |
29011 | break; | |
29012 | case 2: | |
29013 | set_float_rounding_mode(float_round_up, &env->sse_status); | |
29014 | break; | |
29015 | case 3: | |
29016 | set_float_rounding_mode(float_round_to_zero, &env->sse_status); | |
29017 | break; | |
29018 | } | |
29019 | ||
29020 | d->_d[0] = float64_round_to_int(s->_d[0], &env->sse_status); | |
29021 | # 1768 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" | |
29022 | env->sse_status.float_rounding_mode = prev_rounding_mode; | |
29023 | } | |
29024 | ||
29025 | ||
29026 | void helper_blendps_xmm (XMMReg *d, XMMReg *s, uint32_t imm){ d->_l[0] = ((imm >> 0) & 1) ? s->_l[0] : d->_l[0]; d->_l[1] = ((imm >> 1) & 1) ? s->_l[1] : d->_l[1]; if (4 > 2) { d->_l[2] = ((imm >> 2) & 1) ? s->_l[2] : d->_l[2]; d->_l[3] = ((imm >> 3) & 1) ? s->_l[3] : d->_l[3]; if (4 > 4) { d->_l[4] = ((imm >> 4) & 1) ? s->_l[4] : d->_l[4]; d->_l[5] = ((imm >> 5) & 1) ? s->_l[5] : d->_l[5]; d->_l[6] = ((imm >> 6) & 1) ? s->_l[6] : d->_l[6]; d->_l[7] = ((imm >> 7) & 1) ? s->_l[7] : d->_l[7]; if (4 > 8) { d->_l[8] = ((imm >> 8) & 1) ? s->_l[8] : d->_l[8]; d->_l[9] = ((imm >> 9) & 1) ? s->_l[9] : d->_l[9]; d->_l[10] = ((imm >> 10) & 1) ? s->_l[10] : d->_l[10]; d->_l[11] = ((imm >> 11) & 1) ? s->_l[11] : d->_l[11]; d->_l[12] = ((imm >> 12) & 1) ? s->_l[12] : d->_l[12]; d->_l[13] = ((imm >> 13) & 1) ? s->_l[13] : d->_l[13]; d->_l[14] = ((imm >> 14) & 1) ? s->_l[14] : d->_l[14]; d->_l[15] = ((imm >> 15) & 1) ? s->_l[15] : d->_l[15]; } } }} | |
29027 | void helper_blendpd_xmm (XMMReg *d, XMMReg *s, uint32_t imm){ d->_q[0] = ((imm >> 0) & 1) ? s->_q[0] : d->_q[0]; d->_q[1] = ((imm >> 1) & 1) ? s->_q[1] : d->_q[1]; if (2 > 2) { d->_q[2] = ((imm >> 2) & 1) ? s->_q[2] : d->_q[2]; d->_q[3] = ((imm >> 3) & 1) ? s->_q[3] : d->_q[3]; if (2 > 4) { d->_q[4] = ((imm >> 4) & 1) ? s->_q[4] : d->_q[4]; d->_q[5] = ((imm >> 5) & 1) ? s->_q[5] : d->_q[5]; d->_q[6] = ((imm >> 6) & 1) ? s->_q[6] : d->_q[6]; d->_q[7] = ((imm >> 7) & 1) ? s->_q[7] : d->_q[7]; if (2 > 8) { d->_q[8] = ((imm >> 8) & 1) ? s->_q[8] : d->_q[8]; d->_q[9] = ((imm >> 9) & 1) ? s->_q[9] : d->_q[9]; d->_q[10] = ((imm >> 10) & 1) ? s->_q[10] : d->_q[10]; d->_q[11] = ((imm >> 11) & 1) ? s->_q[11] : d->_q[11]; d->_q[12] = ((imm >> 12) & 1) ? s->_q[12] : d->_q[12]; d->_q[13] = ((imm >> 13) & 1) ? s->_q[13] : d->_q[13]; d->_q[14] = ((imm >> 14) & 1) ? s->_q[14] : d->_q[14]; d->_q[15] = ((imm >> 15) & 1) ? s->_q[15] : d->_q[15]; } } }} | |
29028 | void helper_pblendw_xmm (XMMReg *d, XMMReg *s, uint32_t imm){ d->_w[0] = ((imm >> 0) & 1) ? s->_w[0] : d->_w[0]; d->_w[1] = ((imm >> 1) & 1) ? s->_w[1] : d->_w[1]; if (8 > 2) { d->_w[2] = ((imm >> 2) & 1) ? s->_w[2] : d->_w[2]; d->_w[3] = ((imm >> 3) & 1) ? s->_w[3] : d->_w[3]; if (8 > 4) { d->_w[4] = ((imm >> 4) & 1) ? s->_w[4] : d->_w[4]; d->_w[5] = ((imm >> 5) & 1) ? s->_w[5] : d->_w[5]; d->_w[6] = ((imm >> 6) & 1) ? s->_w[6] : d->_w[6]; d->_w[7] = ((imm >> 7) & 1) ? s->_w[7] : d->_w[7]; if (8 > 8) { d->_w[8] = ((imm >> 8) & 1) ? s->_w[8] : d->_w[8]; d->_w[9] = ((imm >> 9) & 1) ? s->_w[9] : d->_w[9]; d->_w[10] = ((imm >> 10) & 1) ? s->_w[10] : d->_w[10]; d->_w[11] = ((imm >> 11) & 1) ? s->_w[11] : d->_w[11]; d->_w[12] = ((imm >> 12) & 1) ? s->_w[12] : d->_w[12]; d->_w[13] = ((imm >> 13) & 1) ? s->_w[13] : d->_w[13]; d->_w[14] = ((imm >> 14) & 1) ? s->_w[14] : d->_w[14]; d->_w[15] = ((imm >> 15) & 1) ? s->_w[15] : d->_w[15]; } } }} | |
29029 | ||
29030 | void helper_dpps_xmm (XMMReg *d, XMMReg *s, uint32_t mask) | |
29031 | { | |
29032 | float32 iresult = (0); | |
29033 | ||
29034 | if (mask & (1 << 4)) | |
29035 | iresult = float32_add(iresult, | |
29036 | float32_mul(d->_s[0], s->_s[0], &env->sse_status), | |
29037 | &env->sse_status); | |
29038 | if (mask & (1 << 5)) | |
29039 | iresult = float32_add(iresult, | |
29040 | float32_mul(d->_s[1], s->_s[1], &env->sse_status), | |
29041 | &env->sse_status); | |
29042 | if (mask & (1 << 6)) | |
29043 | iresult = float32_add(iresult, | |
29044 | float32_mul(d->_s[2], s->_s[2], &env->sse_status), | |
29045 | &env->sse_status); | |
29046 | if (mask & (1 << 7)) | |
29047 | iresult = float32_add(iresult, | |
29048 | float32_mul(d->_s[3], s->_s[3], &env->sse_status), | |
29049 | &env->sse_status); | |
29050 | d->_s[0] = (mask & (1 << 0)) ? iresult : (0); | |
29051 | d->_s[1] = (mask & (1 << 1)) ? iresult : (0); | |
29052 | d->_s[2] = (mask & (1 << 2)) ? iresult : (0); | |
29053 | d->_s[3] = (mask & (1 << 3)) ? iresult : (0); | |
29054 | } | |
29055 | ||
29056 | void helper_dppd_xmm (XMMReg *d, XMMReg *s, uint32_t mask) | |
29057 | { | |
29058 | float64 iresult = (0); | |
29059 | ||
29060 | if (mask & (1 << 4)) | |
29061 | iresult = float64_add(iresult, | |
29062 | float64_mul(d->_d[0], s->_d[0], &env->sse_status), | |
29063 | &env->sse_status); | |
29064 | if (mask & (1 << 5)) | |
29065 | iresult = float64_add(iresult, | |
29066 | float64_mul(d->_d[1], s->_d[1], &env->sse_status), | |
29067 | &env->sse_status); | |
29068 | d->_d[0] = (mask & (1 << 0)) ? iresult : (0); | |
29069 | d->_d[1] = (mask & (1 << 1)) ? iresult : (0); | |
29070 | } | |
29071 | ||
29072 | void helper_mpsadbw_xmm (XMMReg *d, XMMReg *s, uint32_t offset) | |
29073 | { | |
29074 | int s0 = (offset & 3) << 2; | |
29075 | int d0 = (offset & 4) << 0; | |
29076 | int i; | |
29077 | XMMReg r; | |
29078 | ||
29079 | for (i = 0; i < 8; i++, d0++) { | |
29080 | r._w[i] = 0; | |
29081 | r._w[i] += abs1(d->_b[d0 + 0] - s->_b[s0 + 0]); | |
29082 | r._w[i] += abs1(d->_b[d0 + 1] - s->_b[s0 + 1]); | |
29083 | r._w[i] += abs1(d->_b[d0 + 2] - s->_b[s0 + 2]); | |
29084 | r._w[i] += abs1(d->_b[d0 + 3] - s->_b[s0 + 3]); | |
29085 | } | |
29086 | ||
29087 | *d = r; | |
29088 | } | |
29089 | ||
29090 | ||
29091 | ||
29092 | ||
29093 | void helper_pcmpgtq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = d->_q[0] > s->_q[0] ? -1 : 0; d->_q[1] = d->_q[1] > s->_q[1] ? -1 : 0;} | |
29094 | ||
29095 | static __attribute__ (( always_inline )) __inline__ int pcmp_elen(int reg, uint32_t ctrl) | |
29096 | { | |
29097 | int val; | |
29098 | ||
29099 | ||
29100 | if (ctrl >> 8) | |
29101 | val = abs1((int64_t) env->regs[reg]); | |
29102 | else | |
29103 | val = abs1((int32_t) env->regs[reg]); | |
29104 | ||
29105 | if (ctrl & 1) { | |
29106 | if (val > 8) | |
29107 | return 8; | |
29108 | } else | |
29109 | if (val > 16) | |
29110 | return 16; | |
29111 | ||
29112 | return val; | |
29113 | } | |
29114 | ||
29115 | static __attribute__ (( always_inline )) __inline__ int pcmp_ilen(XMMReg *r, uint8_t ctrl) | |
29116 | { | |
29117 | int val = 0; | |
29118 | ||
29119 | if (ctrl & 1) { | |
29120 | while (val < 8 && r->_w[val]) | |
29121 | val++; | |
29122 | } else | |
29123 | while (val < 16 && r->_b[val]) | |
29124 | val++; | |
29125 | ||
29126 | return val; | |
29127 | } | |
29128 | ||
29129 | static __attribute__ (( always_inline )) __inline__ int pcmp_val(XMMReg *r, uint8_t ctrl, int i) | |
29130 | { | |
29131 | switch ((ctrl >> 0) & 3) { | |
29132 | case 0: | |
29133 | return r->_b[i]; | |
29134 | case 1: | |
29135 | return r->_w[i]; | |
29136 | case 2: | |
29137 | return (int8_t) r->_b[i]; | |
29138 | case 3: | |
29139 | default: | |
29140 | return (int16_t) r->_w[i]; | |
29141 | } | |
29142 | } | |
29143 | ||
29144 | static __attribute__ (( always_inline )) __inline__ unsigned pcmpxstrx(XMMReg *d, XMMReg *s, | |
29145 | int8_t ctrl, int valids, int validd) | |
29146 | { | |
29147 | unsigned int res = 0; | |
29148 | int v; | |
29149 | int j, i; | |
29150 | int upper = (ctrl & 1) ? 7 : 15; | |
29151 | ||
29152 | valids--; | |
29153 | validd--; | |
29154 | ||
29155 | (env->cc_src) = (valids < upper ? 0x0040 : 0) | (validd < upper ? 0x0080 : 0); | |
29156 | ||
29157 | switch ((ctrl >> 2) & 3) { | |
29158 | case 0: | |
29159 | for (j = valids; j >= 0; j--) { | |
29160 | res <<= 1; | |
29161 | v = pcmp_val(s, ctrl, j); | |
29162 | for (i = validd; i >= 0; i--) | |
29163 | res |= (v == pcmp_val(d, ctrl, i)); | |
29164 | } | |
29165 | break; | |
29166 | case 1: | |
29167 | for (j = valids; j >= 0; j--) { | |
29168 | res <<= 1; | |
29169 | v = pcmp_val(s, ctrl, j); | |
29170 | for (i = ((validd - 1) | 1); i >= 0; i -= 2) | |
29171 | res |= (pcmp_val(d, ctrl, i - 0) <= v && | |
29172 | pcmp_val(d, ctrl, i - 1) >= v); | |
29173 | } | |
29174 | break; | |
29175 | case 2: | |
29176 | res = (2 << (upper - (((valids) > (validd)) ? (valids) : (validd)))) - 1; | |
29177 | res <<= (((valids) > (validd)) ? (valids) : (validd)) - (((valids) < (validd)) ? (valids) : (validd)); | |
29178 | for (i = (((valids) < (validd)) ? (valids) : (validd)); i >= 0; i--) { | |
29179 | res <<= 1; | |
29180 | v = pcmp_val(s, ctrl, i); | |
29181 | res |= (v == pcmp_val(d, ctrl, i)); | |
29182 | } | |
29183 | break; | |
29184 | case 3: | |
29185 | for (j = valids - validd; j >= 0; j--) { | |
29186 | res <<= 1; | |
29187 | res |= 1; | |
29188 | for (i = (((upper - j) < (validd)) ? (upper - j) : (validd)); i >= 0; i--) | |
29189 | res &= (pcmp_val(s, ctrl, i + j) == pcmp_val(d, ctrl, i)); | |
29190 | } | |
29191 | break; | |
29192 | } | |
29193 | ||
29194 | switch ((ctrl >> 4) & 3) { | |
29195 | case 1: | |
29196 | res ^= (2 << upper) - 1; | |
29197 | break; | |
29198 | case 3: | |
29199 | res ^= (2 << valids) - 1; | |
29200 | break; | |
29201 | } | |
29202 | ||
29203 | if (res) | |
29204 | (env->cc_src) |= 0x0001; | |
29205 | if (res & 1) | |
29206 | (env->cc_src) |= 0x0800; | |
29207 | ||
29208 | return res; | |
29209 | } | |
29210 | ||
29211 | static __attribute__ (( always_inline )) __inline__ int rffs1(unsigned int val) | |
29212 | { | |
29213 | int ret = 1, hi; | |
29214 | ||
29215 | for (hi = sizeof(val) * 4; hi; hi /= 2) | |
29216 | if (val >> hi) { | |
29217 | val >>= hi; | |
29218 | ret += hi; | |
29219 | } | |
29220 | ||
29221 | return ret; | |
29222 | } | |
29223 | ||
29224 | static __attribute__ (( always_inline )) __inline__ int ffs1(unsigned int val) | |
29225 | { | |
29226 | int ret = 1, hi; | |
29227 | ||
29228 | for (hi = sizeof(val) * 4; hi; hi /= 2) | |
29229 | if (val << hi) { | |
29230 | val <<= hi; | |
29231 | ret += hi; | |
29232 | } | |
29233 | ||
29234 | return ret; | |
29235 | } | |
29236 | ||
29237 | void helper_pcmpestri_xmm (XMMReg *d, XMMReg *s, uint32_t ctrl) | |
29238 | { | |
29239 | unsigned int res = pcmpxstrx(d, s, ctrl, | |
29240 | pcmp_elen(2, ctrl), | |
29241 | pcmp_elen(0, ctrl)); | |
29242 | ||
29243 | if (res) | |
29244 | env->regs[1] = ((ctrl & (1 << 6)) ? rffs1 : ffs1)(res) - 1; | |
29245 | else | |
29246 | env->regs[1] = 16 >> (ctrl & (1 << 0)); | |
29247 | } | |
29248 | ||
29249 | void helper_pcmpestrm_xmm (XMMReg *d, XMMReg *s, uint32_t ctrl) | |
29250 | { | |
29251 | int i; | |
29252 | unsigned int res = pcmpxstrx(d, s, ctrl, | |
29253 | pcmp_elen(2, ctrl), | |
29254 | pcmp_elen(0, ctrl)); | |
29255 | ||
29256 | if ((ctrl >> 6) & 1) { | |
29257 | if (ctrl & 1) | |
29258 | for (i = 0; i < 8; i++, res >>= 1) { | |
29259 | d->_w[i] = (res & 1) ? ~0 : 0; | |
29260 | } | |
29261 | else | |
29262 | for (i = 0; i < 16; i++, res >>= 1) { | |
29263 | d->_b[i] = (res & 1) ? ~0 : 0; | |
29264 | } | |
29265 | } else { | |
29266 | d->_q[1] = 0; | |
29267 | d->_q[0] = res; | |
29268 | } | |
29269 | } | |
29270 | ||
29271 | void helper_pcmpistri_xmm (XMMReg *d, XMMReg *s, uint32_t ctrl) | |
29272 | { | |
29273 | unsigned int res = pcmpxstrx(d, s, ctrl, | |
29274 | pcmp_ilen(s, ctrl), | |
29275 | pcmp_ilen(d, ctrl)); | |
29276 | ||
29277 | if (res) | |
29278 | env->regs[1] = ((ctrl & (1 << 6)) ? rffs1 : ffs1)(res) - 1; | |
29279 | else | |
29280 | env->regs[1] = 16 >> (ctrl & (1 << 0)); | |
29281 | } | |
29282 | ||
29283 | void helper_pcmpistrm_xmm (XMMReg *d, XMMReg *s, uint32_t ctrl) | |
29284 | { | |
29285 | int i; | |
29286 | unsigned int res = pcmpxstrx(d, s, ctrl, | |
29287 | pcmp_ilen(s, ctrl), | |
29288 | pcmp_ilen(d, ctrl)); | |
29289 | ||
29290 | if ((ctrl >> 6) & 1) { | |
29291 | if (ctrl & 1) | |
29292 | for (i = 0; i < 8; i++, res >>= 1) { | |
29293 | d->_w[i] = (res & 1) ? ~0 : 0; | |
29294 | } | |
29295 | else | |
29296 | for (i = 0; i < 16; i++, res >>= 1) { | |
29297 | d->_b[i] = (res & 1) ? ~0 : 0; | |
29298 | } | |
29299 | } else { | |
29300 | d->_q[1] = 0; | |
29301 | d->_q[0] = res; | |
29302 | } | |
29303 | } | |
29304 | ||
29305 | ||
29306 | ||
29307 | target_ulong helper_crc32(uint32_t crc1, target_ulong msg, uint32_t len) | |
29308 | { | |
29309 | target_ulong crc = (msg & ((target_ulong) -1 >> | |
29310 | (32 - len))) ^ crc1; | |
29311 | ||
29312 | while (len--) | |
29313 | crc = (crc >> 1) ^ ((crc & 1) ? 0x82f63b78 : 0); | |
29314 | ||
29315 | return crc; | |
29316 | } | |
29317 | ||
29318 | ||
29319 | ||
29320 | target_ulong helper_popcnt(target_ulong n, uint32_t type) | |
29321 | { | |
29322 | (env->cc_src) = n ? 0 : 0x0040; | |
29323 | ||
29324 | n = (n & ((target_ulong) -1 / ((1LL << (1 << 0)) + 1))) + ((n >> (1 << 0)) & ((target_ulong) -1 / ((1LL << (1 << 0)) + 1))); | |
29325 | n = (n & ((target_ulong) -1 / ((1LL << (1 << 1)) + 1))) + ((n >> (1 << 1)) & ((target_ulong) -1 / ((1LL << (1 << 1)) + 1))); | |
29326 | n = (n & ((target_ulong) -1 / ((1LL << (1 << 2)) + 1))) + ((n >> (1 << 2)) & ((target_ulong) -1 / ((1LL << (1 << 2)) + 1))); | |
29327 | n = (n & ((target_ulong) -1 / ((1LL << (1 << 3)) + 1))) + ((n >> (1 << 3)) & ((target_ulong) -1 / ((1LL << (1 << 3)) + 1))); | |
29328 | if (type == 1) | |
29329 | return n & 0xff; | |
29330 | ||
29331 | n = (n & ((target_ulong) -1 / ((1LL << (1 << 4)) + 1))) + ((n >> (1 << 4)) & ((target_ulong) -1 / ((1LL << (1 << 4)) + 1))); | |
29332 | ||
29333 | return n; | |
29334 | ||
29335 | ||
29336 | ||
29337 | ||
29338 | ||
29339 | ||
29340 | } | |
29341 | # 5698 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
29342 | ||
29343 | ||
29344 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" 1 | |
29345 | # 54 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" | |
29346 | static int compute_all_addb(void) | |
29347 | { | |
29348 | int cf, pf, af, zf, sf, of; | |
29349 | target_long src1, src2; | |
29350 | src1 = (env->cc_src); | |
29351 | src2 = (env->cc_dst) - (env->cc_src); | |
29352 | cf = (uint8_t)(env->cc_dst) < (uint8_t)src1; | |
29353 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29354 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29355 | zf = ((uint8_t)(env->cc_dst) == 0) << 6; | |
29356 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; | |
29357 | of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 0))) & 0x0800; | |
29358 | return cf | pf | af | zf | sf | of; | |
29359 | } | |
29360 | ||
29361 | static int compute_c_addb(void) | |
29362 | { | |
29363 | int cf; | |
29364 | target_long src1; | |
29365 | src1 = (env->cc_src); | |
29366 | cf = (uint8_t)(env->cc_dst) < (uint8_t)src1; | |
29367 | return cf; | |
29368 | } | |
29369 | ||
29370 | static int compute_all_adcb(void) | |
29371 | { | |
29372 | int cf, pf, af, zf, sf, of; | |
29373 | target_long src1, src2; | |
29374 | src1 = (env->cc_src); | |
29375 | src2 = (env->cc_dst) - (env->cc_src) - 1; | |
29376 | cf = (uint8_t)(env->cc_dst) <= (uint8_t)src1; | |
29377 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29378 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29379 | zf = ((uint8_t)(env->cc_dst) == 0) << 6; | |
29380 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; | |
29381 | of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 0))) & 0x0800; | |
29382 | return cf | pf | af | zf | sf | of; | |
29383 | } | |
29384 | ||
29385 | static int compute_c_adcb(void) | |
29386 | { | |
29387 | int cf; | |
29388 | target_long src1; | |
29389 | src1 = (env->cc_src); | |
29390 | cf = (uint8_t)(env->cc_dst) <= (uint8_t)src1; | |
29391 | return cf; | |
29392 | } | |
29393 | ||
29394 | static int compute_all_subb(void) | |
29395 | { | |
29396 | int cf, pf, af, zf, sf, of; | |
29397 | target_long src1, src2; | |
29398 | src1 = (env->cc_dst) + (env->cc_src); | |
29399 | src2 = (env->cc_src); | |
29400 | cf = (uint8_t)src1 < (uint8_t)src2; | |
29401 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29402 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29403 | zf = ((uint8_t)(env->cc_dst) == 0) << 6; | |
29404 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; | |
29405 | of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 0))) & 0x0800; | |
29406 | return cf | pf | af | zf | sf | of; | |
29407 | } | |
29408 | ||
29409 | static int compute_c_subb(void) | |
29410 | { | |
29411 | int cf; | |
29412 | target_long src1, src2; | |
29413 | src1 = (env->cc_dst) + (env->cc_src); | |
29414 | src2 = (env->cc_src); | |
29415 | cf = (uint8_t)src1 < (uint8_t)src2; | |
29416 | return cf; | |
29417 | } | |
29418 | ||
29419 | static int compute_all_sbbb(void) | |
29420 | { | |
29421 | int cf, pf, af, zf, sf, of; | |
29422 | target_long src1, src2; | |
29423 | src1 = (env->cc_dst) + (env->cc_src) + 1; | |
29424 | src2 = (env->cc_src); | |
29425 | cf = (uint8_t)src1 <= (uint8_t)src2; | |
29426 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29427 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29428 | zf = ((uint8_t)(env->cc_dst) == 0) << 6; | |
29429 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; | |
29430 | of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 0))) & 0x0800; | |
29431 | return cf | pf | af | zf | sf | of; | |
29432 | } | |
29433 | ||
29434 | static int compute_c_sbbb(void) | |
29435 | { | |
29436 | int cf; | |
29437 | target_long src1, src2; | |
29438 | src1 = (env->cc_dst) + (env->cc_src) + 1; | |
29439 | src2 = (env->cc_src); | |
29440 | cf = (uint8_t)src1 <= (uint8_t)src2; | |
29441 | return cf; | |
29442 | } | |
29443 | ||
29444 | static int compute_all_logicb(void) | |
29445 | { | |
29446 | int cf, pf, af, zf, sf, of; | |
29447 | cf = 0; | |
29448 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29449 | af = 0; | |
29450 | zf = ((uint8_t)(env->cc_dst) == 0) << 6; | |
29451 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; | |
29452 | of = 0; | |
29453 | return cf | pf | af | zf | sf | of; | |
29454 | } | |
29455 | ||
29456 | static int compute_c_logicb(void) | |
29457 | { | |
29458 | return 0; | |
29459 | } | |
29460 | ||
29461 | static int compute_all_incb(void) | |
29462 | { | |
29463 | int cf, pf, af, zf, sf, of; | |
29464 | target_long src1, src2; | |
29465 | src1 = (env->cc_dst) - 1; | |
29466 | src2 = 1; | |
29467 | cf = (env->cc_src); | |
29468 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29469 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29470 | zf = ((uint8_t)(env->cc_dst) == 0) << 6; | |
29471 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; | |
29472 | of = (((env->cc_dst) & 0xff) == (((target_ulong)1) << ((1 << (3 + 0)) - 1))) << 11; | |
29473 | return cf | pf | af | zf | sf | of; | |
29474 | } | |
29475 | # 191 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" | |
29476 | static int compute_all_decb(void) | |
29477 | { | |
29478 | int cf, pf, af, zf, sf, of; | |
29479 | target_long src1, src2; | |
29480 | src1 = (env->cc_dst) + 1; | |
29481 | src2 = 1; | |
29482 | cf = (env->cc_src); | |
29483 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29484 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29485 | zf = ((uint8_t)(env->cc_dst) == 0) << 6; | |
29486 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; | |
29487 | of = (((env->cc_dst) & 0xff) == ((target_ulong)(((target_ulong)1) << ((1 << (3 + 0)) - 1)) - 1)) << 11; | |
29488 | return cf | pf | af | zf | sf | of; | |
29489 | } | |
29490 | ||
29491 | static int compute_all_shlb(void) | |
29492 | { | |
29493 | int cf, pf, af, zf, sf, of; | |
29494 | cf = ((env->cc_src) >> ((1 << (3 + 0)) - 1)) & 0x0001; | |
29495 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29496 | af = 0; | |
29497 | zf = ((uint8_t)(env->cc_dst) == 0) << 6; | |
29498 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; | |
29499 | ||
29500 | of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 0))) & 0x0800; | |
29501 | return cf | pf | af | zf | sf | of; | |
29502 | } | |
29503 | ||
29504 | static int compute_c_shlb(void) | |
29505 | { | |
29506 | return ((env->cc_src) >> ((1 << (3 + 0)) - 1)) & 0x0001; | |
29507 | } | |
29508 | # 231 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" | |
29509 | static int compute_all_sarb(void) | |
29510 | { | |
29511 | int cf, pf, af, zf, sf, of; | |
29512 | cf = (env->cc_src) & 1; | |
29513 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29514 | af = 0; | |
29515 | zf = ((uint8_t)(env->cc_dst) == 0) << 6; | |
29516 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; | |
29517 | ||
29518 | of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 0))) & 0x0800; | |
29519 | return cf | pf | af | zf | sf | of; | |
29520 | } | |
29521 | # 255 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" | |
29522 | static int compute_all_mulb(void) | |
29523 | { | |
29524 | int cf, pf, af, zf, sf, of; | |
29525 | cf = ((env->cc_src) != 0); | |
29526 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29527 | af = 0; | |
29528 | zf = ((uint8_t)(env->cc_dst) == 0) << 6; | |
29529 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; | |
29530 | of = cf << 11; | |
29531 | return cf | pf | af | zf | sf | of; | |
29532 | } | |
29533 | ||
29534 | ||
29535 | ||
29536 | target_ulong helper_rclb(target_ulong t0, target_ulong t1) | |
29537 | { | |
29538 | int count, eflags; | |
29539 | target_ulong src; | |
29540 | target_long res; | |
29541 | ||
29542 | count = t1 & 0x1f; | |
29543 | ||
29544 | ||
29545 | ||
29546 | count = rclb_table[count]; | |
29547 | ||
29548 | if (count) { | |
29549 | eflags = helper_cc_compute_all((env->cc_op)); | |
29550 | t0 &= 0xff; | |
29551 | src = t0; | |
29552 | res = (t0 << count) | ((target_ulong)(eflags & 0x0001) << (count - 1)); | |
29553 | if (count > 1) | |
29554 | res |= t0 >> ((1 << (3 + 0)) + 1 - count); | |
29555 | t0 = res; | |
29556 | env->cc_tmp = (eflags & ~(0x0001 | 0x0800)) | | |
29557 | (lshift(src ^ t0, 11 - ((1 << (3 + 0)) - 1)) & 0x0800) | | |
29558 | ((src >> ((1 << (3 + 0)) - count)) & 0x0001); | |
29559 | } else { | |
29560 | env->cc_tmp = -1; | |
29561 | } | |
29562 | return t0; | |
29563 | } | |
29564 | ||
29565 | target_ulong helper_rcrb(target_ulong t0, target_ulong t1) | |
29566 | { | |
29567 | int count, eflags; | |
29568 | target_ulong src; | |
29569 | target_long res; | |
29570 | ||
29571 | count = t1 & 0x1f; | |
29572 | ||
29573 | ||
29574 | ||
29575 | count = rclb_table[count]; | |
29576 | ||
29577 | if (count) { | |
29578 | eflags = helper_cc_compute_all((env->cc_op)); | |
29579 | t0 &= 0xff; | |
29580 | src = t0; | |
29581 | res = (t0 >> count) | ((target_ulong)(eflags & 0x0001) << ((1 << (3 + 0)) - count)); | |
29582 | if (count > 1) | |
29583 | res |= t0 << ((1 << (3 + 0)) + 1 - count); | |
29584 | t0 = res; | |
29585 | env->cc_tmp = (eflags & ~(0x0001 | 0x0800)) | | |
29586 | (lshift(src ^ t0, 11 - ((1 << (3 + 0)) - 1)) & 0x0800) | | |
29587 | ((src >> (count - 1)) & 0x0001); | |
29588 | } else { | |
29589 | env->cc_tmp = -1; | |
29590 | } | |
29591 | return t0; | |
29592 | } | |
29593 | # 5701 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
29594 | ||
29595 | ||
29596 | ||
29597 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" 1 | |
29598 | # 54 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" | |
29599 | static int compute_all_addw(void) | |
29600 | { | |
29601 | int cf, pf, af, zf, sf, of; | |
29602 | target_long src1, src2; | |
29603 | src1 = (env->cc_src); | |
29604 | src2 = (env->cc_dst) - (env->cc_src); | |
29605 | cf = (uint16_t)(env->cc_dst) < (uint16_t)src1; | |
29606 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29607 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29608 | zf = ((uint16_t)(env->cc_dst) == 0) << 6; | |
29609 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; | |
29610 | of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 1))) & 0x0800; | |
29611 | return cf | pf | af | zf | sf | of; | |
29612 | } | |
29613 | ||
29614 | static int compute_c_addw(void) | |
29615 | { | |
29616 | int cf; | |
29617 | target_long src1; | |
29618 | src1 = (env->cc_src); | |
29619 | cf = (uint16_t)(env->cc_dst) < (uint16_t)src1; | |
29620 | return cf; | |
29621 | } | |
29622 | ||
29623 | static int compute_all_adcw(void) | |
29624 | { | |
29625 | int cf, pf, af, zf, sf, of; | |
29626 | target_long src1, src2; | |
29627 | src1 = (env->cc_src); | |
29628 | src2 = (env->cc_dst) - (env->cc_src) - 1; | |
29629 | cf = (uint16_t)(env->cc_dst) <= (uint16_t)src1; | |
29630 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29631 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29632 | zf = ((uint16_t)(env->cc_dst) == 0) << 6; | |
29633 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; | |
29634 | of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 1))) & 0x0800; | |
29635 | return cf | pf | af | zf | sf | of; | |
29636 | } | |
29637 | ||
29638 | static int compute_c_adcw(void) | |
29639 | { | |
29640 | int cf; | |
29641 | target_long src1; | |
29642 | src1 = (env->cc_src); | |
29643 | cf = (uint16_t)(env->cc_dst) <= (uint16_t)src1; | |
29644 | return cf; | |
29645 | } | |
29646 | ||
29647 | static int compute_all_subw(void) | |
29648 | { | |
29649 | int cf, pf, af, zf, sf, of; | |
29650 | target_long src1, src2; | |
29651 | src1 = (env->cc_dst) + (env->cc_src); | |
29652 | src2 = (env->cc_src); | |
29653 | cf = (uint16_t)src1 < (uint16_t)src2; | |
29654 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29655 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29656 | zf = ((uint16_t)(env->cc_dst) == 0) << 6; | |
29657 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; | |
29658 | of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 1))) & 0x0800; | |
29659 | return cf | pf | af | zf | sf | of; | |
29660 | } | |
29661 | ||
29662 | static int compute_c_subw(void) | |
29663 | { | |
29664 | int cf; | |
29665 | target_long src1, src2; | |
29666 | src1 = (env->cc_dst) + (env->cc_src); | |
29667 | src2 = (env->cc_src); | |
29668 | cf = (uint16_t)src1 < (uint16_t)src2; | |
29669 | return cf; | |
29670 | } | |
29671 | ||
29672 | static int compute_all_sbbw(void) | |
29673 | { | |
29674 | int cf, pf, af, zf, sf, of; | |
29675 | target_long src1, src2; | |
29676 | src1 = (env->cc_dst) + (env->cc_src) + 1; | |
29677 | src2 = (env->cc_src); | |
29678 | cf = (uint16_t)src1 <= (uint16_t)src2; | |
29679 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29680 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29681 | zf = ((uint16_t)(env->cc_dst) == 0) << 6; | |
29682 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; | |
29683 | of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 1))) & 0x0800; | |
29684 | return cf | pf | af | zf | sf | of; | |
29685 | } | |
29686 | ||
29687 | static int compute_c_sbbw(void) | |
29688 | { | |
29689 | int cf; | |
29690 | target_long src1, src2; | |
29691 | src1 = (env->cc_dst) + (env->cc_src) + 1; | |
29692 | src2 = (env->cc_src); | |
29693 | cf = (uint16_t)src1 <= (uint16_t)src2; | |
29694 | return cf; | |
29695 | } | |
29696 | ||
29697 | static int compute_all_logicw(void) | |
29698 | { | |
29699 | int cf, pf, af, zf, sf, of; | |
29700 | cf = 0; | |
29701 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29702 | af = 0; | |
29703 | zf = ((uint16_t)(env->cc_dst) == 0) << 6; | |
29704 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; | |
29705 | of = 0; | |
29706 | return cf | pf | af | zf | sf | of; | |
29707 | } | |
29708 | ||
29709 | static int compute_c_logicw(void) | |
29710 | { | |
29711 | return 0; | |
29712 | } | |
29713 | ||
29714 | static int compute_all_incw(void) | |
29715 | { | |
29716 | int cf, pf, af, zf, sf, of; | |
29717 | target_long src1, src2; | |
29718 | src1 = (env->cc_dst) - 1; | |
29719 | src2 = 1; | |
29720 | cf = (env->cc_src); | |
29721 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29722 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29723 | zf = ((uint16_t)(env->cc_dst) == 0) << 6; | |
29724 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; | |
29725 | of = (((env->cc_dst) & 0xffff) == (((target_ulong)1) << ((1 << (3 + 1)) - 1))) << 11; | |
29726 | return cf | pf | af | zf | sf | of; | |
29727 | } | |
29728 | # 191 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" | |
29729 | static int compute_all_decw(void) | |
29730 | { | |
29731 | int cf, pf, af, zf, sf, of; | |
29732 | target_long src1, src2; | |
29733 | src1 = (env->cc_dst) + 1; | |
29734 | src2 = 1; | |
29735 | cf = (env->cc_src); | |
29736 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29737 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29738 | zf = ((uint16_t)(env->cc_dst) == 0) << 6; | |
29739 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; | |
29740 | of = (((env->cc_dst) & 0xffff) == ((target_ulong)(((target_ulong)1) << ((1 << (3 + 1)) - 1)) - 1)) << 11; | |
29741 | return cf | pf | af | zf | sf | of; | |
29742 | } | |
29743 | ||
29744 | static int compute_all_shlw(void) | |
29745 | { | |
29746 | int cf, pf, af, zf, sf, of; | |
29747 | cf = ((env->cc_src) >> ((1 << (3 + 1)) - 1)) & 0x0001; | |
29748 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29749 | af = 0; | |
29750 | zf = ((uint16_t)(env->cc_dst) == 0) << 6; | |
29751 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; | |
29752 | ||
29753 | of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 1))) & 0x0800; | |
29754 | return cf | pf | af | zf | sf | of; | |
29755 | } | |
29756 | ||
29757 | static int compute_c_shlw(void) | |
29758 | { | |
29759 | return ((env->cc_src) >> ((1 << (3 + 1)) - 1)) & 0x0001; | |
29760 | } | |
29761 | # 231 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" | |
29762 | static int compute_all_sarw(void) | |
29763 | { | |
29764 | int cf, pf, af, zf, sf, of; | |
29765 | cf = (env->cc_src) & 1; | |
29766 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29767 | af = 0; | |
29768 | zf = ((uint16_t)(env->cc_dst) == 0) << 6; | |
29769 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; | |
29770 | ||
29771 | of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 1))) & 0x0800; | |
29772 | return cf | pf | af | zf | sf | of; | |
29773 | } | |
29774 | # 255 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" | |
29775 | static int compute_all_mulw(void) | |
29776 | { | |
29777 | int cf, pf, af, zf, sf, of; | |
29778 | cf = ((env->cc_src) != 0); | |
29779 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29780 | af = 0; | |
29781 | zf = ((uint16_t)(env->cc_dst) == 0) << 6; | |
29782 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; | |
29783 | of = cf << 11; | |
29784 | return cf | pf | af | zf | sf | of; | |
29785 | } | |
29786 | ||
29787 | ||
29788 | ||
29789 | target_ulong helper_rclw(target_ulong t0, target_ulong t1) | |
29790 | { | |
29791 | int count, eflags; | |
29792 | target_ulong src; | |
29793 | target_long res; | |
29794 | ||
29795 | count = t1 & 0x1f; | |
29796 | ||
29797 | count = rclw_table[count]; | |
29798 | ||
29799 | ||
29800 | ||
29801 | if (count) { | |
29802 | eflags = helper_cc_compute_all((env->cc_op)); | |
29803 | t0 &= 0xffff; | |
29804 | src = t0; | |
29805 | res = (t0 << count) | ((target_ulong)(eflags & 0x0001) << (count - 1)); | |
29806 | if (count > 1) | |
29807 | res |= t0 >> ((1 << (3 + 1)) + 1 - count); | |
29808 | t0 = res; | |
29809 | env->cc_tmp = (eflags & ~(0x0001 | 0x0800)) | | |
29810 | (lshift(src ^ t0, 11 - ((1 << (3 + 1)) - 1)) & 0x0800) | | |
29811 | ((src >> ((1 << (3 + 1)) - count)) & 0x0001); | |
29812 | } else { | |
29813 | env->cc_tmp = -1; | |
29814 | } | |
29815 | return t0; | |
29816 | } | |
29817 | ||
29818 | target_ulong helper_rcrw(target_ulong t0, target_ulong t1) | |
29819 | { | |
29820 | int count, eflags; | |
29821 | target_ulong src; | |
29822 | target_long res; | |
29823 | ||
29824 | count = t1 & 0x1f; | |
29825 | ||
29826 | count = rclw_table[count]; | |
29827 | ||
29828 | ||
29829 | ||
29830 | if (count) { | |
29831 | eflags = helper_cc_compute_all((env->cc_op)); | |
29832 | t0 &= 0xffff; | |
29833 | src = t0; | |
29834 | res = (t0 >> count) | ((target_ulong)(eflags & 0x0001) << ((1 << (3 + 1)) - count)); | |
29835 | if (count > 1) | |
29836 | res |= t0 << ((1 << (3 + 1)) + 1 - count); | |
29837 | t0 = res; | |
29838 | env->cc_tmp = (eflags & ~(0x0001 | 0x0800)) | | |
29839 | (lshift(src ^ t0, 11 - ((1 << (3 + 1)) - 1)) & 0x0800) | | |
29840 | ((src >> (count - 1)) & 0x0001); | |
29841 | } else { | |
29842 | env->cc_tmp = -1; | |
29843 | } | |
29844 | return t0; | |
29845 | } | |
29846 | # 5705 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
29847 | ||
29848 | ||
29849 | ||
29850 | # 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" 1 | |
29851 | # 54 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" | |
29852 | static int compute_all_addl(void) | |
29853 | { | |
29854 | int cf, pf, af, zf, sf, of; | |
29855 | target_long src1, src2; | |
29856 | src1 = (env->cc_src); | |
29857 | src2 = (env->cc_dst) - (env->cc_src); | |
29858 | cf = (uint32_t)(env->cc_dst) < (uint32_t)src1; | |
29859 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29860 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29861 | zf = ((uint32_t)(env->cc_dst) == 0) << 6; | |
29862 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; | |
29863 | of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 2))) & 0x0800; | |
29864 | return cf | pf | af | zf | sf | of; | |
29865 | } | |
29866 | ||
29867 | static int compute_c_addl(void) | |
29868 | { | |
29869 | int cf; | |
29870 | target_long src1; | |
29871 | src1 = (env->cc_src); | |
29872 | cf = (uint32_t)(env->cc_dst) < (uint32_t)src1; | |
29873 | return cf; | |
29874 | } | |
29875 | ||
29876 | static int compute_all_adcl(void) | |
29877 | { | |
29878 | int cf, pf, af, zf, sf, of; | |
29879 | target_long src1, src2; | |
29880 | src1 = (env->cc_src); | |
29881 | src2 = (env->cc_dst) - (env->cc_src) - 1; | |
29882 | cf = (uint32_t)(env->cc_dst) <= (uint32_t)src1; | |
29883 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29884 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29885 | zf = ((uint32_t)(env->cc_dst) == 0) << 6; | |
29886 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; | |
29887 | of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 2))) & 0x0800; | |
29888 | return cf | pf | af | zf | sf | of; | |
29889 | } | |
29890 | ||
29891 | static int compute_c_adcl(void) | |
29892 | { | |
29893 | int cf; | |
29894 | target_long src1; | |
29895 | src1 = (env->cc_src); | |
29896 | cf = (uint32_t)(env->cc_dst) <= (uint32_t)src1; | |
29897 | return cf; | |
29898 | } | |
29899 | ||
29900 | static int compute_all_subl(void) | |
29901 | { | |
29902 | int cf, pf, af, zf, sf, of; | |
29903 | target_long src1, src2; | |
29904 | src1 = (env->cc_dst) + (env->cc_src); | |
29905 | src2 = (env->cc_src); | |
29906 | cf = (uint32_t)src1 < (uint32_t)src2; | |
29907 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29908 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29909 | zf = ((uint32_t)(env->cc_dst) == 0) << 6; | |
29910 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; | |
29911 | of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 2))) & 0x0800; | |
29912 | return cf | pf | af | zf | sf | of; | |
29913 | } | |
29914 | ||
29915 | static int compute_c_subl(void) | |
29916 | { | |
29917 | int cf; | |
29918 | target_long src1, src2; | |
29919 | src1 = (env->cc_dst) + (env->cc_src); | |
29920 | src2 = (env->cc_src); | |
29921 | cf = (uint32_t)src1 < (uint32_t)src2; | |
29922 | return cf; | |
29923 | } | |
29924 | ||
29925 | static int compute_all_sbbl(void) | |
29926 | { | |
29927 | int cf, pf, af, zf, sf, of; | |
29928 | target_long src1, src2; | |
29929 | src1 = (env->cc_dst) + (env->cc_src) + 1; | |
29930 | src2 = (env->cc_src); | |
29931 | cf = (uint32_t)src1 <= (uint32_t)src2; | |
29932 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29933 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29934 | zf = ((uint32_t)(env->cc_dst) == 0) << 6; | |
29935 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; | |
29936 | of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 2))) & 0x0800; | |
29937 | return cf | pf | af | zf | sf | of; | |
29938 | } | |
29939 | ||
29940 | static int compute_c_sbbl(void) | |
29941 | { | |
29942 | int cf; | |
29943 | target_long src1, src2; | |
29944 | src1 = (env->cc_dst) + (env->cc_src) + 1; | |
29945 | src2 = (env->cc_src); | |
29946 | cf = (uint32_t)src1 <= (uint32_t)src2; | |
29947 | return cf; | |
29948 | } | |
29949 | ||
29950 | static int compute_all_logicl(void) | |
29951 | { | |
29952 | int cf, pf, af, zf, sf, of; | |
29953 | cf = 0; | |
29954 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29955 | af = 0; | |
29956 | zf = ((uint32_t)(env->cc_dst) == 0) << 6; | |
29957 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; | |
29958 | of = 0; | |
29959 | return cf | pf | af | zf | sf | of; | |
29960 | } | |
29961 | ||
29962 | static int compute_c_logicl(void) | |
29963 | { | |
29964 | return 0; | |
29965 | } | |
29966 | ||
29967 | static int compute_all_incl(void) | |
29968 | { | |
29969 | int cf, pf, af, zf, sf, of; | |
29970 | target_long src1, src2; | |
29971 | src1 = (env->cc_dst) - 1; | |
29972 | src2 = 1; | |
29973 | cf = (env->cc_src); | |
29974 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29975 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29976 | zf = ((uint32_t)(env->cc_dst) == 0) << 6; | |
29977 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; | |
29978 | of = (((env->cc_dst) & 0xffffffff) == (((target_ulong)1) << ((1 << (3 + 2)) - 1))) << 11; | |
29979 | return cf | pf | af | zf | sf | of; | |
29980 | } | |
29981 | ||
29982 | ||
29983 | static int compute_c_incl(void) | |
29984 | { | |
29985 | return (env->cc_src); | |
29986 | } | |
29987 | ||
29988 | ||
29989 | static int compute_all_decl(void) | |
29990 | { | |
29991 | int cf, pf, af, zf, sf, of; | |
29992 | target_long src1, src2; | |
29993 | src1 = (env->cc_dst) + 1; | |
29994 | src2 = 1; | |
29995 | cf = (env->cc_src); | |
29996 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
29997 | af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; | |
29998 | zf = ((uint32_t)(env->cc_dst) == 0) << 6; | |
29999 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; | |
30000 | of = (((env->cc_dst) & 0xffffffff) == ((target_ulong)(((target_ulong)1) << ((1 << (3 + 2)) - 1)) - 1)) << 11; | |
30001 | return cf | pf | af | zf | sf | of; | |
30002 | } | |
30003 | ||
30004 | static int compute_all_shll(void) | |
30005 | { | |
30006 | int cf, pf, af, zf, sf, of; | |
30007 | cf = ((env->cc_src) >> ((1 << (3 + 2)) - 1)) & 0x0001; | |
30008 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
30009 | af = 0; | |
30010 | zf = ((uint32_t)(env->cc_dst) == 0) << 6; | |
30011 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; | |
30012 | ||
30013 | of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 2))) & 0x0800; | |
30014 | return cf | pf | af | zf | sf | of; | |
30015 | } | |
30016 | ||
30017 | static int compute_c_shll(void) | |
30018 | { | |
30019 | return ((env->cc_src) >> ((1 << (3 + 2)) - 1)) & 0x0001; | |
30020 | } | |
30021 | ||
30022 | ||
30023 | static int compute_c_sarl(void) | |
30024 | { | |
30025 | return (env->cc_src) & 1; | |
30026 | } | |
30027 | ||
30028 | ||
30029 | static int compute_all_sarl(void) | |
30030 | { | |
30031 | int cf, pf, af, zf, sf, of; | |
30032 | cf = (env->cc_src) & 1; | |
30033 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
30034 | af = 0; | |
30035 | zf = ((uint32_t)(env->cc_dst) == 0) << 6; | |
30036 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; | |
30037 | ||
30038 | of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 2))) & 0x0800; | |
30039 | return cf | pf | af | zf | sf | of; | |
30040 | } | |
30041 | ||
30042 | ||
30043 | static int compute_c_mull(void) | |
30044 | { | |
30045 | int cf; | |
30046 | cf = ((env->cc_src) != 0); | |
30047 | return cf; | |
30048 | } | |
30049 | ||
30050 | ||
30051 | ||
30052 | ||
30053 | static int compute_all_mull(void) | |
30054 | { | |
30055 | int cf, pf, af, zf, sf, of; | |
30056 | cf = ((env->cc_src) != 0); | |
30057 | pf = parity_table[(uint8_t)(env->cc_dst)]; | |
30058 | af = 0; | |
30059 | zf = ((uint32_t)(env->cc_dst) == 0) << 6; | |
30060 | sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; | |
30061 | of = cf << 11; | |
30062 | return cf | pf | af | zf | sf | of; | |
30063 | } | |
30064 | ||
30065 | ||
30066 | ||
30067 | target_ulong helper_rcll(target_ulong t0, target_ulong t1) | |
30068 | { | |
30069 | int count, eflags; | |
30070 | target_ulong src; | |
30071 | target_long res; | |
30072 | ||
30073 | count = t1 & 0x1f; | |
30074 | ||
30075 | ||
30076 | ||
30077 | ||
30078 | ||
30079 | if (count) { | |
30080 | eflags = helper_cc_compute_all((env->cc_op)); | |
30081 | t0 &= 0xffffffff; | |
30082 | src = t0; | |
30083 | res = (t0 << count) | ((target_ulong)(eflags & 0x0001) << (count - 1)); | |
30084 | if (count > 1) | |
30085 | res |= t0 >> ((1 << (3 + 2)) + 1 - count); | |
30086 | t0 = res; | |
30087 | env->cc_tmp = (eflags & ~(0x0001 | 0x0800)) | | |
30088 | (lshift(src ^ t0, 11 - ((1 << (3 + 2)) - 1)) & 0x0800) | | |
30089 | ((src >> ((1 << (3 + 2)) - count)) & 0x0001); | |
30090 | } else { | |
30091 | env->cc_tmp = -1; | |
30092 | } | |
30093 | return t0; | |
30094 | } | |
30095 | ||
30096 | target_ulong helper_rcrl(target_ulong t0, target_ulong t1) | |
30097 | { | |
30098 | int count, eflags; | |
30099 | target_ulong src; | |
30100 | target_long res; | |
30101 | ||
30102 | count = t1 & 0x1f; | |
30103 | ||
30104 | ||
30105 | ||
30106 | ||
30107 | ||
30108 | if (count) { | |
30109 | eflags = helper_cc_compute_all((env->cc_op)); | |
30110 | t0 &= 0xffffffff; | |
30111 | src = t0; | |
30112 | res = (t0 >> count) | ((target_ulong)(eflags & 0x0001) << ((1 << (3 + 2)) - count)); | |
30113 | if (count > 1) | |
30114 | res |= t0 << ((1 << (3 + 2)) + 1 - count); | |
30115 | t0 = res; | |
30116 | env->cc_tmp = (eflags & ~(0x0001 | 0x0800)) | | |
30117 | (lshift(src ^ t0, 11 - ((1 << (3 + 2)) - 1)) & 0x0800) | | |
30118 | ((src >> (count - 1)) & 0x0001); | |
30119 | } else { | |
30120 | env->cc_tmp = -1; | |
30121 | } | |
30122 | return t0; | |
30123 | } | |
30124 | # 5709 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 | |
30125 | # 5720 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
30126 | target_ulong helper_bsf(target_ulong t0) | |
30127 | { | |
30128 | int count; | |
30129 | target_ulong res; | |
30130 | ||
30131 | res = t0; | |
30132 | count = 0; | |
30133 | while ((res & 1) == 0) { | |
30134 | count++; | |
30135 | res >>= 1; | |
30136 | } | |
30137 | return count; | |
30138 | } | |
30139 | ||
30140 | target_ulong helper_lzcnt(target_ulong t0, int wordsize) | |
30141 | { | |
30142 | int count; | |
30143 | target_ulong res, mask; | |
30144 | ||
30145 | if (wordsize > 0 && t0 == 0) { | |
30146 | return wordsize; | |
30147 | } | |
30148 | res = t0; | |
30149 | count = 32 - 1; | |
30150 | mask = (target_ulong)1 << (32 - 1); | |
30151 | while ((res & mask) == 0) { | |
30152 | count--; | |
30153 | res <<= 1; | |
30154 | } | |
30155 | if (wordsize > 0) { | |
30156 | return wordsize - 1 - count; | |
30157 | } | |
30158 | return count; | |
30159 | } | |
30160 | ||
30161 | target_ulong helper_bsr(target_ulong t0) | |
30162 | { | |
30163 | return helper_lzcnt(t0, 0); | |
30164 | } | |
30165 | ||
30166 | static int compute_all_eflags(void) | |
30167 | { | |
30168 | return (env->cc_src); | |
30169 | } | |
30170 | ||
30171 | static int compute_c_eflags(void) | |
30172 | { | |
30173 | return (env->cc_src) & 0x0001; | |
30174 | } | |
30175 | ||
30176 | uint32_t helper_cc_compute_all(int op) | |
30177 | { | |
30178 | switch (op) { | |
30179 | default: return 0; | |
30180 | ||
30181 | case CC_OP_EFLAGS: return compute_all_eflags(); | |
30182 | ||
30183 | case CC_OP_MULB: return compute_all_mulb(); | |
30184 | case CC_OP_MULW: return compute_all_mulw(); | |
30185 | case CC_OP_MULL: return compute_all_mull(); | |
30186 | ||
30187 | case CC_OP_ADDB: return compute_all_addb(); | |
30188 | case CC_OP_ADDW: return compute_all_addw(); | |
30189 | case CC_OP_ADDL: return compute_all_addl(); | |
30190 | ||
30191 | case CC_OP_ADCB: return compute_all_adcb(); | |
30192 | case CC_OP_ADCW: return compute_all_adcw(); | |
30193 | case CC_OP_ADCL: return compute_all_adcl(); | |
30194 | ||
30195 | case CC_OP_SUBB: return compute_all_subb(); | |
30196 | case CC_OP_SUBW: return compute_all_subw(); | |
30197 | case CC_OP_SUBL: return compute_all_subl(); | |
30198 | ||
30199 | case CC_OP_SBBB: return compute_all_sbbb(); | |
30200 | case CC_OP_SBBW: return compute_all_sbbw(); | |
30201 | case CC_OP_SBBL: return compute_all_sbbl(); | |
30202 | ||
30203 | case CC_OP_LOGICB: return compute_all_logicb(); | |
30204 | case CC_OP_LOGICW: return compute_all_logicw(); | |
30205 | case CC_OP_LOGICL: return compute_all_logicl(); | |
30206 | ||
30207 | case CC_OP_INCB: return compute_all_incb(); | |
30208 | case CC_OP_INCW: return compute_all_incw(); | |
30209 | case CC_OP_INCL: return compute_all_incl(); | |
30210 | ||
30211 | case CC_OP_DECB: return compute_all_decb(); | |
30212 | case CC_OP_DECW: return compute_all_decw(); | |
30213 | case CC_OP_DECL: return compute_all_decl(); | |
30214 | ||
30215 | case CC_OP_SHLB: return compute_all_shlb(); | |
30216 | case CC_OP_SHLW: return compute_all_shlw(); | |
30217 | case CC_OP_SHLL: return compute_all_shll(); | |
30218 | ||
30219 | case CC_OP_SARB: return compute_all_sarb(); | |
30220 | case CC_OP_SARW: return compute_all_sarw(); | |
30221 | case CC_OP_SARL: return compute_all_sarl(); | |
30222 | # 5838 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
30223 | } | |
30224 | } | |
30225 | ||
30226 | uint32_t cpu_cc_compute_all(CPUX86State *env1, int op) | |
30227 | { | |
30228 | CPUX86State *saved_env; | |
30229 | uint32_t ret; | |
30230 | ||
30231 | saved_env = env; | |
30232 | env = env1; | |
30233 | ret = helper_cc_compute_all(op); | |
30234 | env = saved_env; | |
30235 | return ret; | |
30236 | } | |
30237 | ||
30238 | uint32_t helper_cc_compute_c(int op) | |
30239 | { | |
30240 | switch (op) { | |
30241 | default: return 0; | |
30242 | ||
30243 | case CC_OP_EFLAGS: return compute_c_eflags(); | |
30244 | ||
30245 | case CC_OP_MULB: return compute_c_mull(); | |
30246 | case CC_OP_MULW: return compute_c_mull(); | |
30247 | case CC_OP_MULL: return compute_c_mull(); | |
30248 | ||
30249 | case CC_OP_ADDB: return compute_c_addb(); | |
30250 | case CC_OP_ADDW: return compute_c_addw(); | |
30251 | case CC_OP_ADDL: return compute_c_addl(); | |
30252 | ||
30253 | case CC_OP_ADCB: return compute_c_adcb(); | |
30254 | case CC_OP_ADCW: return compute_c_adcw(); | |
30255 | case CC_OP_ADCL: return compute_c_adcl(); | |
30256 | ||
30257 | case CC_OP_SUBB: return compute_c_subb(); | |
30258 | case CC_OP_SUBW: return compute_c_subw(); | |
30259 | case CC_OP_SUBL: return compute_c_subl(); | |
30260 | ||
30261 | case CC_OP_SBBB: return compute_c_sbbb(); | |
30262 | case CC_OP_SBBW: return compute_c_sbbw(); | |
30263 | case CC_OP_SBBL: return compute_c_sbbl(); | |
30264 | ||
30265 | case CC_OP_LOGICB: return compute_c_logicb(); | |
30266 | case CC_OP_LOGICW: return compute_c_logicw(); | |
30267 | case CC_OP_LOGICL: return compute_c_logicl(); | |
30268 | ||
30269 | case CC_OP_INCB: return compute_c_incl(); | |
30270 | case CC_OP_INCW: return compute_c_incl(); | |
30271 | case CC_OP_INCL: return compute_c_incl(); | |
30272 | ||
30273 | case CC_OP_DECB: return compute_c_incl(); | |
30274 | case CC_OP_DECW: return compute_c_incl(); | |
30275 | case CC_OP_DECL: return compute_c_incl(); | |
30276 | ||
30277 | case CC_OP_SHLB: return compute_c_shlb(); | |
30278 | case CC_OP_SHLW: return compute_c_shlw(); | |
30279 | case CC_OP_SHLL: return compute_c_shll(); | |
30280 | ||
30281 | case CC_OP_SARB: return compute_c_sarl(); | |
30282 | case CC_OP_SARW: return compute_c_sarl(); | |
30283 | case CC_OP_SARL: return compute_c_sarl(); | |
30284 | # 5921 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" | |
30285 | } | |
30286 | } |