mmx: Improve detection of support for "K" constraint

Graphics / Pixman - Andrea Canciani [gmail.com] - 18 November 2015 16:19 EST

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.

d24b415 mmx: Improve detection of support for "K" constraint
configure.ac | 22 +++++++++++++++++-----
pixman/pixman-mmx.c | 17 +----------------
2 files changed, 18 insertions(+), 21 deletions(-)

Upstream: cgit.freedesktop.org


  • Share