blob: 80143b5a21eaf16c97d3e8872a32bcf7253a348b [file] [log] [blame]
Apply a patch from pixman upstream to fix the follwing build error with clang:
pixman-mmx.c:100:20: error: constraint 'K' expects an integer constant expression
: "y" (__A), "K" (__N)
The error happens because __N is a function parameter and clang does not
process it as an integer literal by design.
Fix this by forcing the macro version of the function which exposes __N value
as an integer literal. https://crbug.com/793487
diff -Nuar old/pixman/pixman-mmx.c new/pixman/pixman-mmx.c
--- old/pixman/pixman-mmx.c
+++ new/pixman/pixman-mmx.c
@@ -89,20 +89,6 @@
return __A;
}
-# ifdef __OPTIMIZE__
-extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
-_mm_shuffle_pi16 (__m64 __A, int8_t const __N)
-{
- __m64 ret;
-
- asm ("pshufw %2, %1, %0\n\t"
- : "=y" (ret)
- : "y" (__A), "K" (__N)
- );
-
- return ret;
-}
-# else
# define _mm_shuffle_pi16(A, N) \
({ \
__m64 ret; \
@@ -114,7 +100,6 @@
\
ret; \
})
-# endif
# endif
#endif