config.host: Append t-floattodi to tmake_file depending on host_address.
[gcc.git] / libitm / acinclude.m4
index 1031f1f12c81d11e953fe6ba7d88855aa3a108d6..ca7e0a92118029e69e8746d0852e7f91312556a4 100644 (file)
@@ -109,6 +109,45 @@ i[[34567]]86 | x86_64)
   ;;
 esac])
 
+dnl Check if as supports RTM instructions.
+AC_DEFUN([LIBITM_CHECK_AS_RTM], [
+case "${target_cpu}" in
+i[[34567]]86 | x86_64)
+  AC_CACHE_CHECK([if the assembler supports RTM], libitm_cv_as_rtm, [
+    AC_TRY_COMPILE([], [asm("1: xbegin 1b; xend");],
+                  [libitm_cv_as_rtm=yes], [libitm_cv_as_rtm=no])
+  ])
+  if test x$libitm_cv_as_rtm = xyes; then
+    AC_DEFINE(HAVE_AS_RTM, 1, [Define to 1 if the assembler supports RTM.])
+  fi
+  ;;
+esac])
+
+dnl Check if as supports HTM instructions.
+AC_DEFUN([LIBITM_CHECK_AS_HTM], [
+case "${target_cpu}" in
+powerpc*)
+  AC_CACHE_CHECK([if the assembler supports HTM], libitm_cv_as_htm, [
+    AC_TRY_COMPILE([], [asm("tbegin. 0; tend. 0");],
+                  [libitm_cv_as_htm=yes], [libitm_cv_as_htm=no])
+  ])
+  if test x$libitm_cv_as_htm = xyes; then
+    AC_DEFINE(HAVE_AS_HTM, 1, [Define to 1 if the assembler supports HTM.])
+  fi
+  ;;
+s390*)
+  AC_CACHE_CHECK([if the assembler supports HTM], libitm_cv_as_htm, [
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -march=zEC12"
+    AC_TRY_COMPILE([], [asm("tbegin 0,0; tend");],
+                  [libitm_cv_as_htm=yes], [libitm_cv_as_htm=no])
+    CFLAGS="$save_CFLAGS"])
+  if test x$libitm_cv_as_htm = xyes; then
+    AC_DEFINE(HAVE_AS_HTM, 1, [Define to 1 if the assembler supports HTM.])
+  fi
+  ;;
+esac])
+
 sinclude(../libtool.m4)
 dnl The lines below arrange for aclocal not to bring an installed
 dnl libtool.m4 into aclocal.m4, while still arranging for automake to