]> git.saurik.com Git - apple/libc.git/blob - stdio/FreeBSD/printflocal.h.patch
Libc-763.12.tar.gz
[apple/libc.git] / stdio / FreeBSD / printflocal.h.patch
1 --- printflocal.h.orig 2009-11-12 13:40:46.000000000 -0800
2 +++ printflocal.h 2009-11-12 23:06:25.000000000 -0800
3 @@ -32,6 +32,11 @@
4 * $FreeBSD: src/lib/libc/stdio/printflocal.h,v 1.3 2009/03/02 04:07:58 das Exp $
5 */
6
7 +/*
8 + * Defining here VECTORS for all files that include this header (<rdar://problem/8466056>)
9 + */
10 +#define VECTORS
11 +
12 /*
13 * Flags used during conversion.
14 */
15 @@ -49,6 +49,9 @@
16 #define PTRDIFFT 0x800 /* ptrdiff_t */
17 #define INTMAXT 0x1000 /* intmax_t */
18 #define CHARINT 0x2000 /* print char using int format */
19 +#ifdef VECTORS
20 +#define VECTOR 0x4000 /* Altivec or SSE vector */
21 +#endif /* VECTORS */
22
23 /*
24 * Macros for converting digits to letters and vice versa
25 @@ -60,6 +63,13 @@
26 /* Size of the static argument table. */
27 #define STATIC_ARG_TBL_SIZE 8
28
29 +#ifdef VECTORS
30 +typedef __attribute__ ((vector_size(16))) unsigned char VECTORTYPE;
31 +#ifdef __SSE2__
32 +#define V64TYPE
33 +#endif /* __SSE2__ */
34 +#endif /* VECTORS */
35 +
36 union arg {
37 int intarg;
38 u_int uintarg;
39 @@ -87,6 +97,21 @@ union arg {
40 #endif
41 wint_t wintarg;
42 wchar_t *pwchararg;
43 +#ifdef VECTORS
44 + VECTORTYPE vectorarg;
45 + unsigned char vuchararg[16];
46 + signed char vchararg[16];
47 + unsigned short vushortarg[8];
48 + signed short vshortarg[8];
49 + unsigned int vuintarg[4];
50 + signed int vintarg[4];
51 + float vfloatarg[4];
52 +#ifdef V64TYPE
53 + double vdoublearg[2];
54 + unsigned long long vulonglongarg[2];
55 + long long vlonglongarg[2];
56 +#endif /* V64TYPE */
57 +#endif /* VECTORS */
58 };
59
60 /* Handle positional parameters. */