diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-31 10:18:27 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-31 10:18:27 +0000 |
commit | d42d3fad6998402ea943bc2a3159cad09eb288d5 (patch) | |
tree | d70dbc97eb104b1c403ef6d4cff46da1ebf52c76 /libitm | |
parent | 8422fa6afbb619fc66678c664bfaf834691527fc (diff) | |
download | gcc-d42d3fad6998402ea943bc2a3159cad09eb288d5.tar.gz |
2012-10-31 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 193029 using svnmerge.py
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@193030 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libitm')
-rw-r--r-- | libitm/ChangeLog | 7 | ||||
-rw-r--r-- | libitm/acinclude.m4 | 14 | ||||
-rw-r--r-- | libitm/config.h.in | 3 | ||||
-rw-r--r-- | libitm/configure | 42 | ||||
-rw-r--r-- | libitm/configure.ac | 1 | ||||
-rw-r--r-- | libitm/testsuite/Makefile.in | 39 |
6 files changed, 68 insertions, 38 deletions
diff --git a/libitm/ChangeLog b/libitm/ChangeLog index 8f55f4eb327..d98ce071586 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,3 +1,10 @@ +2012-10-31 Richard Henderson <rth@redhat.com> + + * acinclude.m4 (LIBITM_CHECK_AS_RTM): New. + * configure.ac: Use it. + * config.h.in, configure: Rebuild. + * testsuite/Makefile.in: Rebuild. + 2012-10-24 Torvald Riegel <triegel@redhat.com> * libitm.texi: Clarify ABI requirements for data-logging functions. 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 diff --git a/libitm/config.h.in b/libitm/config.h.in index 1c3469cd5f9..10de95ba02a 100644 --- a/libitm/config.h.in +++ b/libitm/config.h.in @@ -12,6 +12,9 @@ /* Define if your assembler supports .cfi_* directives. */ #undef HAVE_AS_CFI_PSEUDO_OP +/* Define to 1 if the assembler supports RTM. */ +#undef HAVE_AS_RTM + /* Define to 1 if the target supports __attribute__((alias(...))). */ #undef HAVE_ATTRIBUTE_ALIAS diff --git a/libitm/configure b/libitm/configure index 9daf30c3836..d985cf7b918 100644 --- a/libitm/configure +++ b/libitm/configure @@ -2845,6 +2845,7 @@ target_alias=${target_alias-$host_alias} # no-define: PACKAGE and VERSION will not be #define'd in config.h (a bunch # of other PACKAGE_* variables will, however, and there's nothing # we can do about that; they come from AC_INIT). +# no-dist: we don't want 'dist' and related rules. # foreign: we don't follow the normal rules for GNU packages (no COPYING # file in the top srcdir, etc, etc), so stop complaining. # -Wall: turns on all automake warnings... @@ -11783,7 +11784,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11786 "configure" +#line 11787 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11889,7 +11890,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11892 "configure" +#line 11893 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -17331,6 +17332,43 @@ $as_echo "#define HAVE_AS_AVX 1" >>confdefs.h ;; esac +case "${target_cpu}" in +i[34567]86 | x86_64) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler supports RTM" >&5 +$as_echo_n "checking if the assembler supports RTM... " >&6; } +if test "${libitm_cv_as_rtm+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +asm("1: xbegin 1b; xend"); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + libitm_cv_as_rtm=yes +else + libitm_cv_as_rtm=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libitm_cv_as_rtm" >&5 +$as_echo "$libitm_cv_as_rtm" >&6; } + if test x$libitm_cv_as_rtm = xyes; then + +$as_echo "#define HAVE_AS_RTM 1" >>confdefs.h + + fi + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether weak refs work like ELF" >&5 $as_echo_n "checking whether weak refs work like ELF... " >&6; } diff --git a/libitm/configure.ac b/libitm/configure.ac index 198ca3277a5..8544686d8a2 100644 --- a/libitm/configure.ac +++ b/libitm/configure.ac @@ -244,6 +244,7 @@ CFLAGS="$save_CFLAGS $XCFLAGS" LIBITM_CHECK_SYNC_BUILTINS LIBITM_CHECK_64BIT_SYNC_BUILTINS LIBITM_CHECK_AS_AVX +LIBITM_CHECK_AS_RTM GCC_CHECK_ELF_STYLE_WEAKREF diff --git a/libitm/testsuite/Makefile.in b/libitm/testsuite/Makefile.in index 7e9278d4881..4d797813caa 100644 --- a/libitm/testsuite/Makefile.in +++ b/libitm/testsuite/Makefile.in @@ -52,7 +52,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = testsuite -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/asmcfi.m4 \ @@ -77,7 +77,6 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = -DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -85,7 +84,6 @@ am__can_run_installinfo = \ esac DEJATOOL = $(PACKAGE) RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ @@ -324,37 +322,6 @@ distclean-DEJAGNU: -l='$(DEJATOOL)'; for tool in $$l; do \ rm -f $$tool.sum $$tool.log; \ done - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU check: check-am @@ -460,8 +427,8 @@ uninstall-am: .PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ clean-libtool distclean distclean-DEJAGNU distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ + distclean-libtool dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ |