pass ARCH down to uClibc
[buildroot.git] / package / xorg / xorg-x11-6.8.2-gcc4-fix.patch
blob6062dba7f9d888bc8595e6a858d42c3a6587e05f
1 --- xc/programs/Xserver/fb/fbmmx.c.orig 2005-03-01 19:01:35.401903000 -0500
2 +++ xc/programs/Xserver/fb/fbmmx.c 2005-03-01 19:01:39.330305792 -0500
3 @@ -29,6 +29,8 @@
5 #ifdef RENDER
7 +#include <mmintrin.h>
9 #include "picturestr.h"
10 #include "mipict.h"
11 #include "fbpict.h"
12 @@ -48,6 +50,10 @@
13 #define CHECKPOINT()
14 #endif
16 +#define mmx_and(a,b) ((Vector1x64)_mm_and_si64((__m64)(a),(__m64)(b)))
17 +#define mmx_or(a,b) ((Vector1x64)_mm_or_si64((__m64)(a),(__m64)(b)))
18 +#define mmx_xor(a,b) ((Vector1x64)_mm_xor_si64((__m64)(a),(__m64)(b)))
20 typedef struct
22 ullong mmx_zero;
23 @@ -102,7 +108,7 @@
24 static __inline__ Vector4x16
25 negate (Vector4x16 mask)
27 - return (Vector4x16)__builtin_ia32_pxor (
28 + return (Vector4x16)mmx_xor (
29 (Vector1x64)mask,
30 (Vector1x64)c.mmx_4x00ff);
32 @@ -163,9 +169,9 @@
34 t1 = shift ((Vector1x64)pixel, -48);
35 t2 = shift (t1, 16);
36 - t1 = __builtin_ia32_por (t1, t2);
37 + t1 = mmx_or (t1, t2);
38 t2 = shift (t1, 32);
39 - t1 = __builtin_ia32_por (t1, t2);
40 + t1 = mmx_or (t1, t2);
42 return (Vector4x16)t1;
44 @@ -178,9 +184,9 @@
45 t1 = shift ((Vector1x64)pixel, 48);
46 t1 = shift (t1, -48);
47 t2 = shift (t1, 16);
48 - t1 = __builtin_ia32_por (t1, t2);
49 + t1 = mmx_or (t1, t2);
50 t2 = shift (t1, 32);
51 - t1 = __builtin_ia32_por (t1, t2);
52 + t1 = mmx_or (t1, t2);
54 return (Vector4x16)t1;
56 @@ -192,15 +198,15 @@
58 x = y = z = (Vector1x64)pixel;
60 - x = __builtin_ia32_pand (x, (Vector1x64)c.mmx_ffff0000ffff0000);
61 - y = __builtin_ia32_pand (y, (Vector1x64)c.mmx_000000000000ffff);
62 - z = __builtin_ia32_pand (z, (Vector1x64)c.mmx_0000ffff00000000);
63 + x = mmx_and (x, (Vector1x64)c.mmx_ffff0000ffff0000);
64 + y = mmx_and (y, (Vector1x64)c.mmx_000000000000ffff);
65 + z = mmx_and (z, (Vector1x64)c.mmx_0000ffff00000000);
67 y = shift (y, 32);
68 z = shift (z, -32);
70 - x = __builtin_ia32_por (x, y);
71 - x = __builtin_ia32_por (x, z);
72 + x = mmx_or (x, y);
73 + x = mmx_or (x, z);
75 return (Vector4x16)x;
77 @@ -234,7 +240,7 @@
78 over_rev_non_pre (Vector4x16 src, Vector4x16 dest)
80 Vector4x16 srca = expand_alpha (src);
81 - Vector4x16 srcfaaa = (Vector4x16)__builtin_ia32_por((Vector1x64)srca, (Vector1x64)c.mmx_full_alpha);
82 + Vector4x16 srcfaaa = (Vector4x16)mmx_or((Vector1x64)srca, (Vector1x64)c.mmx_full_alpha);
84 return over(pix_multiply(invert_colors(src), srcfaaa), srca, dest);
86 @@ -300,9 +306,9 @@
87 Vector1x64 t1 = shift (p, 36 - 11);
88 Vector1x64 t2 = shift (p, 16 - 5);
90 - p = __builtin_ia32_por (t1, p);
91 - p = __builtin_ia32_por (t2, p);
92 - p = __builtin_ia32_pand (p, (Vector1x64)c.mmx_565_rgb);
93 + p = mmx_or (t1, p);
94 + p = mmx_or (t2, p);
95 + p = mmx_and (p, (Vector1x64)c.mmx_565_rgb);
97 pixel = __builtin_ia32_pmullw ((Vector4x16)p, (Vector4x16)c.mmx_565_unpack_multiplier);
98 return __builtin_ia32_psrlw (pixel, 8);
99 @@ -324,27 +330,27 @@
100 Vector1x64 t = (Vector1x64)target;
101 Vector1x64 r, g, b;
103 - r = __builtin_ia32_pand (p, (Vector1x64)c.mmx_565_r);
104 - g = __builtin_ia32_pand (p, (Vector1x64)c.mmx_565_g);
105 - b = __builtin_ia32_pand (p, (Vector1x64)c.mmx_565_b);
106 + r = mmx_and (p, (Vector1x64)c.mmx_565_r);
107 + g = mmx_and (p, (Vector1x64)c.mmx_565_g);
108 + b = mmx_and (p, (Vector1x64)c.mmx_565_b);
110 r = shift (r, - (32 - 8) + pos * 16);
111 g = shift (g, - (16 - 3) + pos * 16);
112 b = shift (b, - (0 + 3) + pos * 16);
114 if (pos == 0)
115 - t = __builtin_ia32_pand (t, (Vector1x64)c.mmx_mask_0);
116 + t = mmx_and (t, (Vector1x64)c.mmx_mask_0);
117 else if (pos == 1)
118 - t = __builtin_ia32_pand (t, (Vector1x64)c.mmx_mask_1);
119 + t = mmx_and (t, (Vector1x64)c.mmx_mask_1);
120 else if (pos == 2)
121 - t = __builtin_ia32_pand (t, (Vector1x64)c.mmx_mask_2);
122 + t = mmx_and (t, (Vector1x64)c.mmx_mask_2);
123 else if (pos == 3)
124 - t = __builtin_ia32_pand (t, (Vector1x64)c.mmx_mask_3);
125 + t = mmx_and (t, (Vector1x64)c.mmx_mask_3);
127 - p = __builtin_ia32_por (r, t);
128 - p = __builtin_ia32_por (g, p);
129 + p = mmx_or (r, t);
130 + p = mmx_or (g, p);
132 - return (Vector4x16)__builtin_ia32_por (b, p);
133 + return (Vector4x16)mmx_or (b, p);
136 static __inline__ void
137 --- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.h.orig 2006-07-07 17:38:25.000000000 -0600
138 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.h 2006-07-07 17:38:34.000000000 -0600
139 @@ -146,9 +146,6 @@
140 extern Bool RADEONProbe
141 FunctionPrototype((DriverPtr, int));
143 -extern SymTabRec RADEONChipsets[];
144 -extern PciChipsets RADEONPciChipsets[];
146 /* radeon_driver.c */
147 extern void RADEONLoaderRefSymLists
148 FunctionPrototype((void));