xorg-x11-6.8.2-gcc4-fix.patch 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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 @@
  4. #ifdef RENDER
  5. +#include <mmintrin.h>
  6. +
  7. #include "picturestr.h"
  8. #include "mipict.h"
  9. #include "fbpict.h"
  10. @@ -48,6 +50,10 @@
  11. #define CHECKPOINT()
  12. #endif
  13. +#define mmx_and(a,b) ((Vector1x64)_mm_and_si64((__m64)(a),(__m64)(b)))
  14. +#define mmx_or(a,b) ((Vector1x64)_mm_or_si64((__m64)(a),(__m64)(b)))
  15. +#define mmx_xor(a,b) ((Vector1x64)_mm_xor_si64((__m64)(a),(__m64)(b)))
  16. +
  17. typedef struct
  18. {
  19. ullong mmx_zero;
  20. @@ -102,7 +108,7 @@
  21. static __inline__ Vector4x16
  22. negate (Vector4x16 mask)
  23. {
  24. - return (Vector4x16)__builtin_ia32_pxor (
  25. + return (Vector4x16)mmx_xor (
  26. (Vector1x64)mask,
  27. (Vector1x64)c.mmx_4x00ff);
  28. }
  29. @@ -163,9 +169,9 @@
  30. t1 = shift ((Vector1x64)pixel, -48);
  31. t2 = shift (t1, 16);
  32. - t1 = __builtin_ia32_por (t1, t2);
  33. + t1 = mmx_or (t1, t2);
  34. t2 = shift (t1, 32);
  35. - t1 = __builtin_ia32_por (t1, t2);
  36. + t1 = mmx_or (t1, t2);
  37. return (Vector4x16)t1;
  38. }
  39. @@ -178,9 +184,9 @@
  40. t1 = shift ((Vector1x64)pixel, 48);
  41. t1 = shift (t1, -48);
  42. t2 = shift (t1, 16);
  43. - t1 = __builtin_ia32_por (t1, t2);
  44. + t1 = mmx_or (t1, t2);
  45. t2 = shift (t1, 32);
  46. - t1 = __builtin_ia32_por (t1, t2);
  47. + t1 = mmx_or (t1, t2);
  48. return (Vector4x16)t1;
  49. }
  50. @@ -192,15 +198,15 @@
  51. x = y = z = (Vector1x64)pixel;
  52. - x = __builtin_ia32_pand (x, (Vector1x64)c.mmx_ffff0000ffff0000);
  53. - y = __builtin_ia32_pand (y, (Vector1x64)c.mmx_000000000000ffff);
  54. - z = __builtin_ia32_pand (z, (Vector1x64)c.mmx_0000ffff00000000);
  55. + x = mmx_and (x, (Vector1x64)c.mmx_ffff0000ffff0000);
  56. + y = mmx_and (y, (Vector1x64)c.mmx_000000000000ffff);
  57. + z = mmx_and (z, (Vector1x64)c.mmx_0000ffff00000000);
  58. y = shift (y, 32);
  59. z = shift (z, -32);
  60. - x = __builtin_ia32_por (x, y);
  61. - x = __builtin_ia32_por (x, z);
  62. + x = mmx_or (x, y);
  63. + x = mmx_or (x, z);
  64. return (Vector4x16)x;
  65. }
  66. @@ -234,7 +240,7 @@
  67. over_rev_non_pre (Vector4x16 src, Vector4x16 dest)
  68. {
  69. Vector4x16 srca = expand_alpha (src);
  70. - Vector4x16 srcfaaa = (Vector4x16)__builtin_ia32_por((Vector1x64)srca, (Vector1x64)c.mmx_full_alpha);
  71. + Vector4x16 srcfaaa = (Vector4x16)mmx_or((Vector1x64)srca, (Vector1x64)c.mmx_full_alpha);
  72. return over(pix_multiply(invert_colors(src), srcfaaa), srca, dest);
  73. }
  74. @@ -300,9 +306,9 @@
  75. Vector1x64 t1 = shift (p, 36 - 11);
  76. Vector1x64 t2 = shift (p, 16 - 5);
  77. - p = __builtin_ia32_por (t1, p);
  78. - p = __builtin_ia32_por (t2, p);
  79. - p = __builtin_ia32_pand (p, (Vector1x64)c.mmx_565_rgb);
  80. + p = mmx_or (t1, p);
  81. + p = mmx_or (t2, p);
  82. + p = mmx_and (p, (Vector1x64)c.mmx_565_rgb);
  83. pixel = __builtin_ia32_pmullw ((Vector4x16)p, (Vector4x16)c.mmx_565_unpack_multiplier);
  84. return __builtin_ia32_psrlw (pixel, 8);
  85. @@ -324,27 +330,27 @@
  86. Vector1x64 t = (Vector1x64)target;
  87. Vector1x64 r, g, b;
  88. - r = __builtin_ia32_pand (p, (Vector1x64)c.mmx_565_r);
  89. - g = __builtin_ia32_pand (p, (Vector1x64)c.mmx_565_g);
  90. - b = __builtin_ia32_pand (p, (Vector1x64)c.mmx_565_b);
  91. + r = mmx_and (p, (Vector1x64)c.mmx_565_r);
  92. + g = mmx_and (p, (Vector1x64)c.mmx_565_g);
  93. + b = mmx_and (p, (Vector1x64)c.mmx_565_b);
  94. r = shift (r, - (32 - 8) + pos * 16);
  95. g = shift (g, - (16 - 3) + pos * 16);
  96. b = shift (b, - (0 + 3) + pos * 16);
  97. if (pos == 0)
  98. - t = __builtin_ia32_pand (t, (Vector1x64)c.mmx_mask_0);
  99. + t = mmx_and (t, (Vector1x64)c.mmx_mask_0);
  100. else if (pos == 1)
  101. - t = __builtin_ia32_pand (t, (Vector1x64)c.mmx_mask_1);
  102. + t = mmx_and (t, (Vector1x64)c.mmx_mask_1);
  103. else if (pos == 2)
  104. - t = __builtin_ia32_pand (t, (Vector1x64)c.mmx_mask_2);
  105. + t = mmx_and (t, (Vector1x64)c.mmx_mask_2);
  106. else if (pos == 3)
  107. - t = __builtin_ia32_pand (t, (Vector1x64)c.mmx_mask_3);
  108. + t = mmx_and (t, (Vector1x64)c.mmx_mask_3);
  109. - p = __builtin_ia32_por (r, t);
  110. - p = __builtin_ia32_por (g, p);
  111. + p = mmx_or (r, t);
  112. + p = mmx_or (g, p);
  113. - return (Vector4x16)__builtin_ia32_por (b, p);
  114. + return (Vector4x16)mmx_or (b, p);
  115. }
  116. static __inline__ void
  117. --- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.h.orig 2006-07-07 17:38:25.000000000 -0600
  118. +++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.h 2006-07-07 17:38:34.000000000 -0600
  119. @@ -146,9 +146,6 @@
  120. extern Bool RADEONProbe
  121. FunctionPrototype((DriverPtr, int));
  122. -extern SymTabRec RADEONChipsets[];
  123. -extern PciChipsets RADEONPciChipsets[];
  124. -
  125. /* radeon_driver.c */
  126. extern void RADEONLoaderRefSymLists
  127. FunctionPrototype((void));