ARM: workaround for gcc bug in vshll_n_u8 intrinsic
authorSiarhei Siamashka <siarhei.siamashka@nokia.com>
Fri, 28 Aug 2009 19:34:21 +0000 (22:34 +0300)
committerSiarhei Siamashka <siarhei.siamashka@nokia.com>
Thu, 3 Sep 2009 16:51:47 +0000 (19:51 +0300)
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.

pixman/pixman-arm-neon.c

index 4125d1b..3e7f566 100644 (file)
@@ -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)
 {