From 37961456313877fad7248c9a6b6c4cba42be8ee4 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 6 Dec 2015 18:30:00 +0100 Subject: [PATCH] autoconf: check that named registers work --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ca17614d..def77598 100644 --- a/configure.ac +++ b/configure.ac @@ -418,7 +418,13 @@ AS_IF([test "$enable_asm" != "no"],[ #else # error !x86_64 #endif -__asm__ __volatile__ ("pxor %xmm12,%xmm6"); +unsigned char i = 0, o = 0, t; +__asm__ __volatile__ ("pxor %%xmm12, %%xmm6 \n" + "movb (%[i]), %[t] \n" + "addb %[t], (%[o]) \n" + : [t] "=&r"(t) + : [o] "D"(&o), [i] "S"(&i) + : "memory", "flags", "cc"); ]])], [AC_MSG_RESULT(yes) AC_DEFINE([HAVE_AMD64_ASM], [1], [x86_64 asm code can be used])