]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - configure
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.1-pull-request...
[thirdparty/qemu.git] / configure
index 37277fd591f2bf3938c23c25797020d6a7af03fc..c3da1a2587b9d09dd4504e4ee17b1a4882bf8762 100755 (executable)
--- a/configure
+++ b/configure
@@ -5161,6 +5161,21 @@ EOF
   fi
 fi
 
+cmpxchg128=no
+if test "$int128" = yes -a "$atomic128" = no; then
+  cat > $TMPC << EOF
+int main(void)
+{
+  unsigned __int128 x = 0, y = 0;
+  __sync_val_compare_and_swap_16(&x, y, x);
+  return 0;
+}
+EOF
+  if compile_prog "" "" ; then
+    cmpxchg128=yes
+  fi
+fi
+
 #########################################
 # See if 64-bit atomic operations are supported.
 # Note that without __atomic builtins, we can only
@@ -6673,6 +6688,10 @@ if test "$atomic128" = "yes" ; then
   echo "CONFIG_ATOMIC128=y" >> $config_host_mak
 fi
 
+if test "$cmpxchg128" = "yes" ; then
+  echo "CONFIG_CMPXCHG128=y" >> $config_host_mak
+fi
+
 if test "$atomic64" = "yes" ; then
   echo "CONFIG_ATOMIC64=y" >> $config_host_mak
 fi