autoconf: check that named registers work

This commit is contained in:
Frank Denis 2015-12-06 18:30:00 +01:00
parent b816a44b13
commit 3796145631

View File

@ -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])