From: Siarhei Siamashka Date: Fri, 28 Aug 2009 19:34:21 +0000 (+0300) Subject: ARM: workaround for gcc bug in vshll_n_u8 intrinsic X-Git-Tag: pixman-0.17.2~83 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e228377f9e7159a52a3716d8e4930c5a9dbb1af;p=platform%2Fupstream%2Fpixman.git ARM: workaround for gcc bug in vshll_n_u8 intrinsic Some versions of gcc (cs2009q1, 4.4.1) incorrectly reject shift operand having value >= 8, claiming that it is out of range. So inline assembly is used as a workaround. --- diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c index eab0ac4..422b95e 100644 --- a/pixman/pixman-arm-neon.c +++ b/pixman/pixman-arm-neon.c @@ -64,6 +64,12 @@ unpack0565 (uint16x8_t rgb) return res; } +#ifdef USE_GCC_INLINE_ASM +/* Some versions of gcc have problems with vshll_n_u8 intrinsic (Bug 23576) */ +#define vshll_n_u8(a, n) ({ uint16x8_t r; \ + asm ("vshll.u8 %q0, %P1, %2\n" : "=w" (r) : "w" (a), "i" (n)); r; }) +#endif + static force_inline uint16x8_t pack0565 (uint8x8x4_t s) {