diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-31 04:46:20 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-31 04:46:20 +0000 |
commit | ca09a9c4de07f8031fc850b8e2920c3c1788f45f (patch) | |
tree | d14c657f9fcd9e62f20fcf5786a4d5d2d485b224 /libitm/acinclude.m4 | |
parent | b7a64c43385c5a7e334cea5e7afa226166513120 (diff) | |
download | gcc-ca09a9c4de07f8031fc850b8e2920c3c1788f45f.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193017 138bc75d-0d04-0410-961f-82ee72b054a4
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 1031f1f12c8..fe32fe3e4a0 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 |