mmx: Improve detection of support for "K" constraint
authorAndrea Canciani <ranma42@gmail.com>
Sun, 11 Oct 2015 07:45:57 +0000 (09:45 +0200)
committerMatt Turner <mattst88@gmail.com>
Wed, 18 Nov 2015 22:19:58 +0000 (14:19 -0800)
commitd24b415f3e2753a588759d028b811e1ce38fea6c
tree3d9ebc068aeae2a766d99c01e59d24816c3a7123
parent312e381523662aacc2f0ea90eb9ae0634ac5b327
mmx: Improve detection of support for "K" constraint

Older versions of clang emitted an error on the "K" constraint, but at
least since version 3.7 it is supported. Just like gcc, this
constraint is only allowed for constants, but apparently clang
requires them to be known before inlining.

Using the macro definition _mm_shuffle_pi16(A, N) ensures that the "K"
constraint is always applied to a literal constant, independently from
the compiler optimizations and allows building pixman-mmx on modern
clang.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Andrea Canciani <ranma42@gmail.com>
configure.ac
pixman/pixman-mmx.c