diff -rpu ../pixman-0.12.0/pixman/pixman-mmx.c ./pixman/pixman-mmx.c --- ../pixman-0.12.0/pixman/pixman-mmx.c 2008-09-13 18:29:33.000000000 +0300 +++ ./pixman/pixman-mmx.c 2008-09-25 20:28:30.335750000 +0300 @@ -982,7 +982,7 @@ fbCompositeSolid_nx8888mmx (pixman_op_t CHECKPOINT(); - while (w && (unsigned long)dst & 7) + while (w && (uintptr_t)dst & 7) { *dst = store8888(over(vsrc, vsrca, load8888(*dst))); @@ -1060,7 +1060,7 @@ fbCompositeSolid_nx0565mmx (pixman_op_t CHECKPOINT(); - while (w && (unsigned long)dst & 7) + while (w && (uintptr_t)dst & 7) { ullong d = *dst; __m64 vdest = expand565 (M64(d), 0); @@ -1145,7 +1145,7 @@ fbCompositeSolidMask_nx8888x8888Cmmx (pi uint32_t *p = (uint32_t *)maskLine; uint32_t *q = (uint32_t *)dstLine; - while (twidth && (unsigned long)q & 7) + while (twidth && (uintptr_t)q & 7) { uint32_t m = *(uint32_t *)p; @@ -1248,7 +1248,7 @@ fbCompositeSrc_8888x8x8888mmx (pixman_op srcLine += srcStride; w = width; - while (w && (unsigned long)dst & 7) + while (w && (uintptr_t)dst & 7) { __m64 s = load8888 (*src); __m64 d = load8888 (*dst); @@ -1332,7 +1332,7 @@ fbCompositeSrc_x888xnx8888mmx (pixman_op srcLine += srcStride; w = width; - while (w && (unsigned long)dst & 7) + while (w && (uintptr_t)dst & 7) { __m64 s = load8888 (*src | 0xff000000); __m64 d = load8888 (*dst); @@ -1517,7 +1517,7 @@ fbCompositeSrc_8888x0565mmx (pixman_op_t CHECKPOINT(); - while (w && (unsigned long)dst & 7) + while (w && (uintptr_t)dst & 7) { __m64 vsrc = load8888 (*src); ullong d = *dst; @@ -1627,7 +1627,7 @@ fbCompositeSolidMask_nx8x8888mmx (pixman CHECKPOINT(); - while (w && (unsigned long)dst & 7) + while (w && (uintptr_t)dst & 7) { ullong m = *mask; @@ -1771,21 +1771,21 @@ pixman_fill_mmx (uint32_t *bits, byte_line += stride; w = byte_width; - while (w >= 1 && ((unsigned long)d & 1)) + while (w >= 1 && ((uintptr_t)d & 1)) { *(uint8_t *)d = (xor & 0xff); w--; d++; } - while (w >= 2 && ((unsigned long)d & 3)) + while (w >= 2 && ((uintptr_t)d & 3)) { *(uint16_t *)d = xor; w -= 2; d += 2; } - while (w >= 4 && ((unsigned long)d & 7)) + while (w >= 4 && ((uintptr_t)d & 7)) { *(uint32_t *)d = xor; @@ -1902,7 +1902,7 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pix CHECKPOINT(); - while (w && (unsigned long)dst & 7) + while (w && (uintptr_t)dst & 7) { ullong m = *mask; @@ -2033,7 +2033,7 @@ fbCompositeSolidMask_nx8x0565mmx (pixman CHECKPOINT(); - while (w && (unsigned long)dst & 7) + while (w && (uintptr_t)dst & 7) { ullong m = *mask; @@ -2152,7 +2152,7 @@ fbCompositeSrc_8888RevNPx0565mmx (pixman CHECKPOINT(); - while (w && (unsigned long)dst & 7) + while (w && (uintptr_t)dst & 7) { __m64 vsrc = load8888 (*src); ullong d = *dst; @@ -2271,7 +2271,7 @@ fbCompositeSrc_8888RevNPx8888mmx (pixman srcLine += srcStride; w = width; - while (w && (unsigned long)dst & 7) + while (w && (uintptr_t)dst & 7) { __m64 s = load8888 (*src); __m64 d = load8888 (*dst); @@ -2373,7 +2373,7 @@ fbCompositeSolidMask_nx8888x0565Cmmx (pi uint32_t *p = (uint32_t *)maskLine; uint16_t *q = (uint16_t *)dstLine; - while (twidth && ((unsigned long)q & 7)) + while (twidth && ((uintptr_t)q & 7)) { uint32_t m = *(uint32_t *)p; @@ -2482,8 +2482,8 @@ fbCompositeIn_nx8x8mmx (pixman_op_t op, maskLine += maskStride; w = width; - if ((((unsigned long)pDst & 3) == 0) && - (((unsigned long)pSrc & 3) == 0)) + if ((((uintptr_t)pDst & 3) == 0) && + (((uintptr_t)pSrc & 3) == 0)) { while (w >= 4) { @@ -2554,8 +2554,8 @@ fbCompositeIn_8x8mmx (pixman_op_t op, srcLine += srcStride; w = width; - if ((((unsigned long)pDst & 3) == 0) && - (((unsigned long)pSrc & 3) == 0)) + if ((((uintptr_t)pDst & 3) == 0) && + (((uintptr_t)pSrc & 3) == 0)) { while (w >= 4) { @@ -2630,8 +2630,8 @@ fbCompositeSrcAdd_8888x8x8mmx (pixman_op maskLine += maskStride; w = width; - if ((((unsigned long)pMask & 3) == 0) && - (((unsigned long)pDst & 3) == 0)) + if ((((uintptr_t)pMask & 3) == 0) && + (((uintptr_t)pDst & 3) == 0)) { while (w >= 4) { @@ -2700,7 +2700,7 @@ fbCompositeSrcAdd_8000x8000mmx (pixman_o srcLine += srcStride; w = width; - while (w && (unsigned long)dst & 7) + while (w && (uintptr_t)dst & 7) { s = *src; d = *dst; @@ -2771,7 +2771,7 @@ fbCompositeSrcAdd_8888x8888mmx (pixman_o srcLine += srcStride; w = width; - while (w && (unsigned long)dst & 7) + while (w && (uintptr_t)dst & 7) { *dst = _mm_cvtsi64_si32(_mm_adds_pu8(_mm_cvtsi32_si64(*src), _mm_cvtsi32_si64(*dst))); @@ -2848,7 +2848,7 @@ pixman_blt_mmx (uint32_t *src_bits, dst_bytes += dst_stride; w = byte_width; - while (w >= 2 && ((unsigned long)d & 3)) + while (w >= 2 && ((uintptr_t)d & 3)) { *(uint16_t *)d = *(uint16_t *)s; w -= 2; @@ -2856,7 +2856,7 @@ pixman_blt_mmx (uint32_t *src_bits, d += 2; } - while (w >= 4 && ((unsigned long)d & 7)) + while (w >= 4 && ((uintptr_t)d & 7)) { *(uint32_t *)d = *(uint32_t *)s; diff -rpu ../pixman-0.12.0/pixman/pixman-private.h ./pixman/pixman-private.h --- ../pixman-0.12.0/pixman/pixman-private.h 2008-09-09 15:29:42.000000000 +0300 +++ ./pixman/pixman-private.h 2008-09-25 20:28:30.304500000 +0300 @@ -6,6 +6,7 @@ #define PIXMAN_PRIVATE_H #include "pixman.h" +#include #include #ifndef FALSE @@ -421,19 +422,19 @@ union pixman_image } #if IMAGE_BYTE_ORDER == MSBFirst -#define Fetch24(img, a) ((unsigned long) (a) & 1 ? \ +#define Fetch24(img, a) ((uintptr_t) (a) & 1 ? \ ((READ(img, a) << 16) | READ(img, (uint16_t *) ((a)+1))) : \ ((READ(img, (uint16_t *) (a)) << 8) | READ(img, (a)+2))) -#define Store24(img,a,v) ((unsigned long) (a) & 1 ? \ +#define Store24(img,a,v) ((uintptr_t) (a) & 1 ? \ (WRITE(img, a, (uint8_t) ((v) >> 16)), \ WRITE(img, (uint16_t *) ((a)+1), (uint16_t) (v))) : \ (WRITE(img, (uint16_t *) (a), (uint16_t) ((v) >> 8)), \ WRITE(img, (a)+2, (uint8_t) (v)))) #else -#define Fetch24(img,a) ((unsigned long) (a) & 1 ? \ +#define Fetch24(img,a) ((uintptr_t) (a) & 1 ? \ (READ(img, a) | (READ(img, (uint16_t *) ((a)+1)) << 8)) : \ (READ(img, (uint16_t *) (a)) | (READ(img, (a)+2) << 16))) -#define Store24(img,a,v) ((unsigned long) (a) & 1 ? \ +#define Store24(img,a,v) ((uintptr_t) (a) & 1 ? \ (WRITE(img, a, (uint8_t) (v)), \ WRITE(img, (uint16_t *) ((a)+1), (uint16_t) ((v) >> 8))) : \ (WRITE(img, (uint16_t *) (a), (uint16_t) (v)), \ @@ -727,7 +728,7 @@ pixman_compute_composite_region32 (pixma uint16_t height); /* GCC visibility */ -#if defined(__GNUC__) && __GNUC__ >= 4 +#if !defined(_WIN32) && defined(__GNUC__) && __GNUC__ >= 4 #define PIXMAN_EXPORT __attribute__ ((visibility("default"))) /* Sun Studio 8 visibility */ #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) diff -rpu ../pixman-0.12.0/pixman/pixman-sse2.c ./pixman/pixman-sse2.c --- ../pixman-0.12.0/pixman/pixman-sse2.c 2008-09-17 16:50:49.000000000 +0300 +++ ./pixman/pixman-sse2.c 2008-09-25 20:28:30.413875000 +0300 @@ -507,7 +507,7 @@ coreCombineOverUsse2 (uint32_t* pd, cons /* Align dst on a 16-byte boundary */ while (w && - ((unsigned long)pd & 15)) + ((uintptr_t)pd & 15)) { d = *pd; s = *ps++; @@ -581,7 +581,7 @@ coreCombineOverReverseUsse2 (uint32_t* p /* Align dst on a 16-byte boundary */ while (w && - ((unsigned long)pd & 15)) + ((uintptr_t)pd & 15)) { d = *pd; s = *ps++; @@ -658,7 +658,7 @@ coreCombineInUsse2 (uint32_t* pd, const cachePrefetch ((__m128i*)ps); cachePrefetch ((__m128i*)pd); - while (w && ((unsigned long) pd & 15)) + while (w && ((uintptr_t) pd & 15)) { s = *ps++; d = *pd; @@ -715,7 +715,7 @@ coreCombineReverseInUsse2 (uint32_t* pd, cachePrefetch ((__m128i*)ps); cachePrefetch ((__m128i*)pd); - while (w && ((unsigned long) pd & 15)) + while (w && ((uintptr_t) pd & 15)) { s = *ps++; d = *pd; @@ -767,7 +767,7 @@ coreCombineReverseOutUsse2 (uint32_t* pd cachePrefetch ((__m128i*)ps); cachePrefetch ((__m128i*)pd); - while (w && ((unsigned long) pd & 15)) + while (w && ((uintptr_t) pd & 15)) { uint32_t s = *ps++; uint32_t d = *pd; @@ -824,7 +824,7 @@ coreCombineOutUsse2 (uint32_t* pd, const cachePrefetch ((__m128i*)ps); cachePrefetch ((__m128i*)pd); - while (w && ((unsigned long) pd & 15)) + while (w && ((uintptr_t) pd & 15)) { uint32_t s = *ps++; uint32_t d = *pd; @@ -900,7 +900,7 @@ coreCombineAtopUsse2 (uint32_t* pd, cons cachePrefetch ((__m128i*)ps); cachePrefetch ((__m128i*)pd); - while (w && ((unsigned long) pd & 15)) + while (w && ((uintptr_t) pd & 15)) { s = *ps++; d = *pd; @@ -977,7 +977,7 @@ coreCombineReverseAtopUsse2 (uint32_t* p cachePrefetch ((__m128i*)ps); cachePrefetch ((__m128i*)pd); - while (w && ((unsigned long) pd & 15)) + while (w && ((uintptr_t) pd & 15)) { s = *ps++; d = *pd; @@ -1057,7 +1057,7 @@ coreCombineXorUsse2 (uint32_t* dst, cons cachePrefetch ((__m128i*)ps); cachePrefetch ((__m128i*)pd); - while (w && ((unsigned long) pd & 15)) + while (w && ((uintptr_t) pd & 15)) { s = *ps++; d = *pd; @@ -1121,7 +1121,7 @@ coreCombineAddUsse2 (uint32_t* dst, cons cachePrefetch ((__m128i*)ps); cachePrefetch ((__m128i*)pd); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; d = *pd; @@ -1183,7 +1183,7 @@ coreCombineSaturateUsse2 (uint32_t *pd, cachePrefetch ((__m128i*)ps); cachePrefetch ((__m128i*)pd); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; d = *pd; @@ -1259,7 +1259,7 @@ coreCombineSrcCsse2 (uint32_t* pd, const cachePrefetch ((__m128i*)pd); cachePrefetch ((__m128i*)pm); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; m = *pm++; @@ -1330,7 +1330,7 @@ coreCombineOverCsse2 (uint32_t* pd, cons cachePrefetch ((__m128i*)pd); cachePrefetch ((__m128i*)pm); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; m = *pm++; @@ -1406,7 +1406,7 @@ coreCombineOverReverseCsse2 (uint32_t* p cachePrefetch ((__m128i*)pd); cachePrefetch ((__m128i*)pm); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; m = *pm++; @@ -1475,7 +1475,7 @@ coreCombineInCsse2 (uint32_t *pd, uint32 cachePrefetch ((__m128i*)pd); cachePrefetch ((__m128i*)pm); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; m = *pm++; @@ -1546,7 +1546,7 @@ coreCombineInReverseCsse2 (uint32_t *pd, cachePrefetch ((__m128i*)pd); cachePrefetch ((__m128i*)pm); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; m = *pm++; @@ -1619,7 +1619,7 @@ coreCombineOutCsse2 (uint32_t *pd, uint3 cachePrefetch ((__m128i*)pd); cachePrefetch ((__m128i*)pm); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; m = *pm++; @@ -1691,7 +1691,7 @@ coreCombineOutReverseCsse2 (uint32_t *pd cachePrefetch ((__m128i*)pd); cachePrefetch ((__m128i*)pm); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; m = *pm++; @@ -1783,7 +1783,7 @@ coreCombineAtopCsse2 (uint32_t *pd, uint cachePrefetch ((__m128i*)pd); cachePrefetch ((__m128i*)pm); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; m = *pm++; @@ -1876,7 +1876,7 @@ coreCombineReverseAtopCsse2 (uint32_t *p cachePrefetch ((__m128i*)pd); cachePrefetch ((__m128i*)pm); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; m = *pm++; @@ -1970,7 +1970,7 @@ coreCombineXorCsse2 (uint32_t *pd, uint3 cachePrefetch ((__m128i*)pd); cachePrefetch ((__m128i*)pm); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; m = *pm++; @@ -2046,7 +2046,7 @@ coreCombineAddCsse2 (uint32_t *pd, uint3 cachePrefetch ((__m128i*)pd); cachePrefetch ((__m128i*)pm); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { s = *ps++; m = *pm++; @@ -2410,7 +2410,7 @@ fbCompositeSolid_nx8888sse2 (pixman_op_t dstLine += dstStride; w = width; - while (w && (unsigned long)dst & 15) + while (w && (uintptr_t)dst & 15) { d = *dst; *dst++ = pack_1x64_32 (over_1x64 (_mm_movepi64_pi64 (xmmSrc), @@ -2496,7 +2496,7 @@ fbCompositeSolid_nx0565sse2 (pixman_op_t dstLine += dstStride; w = width; - while (w && (unsigned long)dst & 15) + while (w && (uintptr_t)dst & 15) { d = *dst; @@ -2597,7 +2597,7 @@ fbCompositeSolidMask_nx8888x8888Csse2 (p cachePrefetch ((__m128i*)pd); cachePrefetch ((__m128i*)pm); - while (w && (unsigned long)pd & 15) + while (w && (uintptr_t)pd & 15) { m = *pm++; @@ -2721,7 +2721,7 @@ fbCompositeSrc_8888x8x8888sse2 (pixman_o cachePrefetch ((__m128i*)dst); cachePrefetch ((__m128i*)src); - while (w && (unsigned long)dst & 15) + while (w && (uintptr_t)dst & 15) { uint32_t s = *src++; uint32_t d = *dst; @@ -2833,7 +2833,7 @@ fbCompositeSrc_x888xnx8888sse2 (pixman_o cachePrefetch ((__m128i*)dst); cachePrefetch ((__m128i*)src); - while (w && (unsigned long)dst & 15) + while (w && (uintptr_t)dst & 15) { uint32_t s = (*src++) | 0xff000000; uint32_t d = *dst; @@ -3000,7 +3000,7 @@ fbCompositeSrc_8888x0565sse2 (pixman_op_ /* Align dst on a 16-byte boundary */ while (w && - ((unsigned long)dst & 15)) + ((uintptr_t)dst & 15)) { s = *src++; d = *dst; @@ -3117,7 +3117,7 @@ fbCompositeSolidMask_nx8x8888sse2 (pixma cachePrefetch ((__m128i*)mask); cachePrefetch ((__m128i*)dst); - while (w && (unsigned long)dst & 15) + while (w && (uintptr_t)dst & 15) { uint8_t m = *mask++; @@ -3252,14 +3252,14 @@ pixmanFillsse2 (uint32_t *bits, cachePrefetchNext ((__m128i*)d); - while (w >= 2 && ((unsigned long)d & 3)) + while (w >= 2 && ((uintptr_t)d & 3)) { *(uint16_t *)d = data; w -= 2; d += 2; } - while (w >= 4 && ((unsigned long)d & 15)) + while (w >= 4 && ((uintptr_t)d & 15)) { *(uint32_t *)d = data; @@ -3393,7 +3393,7 @@ fbCompositeSolidMaskSrc_nx8x8888sse2 (pi cachePrefetch ((__m128i*)mask); cachePrefetch ((__m128i*)dst); - while (w && (unsigned long)dst & 15) + while (w && (uintptr_t)dst & 15) { uint8_t m = *mask++; @@ -3527,7 +3527,7 @@ fbCompositeSolidMask_nx8x0565sse2 (pixma cachePrefetch ((__m128i*)mask); cachePrefetch ((__m128i*)dst); - while (w && (unsigned long)dst & 15) + while (w && (uintptr_t)dst & 15) { m = *mask++; @@ -3672,7 +3672,7 @@ fbCompositeSrc_8888RevNPx0565sse2 (pixma cachePrefetch ((__m128i*)src); cachePrefetch ((__m128i*)dst); - while (w && (unsigned long)dst & 15) + while (w && (uintptr_t)dst & 15) { s = *src++; d = *dst; @@ -3804,7 +3804,7 @@ fbCompositeSrc_8888RevNPx8888sse2 (pixma cachePrefetch ((__m128i*)src); cachePrefetch ((__m128i*)dst); - while (w && (unsigned long)dst & 15) + while (w && (uintptr_t)dst & 15) { s = *src++; d = *dst; @@ -3923,7 +3923,7 @@ fbCompositeSolidMask_nx8888x0565Csse2 (p cachePrefetch ((__m128i*)mask); cachePrefetch ((__m128i*)dst); - while (w && ((unsigned long)dst & 15)) + while (w && ((uintptr_t)dst & 15)) { m = *(uint32_t *) mask; @@ -4066,7 +4066,7 @@ fbCompositeIn_nx8x8sse2 (pixman_op_t op, cachePrefetch ((__m128i*)mask); cachePrefetch ((__m128i*)dst); - while (w && ((unsigned long)dst & 15)) + while (w && ((uintptr_t)dst & 15)) { m = (uint32_t) *mask++; d = (uint32_t) *dst; @@ -4158,7 +4158,7 @@ fbCompositeIn_8x8sse2 (pixman_op_t op, cachePrefetch ((__m128i*)src); cachePrefetch ((__m128i*)dst); - while (w && ((unsigned long)dst & 15)) + while (w && ((uintptr_t)dst & 15)) { s = (uint32_t) *src++; d = (uint32_t) *dst; @@ -4258,7 +4258,7 @@ fbCompositeSrcAdd_8888x8x8sse2 (pixman_o cachePrefetch ((__m128i*)mask); cachePrefetch ((__m128i*)dst); - while (w && ((unsigned long)dst & 15)) + while (w && ((uintptr_t)dst & 15)) { m = (uint32_t) *mask++; d = (uint32_t) *dst; @@ -4351,7 +4351,7 @@ fbCompositeSrcAdd_8000x8000sse2 (pixman_ w = width; /* Small head */ - while (w && (unsigned long)dst & 3) + while (w && (uintptr_t)dst & 3) { t = (*dst) + (*src++); *dst++ = t | (0 - (t >> 8)); @@ -4476,7 +4476,7 @@ pixmanBltsse2 (uint32_t *src_bits, cachePrefetchNext ((__m128i*)s); cachePrefetchNext ((__m128i*)d); - while (w >= 2 && ((unsigned long)d & 3)) + while (w >= 2 && ((uintptr_t)d & 3)) { *(uint16_t *)d = *(uint16_t *)s; w -= 2; @@ -4484,7 +4484,7 @@ pixmanBltsse2 (uint32_t *src_bits, d += 2; } - while (w >= 4 && ((unsigned long)d & 15)) + while (w >= 4 && ((uintptr_t)d & 15)) { *(uint32_t *)d = *(uint32_t *)s; @@ -4627,7 +4627,7 @@ fbCompositeOver_x888x8x8888sse2 (pixman_ cachePrefetch ((__m128i*)dst); cachePrefetch ((__m128i*)mask); - while (w && (unsigned long)dst & 15) + while (w && (uintptr_t)dst & 15) { s = 0xff000000 | *src++; m = (uint32_t) *mask++;