summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2009-08-31 20:27:32 +0100
committerM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2009-09-03 22:47:24 +0300
commite7018685f0618640221ebc61446ee98ea3056bbb (patch)
treec6f9c55f775faa5dfc6ff9802dd63f9c9f50f4ed
parent04ade7b68c620a62daff6212eee4d1b96bfbc3c9 (diff)
Work around a Sun Studio 12 code generation bug involving _mm_set_epi32().
Calling a static function wrapper around _mm_set_epi32() when not using optimisation causes Sun Studio 12's cc to emit a spurious floating point load which confuses the assembler. Using a macro wrapper rather than a function steps around the problem.
-rw-r--r--pixman/pixman-sse2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index c81836a..e9cdf9e 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -2628,12 +2628,18 @@ create_mask_2x32_64 (uint32_t mask0,
return _mm_set_pi32 (mask0, mask1);
}
+/* Work around a code generation bug in Sun Studio 12. */
+#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
+# define create_mask_2x32_128(mask0, mask1) \
+ (_mm_set_epi32 ((mask0), (mask1), (mask0), (mask1)))
+#else
static force_inline __m128i
create_mask_2x32_128 (uint32_t mask0,
uint32_t mask1)
{
return _mm_set_epi32 (mask0, mask1, mask0, mask1);
}
+#endif
/* SSE2 code patch for fbcompose.c */