From e7018685f0618640221ebc61446ee98ea3056bbb Mon Sep 17 00:00:00 2001 From: M Joonas Pihlaja Date: Mon, 31 Aug 2009 20:27:32 +0100 Subject: [PATCH] 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. --- pixman/pixman-sse2.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 */ -- 2.7.4