diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-20 18:53:56 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-01-20 18:53:56 +0000 |
commit | 7a3e02304c0816b1e8d9014d05ed5cd97b5a32b7 (patch) | |
tree | ee02bbe4cd51bf787e15f581e6326d4124f85230 /libitm | |
parent | f3a7179f52a3d73cb01bfd06064683623375e050 (diff) | |
download | gcc-7a3e02304c0816b1e8d9014d05ed5cd97b5a32b7.tar.gz |
PR bootstrap/69343
PR bootstrap/69339
PR tree-opt/68964
Revert:
gcc/
* tree.c (tm_define_builtin): New.
(find_tm_vector_type): New.
(build_tm_vector_builtins): New.
(build_common_builtin_nodes): Call it.
libitm/
* Makefile.am (libitm_la_SOURCES) [ARCH_AARCH64]: Add vect128.cc
(libitm_la_SOURCES) [ARCH_ARM]: Add neon.cc
(libitm_la_SOURCES) [ARCH_PPC]: Add vect128.cc
(libitm_la_SOURCES) [ARCH_S390]: Add vect128.cc
* configure.ac (ARCH_AARCH64): New conditional.
(ARCH_PPC, ARCH_S390): Likewise.
* Makefile.in, configure: Rebuild.
* libitm.h (_ITM_TYPE_M128): Always define.
* vect64.cc: Split ...
* vect128.cc: ... out of...
* config/x86/x86_sse.cc: ... here.
* config/arm/neon.cc: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232631 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libitm')
-rw-r--r-- | libitm/ChangeLog | 21 | ||||
-rw-r--r-- | libitm/Makefile.am | 20 | ||||
-rw-r--r-- | libitm/Makefile.in | 35 | ||||
-rw-r--r-- | libitm/config/arm/neon.cc | 3 | ||||
-rw-r--r-- | libitm/config/x86/x86_sse.cc (renamed from libitm/vect128.cc) | 7 | ||||
-rw-r--r-- | libitm/configure | 50 | ||||
-rw-r--r-- | libitm/configure.ac | 3 | ||||
-rw-r--r-- | libitm/libitm.h | 6 | ||||
-rw-r--r-- | libitm/vect64.cc | 36 |
9 files changed, 50 insertions, 131 deletions
diff --git a/libitm/ChangeLog b/libitm/ChangeLog index d0f37b1ed64..07c0ebc30a1 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,3 +1,24 @@ +2016-01-19 Richard Henderson <rth@redhat.com> + + PR bootstrap/69343 + PR bootstrap/69339 + Revert: + 2016-01-13 Richard Henderson <rth@redhat.com> + + * Makefile.am (libitm_la_SOURCES) [ARCH_AARCH64]: Add vect128.cc + (libitm_la_SOURCES) [ARCH_ARM]: Add neon.cc + (libitm_la_SOURCES) [ARCH_PPC]: Add vect128.cc + (libitm_la_SOURCES) [ARCH_S390]: Add vect128.cc + * configure.ac (ARCH_AARCH64): New conditional. + (ARCH_PPC, ARCH_S390): Likewise. + * Makefile.in, configure: Rebuild. + + * libitm.h (_ITM_TYPE_M128): Always define. + * vect64.cc: Split ... + * vect128.cc: ... out of... + * config/x86/x86_sse.cc: ... here. + * config/arm/neon.cc: New file. + 2016-01-19 Torvald Riegel <triegel@redhat.com> * local_type_traits: Remove file. diff --git a/libitm/Makefile.am b/libitm/Makefile.am index 6e1438d6191..1dce82d62f1 100644 --- a/libitm/Makefile.am +++ b/libitm/Makefile.am @@ -62,26 +62,16 @@ libitm_la_SOURCES = \ query.cc retry.cc rwlock.cc useraction.cc util.cc \ sjlj.S tls.cc method-serial.cc method-gl.cc method-ml.cc -if ARCH_AARCH64 -libitm_la_SOURCES += vect128.cc -endif if ARCH_ARM -libitm_la_SOURCES += hwcap.cc neon.cc -endif -if ARCH_PPC -libitm_la_SOURCES += vect128.cc -vect128.lo : override CXXFLAGS += -maltivec -endif -if ARCH_S390 -libitm_la_SOURCES += vect128.cc -vect128.lo : override CXXFLAGS += -march=z13 +libitm_la_SOURCES += hwcap.cc endif if ARCH_X86 -libitm_la_SOURCES += vect64.cc vect128.cc x86_avx.cc -vect64.lo : override CXXFLAGS += -msse -vect128.lo : override CXXFLAGS += -msse +libitm_la_SOURCES += x86_sse.cc x86_avx.cc +# Make sure -msse is appended at the end. +x86_sse.lo : override CXXFLAGS += -msse endif if ARCH_X86_AVX +# Make sure -mavx is appended at the end. x86_avx.lo : override CXXFLAGS += -mavx endif diff --git a/libitm/Makefile.in b/libitm/Makefile.in index f2cbb5cb720..138eeb1c9da 100644 --- a/libitm/Makefile.in +++ b/libitm/Makefile.in @@ -53,12 +53,9 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@ARCH_AARCH64_TRUE@am__append_1 = vect128.cc -@ARCH_ARM_TRUE@am__append_2 = hwcap.cc neon.cc -@ARCH_PPC_TRUE@am__append_3 = vect128.cc -@ARCH_S390_TRUE@am__append_4 = vect128.cc -@ARCH_X86_TRUE@am__append_5 = vect64.cc vect128.cc x86_avx.cc -@ARCH_FUTEX_TRUE@am__append_6 = futex.cc +@ARCH_ARM_TRUE@am__append_1 = hwcap.cc +@ARCH_X86_TRUE@am__append_2 = x86_sse.cc x86_avx.cc +@ARCH_FUTEX_TRUE@am__append_3 = futex.cc subdir = . DIST_COMMON = ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ @@ -120,18 +117,14 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(infodir)" \ "$(DESTDIR)$(toolexeclibdir)" LTLIBRARIES = $(toolexeclib_LTLIBRARIES) libitm_la_LIBADD = -@ARCH_AARCH64_TRUE@am__objects_1 = vect128.lo -@ARCH_ARM_TRUE@am__objects_2 = hwcap.lo neon.lo -@ARCH_PPC_TRUE@am__objects_3 = vect128.lo -@ARCH_S390_TRUE@am__objects_4 = vect128.lo -@ARCH_X86_TRUE@am__objects_5 = vect64.lo vect128.lo x86_avx.lo -@ARCH_FUTEX_TRUE@am__objects_6 = futex.lo +@ARCH_ARM_TRUE@am__objects_1 = hwcap.lo +@ARCH_X86_TRUE@am__objects_2 = x86_sse.lo x86_avx.lo +@ARCH_FUTEX_TRUE@am__objects_3 = futex.lo am_libitm_la_OBJECTS = aatree.lo alloc.lo alloc_c.lo alloc_cpp.lo \ barrier.lo beginend.lo clone.lo eh_cpp.lo local.lo query.lo \ retry.lo rwlock.lo useraction.lo util.lo sjlj.lo tls.lo \ method-serial.lo method-gl.lo method-ml.lo $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) $(am__objects_4) \ - $(am__objects_5) $(am__objects_6) + $(am__objects_2) $(am__objects_3) libitm_la_OBJECTS = $(am_libitm_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/../depcomp @@ -369,8 +362,7 @@ libitm_la_SOURCES = aatree.cc alloc.cc alloc_c.cc alloc_cpp.cc \ barrier.cc beginend.cc clone.cc eh_cpp.cc local.cc query.cc \ retry.cc rwlock.cc useraction.cc util.cc sjlj.S tls.cc \ method-serial.cc method-gl.cc method-ml.cc $(am__append_1) \ - $(am__append_2) $(am__append_3) $(am__append_4) \ - $(am__append_5) $(am__append_6) + $(am__append_2) $(am__append_3) # Automake Documentation: # If your package has Texinfo files in many directories, you can use the @@ -503,7 +495,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/method-gl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/method-ml.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/method-serial.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/query.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/retry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rwlock.Plo@am__quote@ @@ -511,9 +502,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tls.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/useraction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vect128.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vect64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x86_avx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x86_sse.Plo@am__quote@ .S.o: @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -1106,10 +1096,9 @@ vpath % $(strip $(search_path)) @LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBITM_BUILD_VERSIONED_SHLIB_TRUE@ `echo $(libitm_la_LIBADD) | \ @LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBITM_BUILD_VERSIONED_SHLIB_TRUE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ @LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBITM_BUILD_VERSIONED_SHLIB_TRUE@ > $@ || (rm -f $@ ; exit 1) -@ARCH_PPC_TRUE@vect128.lo : override CXXFLAGS += -maltivec -@ARCH_S390_TRUE@vect128.lo : override CXXFLAGS += -march=z13 -@ARCH_X86_TRUE@vect64.lo : override CXXFLAGS += -msse -@ARCH_X86_TRUE@vect128.lo : override CXXFLAGS += -msse +# Make sure -msse is appended at the end. +@ARCH_X86_TRUE@x86_sse.lo : override CXXFLAGS += -msse +# Make sure -mavx is appended at the end. @ARCH_X86_AVX_TRUE@x86_avx.lo : override CXXFLAGS += -mavx all-local: $(STAMP_GENINSRC) diff --git a/libitm/config/arm/neon.cc b/libitm/config/arm/neon.cc deleted file mode 100644 index a9c3074405e..00000000000 --- a/libitm/config/arm/neon.cc +++ /dev/null @@ -1,3 +0,0 @@ -#ifdef __ARM_NEON -#include <vect128.cc> -#endif diff --git a/libitm/vect128.cc b/libitm/config/x86/x86_sse.cc index 18453acf735..c3b7237f180 100644 --- a/libitm/vect128.cc +++ b/libitm/config/x86/x86_sse.cc @@ -27,9 +27,16 @@ // ??? Use memcpy for now, until we have figured out how to best instantiate // these loads/stores. +CREATE_DISPATCH_FUNCTIONS_T_MEMCPY(M64, GTM::abi_disp()->, ) CREATE_DISPATCH_FUNCTIONS_T_MEMCPY(M128, GTM::abi_disp()->, ) void ITM_REGPARM +_ITM_LM64 (const _ITM_TYPE_M64 *ptr) +{ + GTM::GTM_LB (ptr, sizeof (*ptr)); +} + +void ITM_REGPARM _ITM_LM128 (const _ITM_TYPE_M128 *ptr) { GTM::GTM_LB (ptr, sizeof (*ptr)); diff --git a/libitm/configure b/libitm/configure index 637fcd19669..55332bb9de8 100644 --- a/libitm/configure +++ b/libitm/configure @@ -607,14 +607,8 @@ ARCH_X86_AVX_FALSE ARCH_X86_AVX_TRUE ARCH_X86_FALSE ARCH_X86_TRUE -ARCH_S390_FALSE -ARCH_S390_TRUE -ARCH_PPC_FALSE -ARCH_PPC_TRUE ARCH_ARM_FALSE ARCH_ARM_TRUE -ARCH_AARCH64_FALSE -ARCH_AARCH64_TRUE link_itm XLDFLAGS XCFLAGS @@ -9768,7 +9762,7 @@ _LT_EOF if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -11796,7 +11790,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11799 "configure" +#line 11793 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11902,7 +11896,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11905 "configure" +#line 11899 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14254,7 +14248,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) @@ -17609,14 +17603,6 @@ else fi - if test "$ARCH" = aarch64; then - ARCH_AARCH64_TRUE= - ARCH_AARCH64_FALSE='#' -else - ARCH_AARCH64_TRUE='#' - ARCH_AARCH64_FALSE= -fi - if test "$ARCH" = arm; then ARCH_ARM_TRUE= ARCH_ARM_FALSE='#' @@ -17625,22 +17611,6 @@ else ARCH_ARM_FALSE= fi - if test "$ARCH" = powerpc -o "$ARCH" = powerpc64; then - ARCH_PPC_TRUE= - ARCH_PPC_FALSE='#' -else - ARCH_PPC_TRUE='#' - ARCH_PPC_FALSE= -fi - - if test "$ARCH" = s390 -o "$ARCH" = s390x; then - ARCH_S390_TRUE= - ARCH_S390_FALSE='#' -else - ARCH_S390_TRUE='#' - ARCH_S390_FALSE= -fi - if test "$ARCH" = x86; then ARCH_X86_TRUE= ARCH_X86_FALSE='#' @@ -17818,22 +17788,10 @@ if test -z "${LIBITM_BUILD_VERSIONED_SHLIB_SUN_TRUE}" && test -z "${LIBITM_BUILD as_fn_error "conditional \"LIBITM_BUILD_VERSIONED_SHLIB_SUN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${ARCH_AARCH64_TRUE}" && test -z "${ARCH_AARCH64_FALSE}"; then - as_fn_error "conditional \"ARCH_AARCH64\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${ARCH_ARM_TRUE}" && test -z "${ARCH_ARM_FALSE}"; then as_fn_error "conditional \"ARCH_ARM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${ARCH_PPC_TRUE}" && test -z "${ARCH_PPC_FALSE}"; then - as_fn_error "conditional \"ARCH_PPC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ARCH_S390_TRUE}" && test -z "${ARCH_S390_FALSE}"; then - as_fn_error "conditional \"ARCH_S390\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${ARCH_X86_TRUE}" && test -z "${ARCH_X86_FALSE}"; then as_fn_error "conditional \"ARCH_X86\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/libitm/configure.ac b/libitm/configure.ac index 36e065140d8..3875aa0b47d 100644 --- a/libitm/configure.ac +++ b/libitm/configure.ac @@ -281,10 +281,7 @@ else fi AC_SUBST(link_itm) -AM_CONDITIONAL([ARCH_AARCH64], [test "$ARCH" = aarch64]) AM_CONDITIONAL([ARCH_ARM], [test "$ARCH" = arm]) -AM_CONDITIONAL([ARCH_PPC], [test "$ARCH" = powerpc -o "$ARCH" = powerpc64]) -AM_CONDITIONAL([ARCH_S390], [test "$ARCH" = s390 -o "$ARCH" = s390x]) AM_CONDITIONAL([ARCH_X86], [test "$ARCH" = x86]) AM_CONDITIONAL([ARCH_X86_AVX], [test "$libitm_cv_as_avx" = yes]) AM_CONDITIONAL([ARCH_FUTEX], [test $enable_linux_futex = yes]) diff --git a/libitm/libitm.h b/libitm/libitm.h index 1a6738b9dd3..d7bc166a93b 100644 --- a/libitm/libitm.h +++ b/libitm/libitm.h @@ -232,11 +232,7 @@ ITM_LOG(CE) ITM_BARRIERS(M256) ITM_LOG(M256) # endif -#else - typedef int _ITM_TYPE_M128 __attribute__((vector_size(16), may_alias)); - ITM_BARRIERS(M128) - ITM_LOG(M128) -#endif +#endif /* i386 */ #undef ITM_BARRIERS #undef ITM_LOG diff --git a/libitm/vect64.cc b/libitm/vect64.cc deleted file mode 100644 index c451c58717d..00000000000 --- a/libitm/vect64.cc +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 2009-2016 Free Software Foundation, Inc. - Contributed by Richard Henderson <rth@redhat.com>. - - This file is part of the GNU Transactional Memory Library (libitm). - - Libitm is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - Libitm is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - Under Section 7 of GPL version 3, you are granted additional - permissions described in the GCC Runtime Library Exception, version - 3.1, as published by the Free Software Foundation. - - You should have received a copy of the GNU General Public License and - a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - <http://www.gnu.org/licenses/>. */ - -#include "libitm_i.h" -#include "dispatch.h" - -// ??? Use memcpy for now, until we have figured out how to best instantiate -// these loads/stores. -CREATE_DISPATCH_FUNCTIONS_T_MEMCPY(M64, GTM::abi_disp()->, ) - -void ITM_REGPARM -_ITM_LM64 (const _ITM_TYPE_M64 *ptr) -{ - GTM::GTM_LB (ptr, sizeof (*ptr)); -} |