diff options
author | Richard Henderson <rth@redhat.com> | 2012-10-30 21:46:20 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2012-10-30 21:46:20 -0700 |
commit | 07d3b5c8c0d446ffb57d73d821dcf8156b12bf5d (patch) | |
tree | d14c657f9fcd9e62f20fcf5786a4d5d2d485b224 /libitm/acinclude.m4 | |
parent | d0a54439c14c34e38ab13d6ba1e4de8b35d1fbb9 (diff) | |
download | gcc-07d3b5c8c0d446ffb57d73d821dcf8156b12bf5d.zip gcc-07d3b5c8c0d446ffb57d73d821dcf8156b12bf5d.tar.gz gcc-07d3b5c8c0d446ffb57d73d821dcf8156b12bf5d.tar.bz2 |
Detect assembler support for RTM
* acinclude.m4 (LIBITM_CHECK_AS_RTM): New.
* configure.ac: Use it.
* config.h.in, configure: Rebuild.
* testsuite/Makefile.in: Rebuild.
From-SVN: r193017
Diffstat (limited to 'libitm/acinclude.m4')
-rw-r--r-- | libitm/acinclude.m4 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libitm/acinclude.m4 b/libitm/acinclude.m4 index 1031f1f..fe32fe3 100644 --- a/libitm/acinclude.m4 +++ b/libitm/acinclude.m4 @@ -109,6 +109,20 @@ 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]) + 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 |