Work around differing _mm_prefetch() prototypes on Solaris.
authorM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
Mon, 31 Aug 2009 19:24:04 +0000 (20:24 +0100)
committerM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
Thu, 3 Sep 2009 19:47:22 +0000 (22:47 +0300)
Sun Studio 12 expects the address to prefetch to be
a const char pointer rather than a __m128i pointer or
void pointer.

pixman/pixman-sse2.c

index 984614e..c81836a 100644 (file)
@@ -359,13 +359,13 @@ in_over_2x128 (__m128i* src_lo,
 static force_inline void
 cache_prefetch (__m128i* addr)
 {
-    _mm_prefetch (addr, _MM_HINT_T0);
+    _mm_prefetch ((void const*)addr, _MM_HINT_T0);
 }
 
 static force_inline void
 cache_prefetch_next (__m128i* addr)
 {
-    _mm_prefetch (addr + 4, _MM_HINT_T0); /* 64 bytes ahead */
+    _mm_prefetch ((void const *)(addr + 4), _MM_HINT_T0); /* 64 bytes ahead */
 }
 
 /* load 4 pixels from a 16-byte boundary aligned address */