diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-10-09 22:12:23 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-10-12 15:04:27 -0400 |
commit | 8f75f638ab03078546cc89edfbec4f6801b77e5e (patch) | |
tree | 6c62e35435afb0f25425bdb1e4a5295f1264f684 | |
parent | 09a62d4dbc9a1a86ef7671c2abc9b7f753b86f64 (diff) |
configure.ac: Add check for pmulhuw assembly
Clang 3.0 chokes on the following bit of assembly
asm ("pmulhuw %1, %0\n\t"
: "+y" (__A)
: "y" (__B)
);
from pixman-mmx.c with this error message:
fatal error: error in backend: Unsupported asm: input constraint
with a matching output constraint of incompatible type!
So add a check in configure to only enable MMX when the compiler can
deal with it.
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 2dd4776..59e31c4 100644 --- a/configure.ac +++ b/configure.ac @@ -355,6 +355,12 @@ int main () { : "y" (v), "K" (5) ); + /* Some versions of clang will choke on this */ + asm ("pmulhuw %1, %0\n\t" + : "+y" (w) + : "y" (v) + ); + return _mm_cvtsi64_si32 (v); }]])], have_mmx_intrinsics=yes) CFLAGS=$xserver_save_CFLAGS |