From: M Joonas Pihlaja Date: Mon, 31 Aug 2009 19:27:32 +0000 (+0100) Subject: Work around a Sun Studio 12 code generation bug involving _mm_set_epi32(). X-Git-Tag: pixman-0.17.2~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7018685f0618640221ebc61446ee98ea3056bbb;p=platform%2Fupstream%2Fpixman.git 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. --- 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 */