diff --git a/src/bdwgc/libatomic_ops/.gitignore b/src/bdwgc/libatomic_ops/.gitignore index 39b36c7a5..baa755f4f 100644 --- a/src/bdwgc/libatomic_ops/.gitignore +++ b/src/bdwgc/libatomic_ops/.gitignore @@ -24,12 +24,15 @@ Makefile *.so /src/.deps/ +/src/.dirstamp /src/.libs/ /src/config.h /src/config.h.in~ /src/stamp-h1 /tests/.deps/ +/tests/.dirstamp +/tests/.libs/ /tests/core /tests/list_atomic.i /tests/test_atomic @@ -38,21 +41,21 @@ Makefile /tests/test_stack # External library (without trailing slash to allow symlinks): -# /pthreads-w32* +/pthreads-w32* # These files are generated by autoreconf: -# /aclocal.m4 -# /compile -# /config.guess -# /config.sub -# /configure -# /depcomp -# /install-sh -# /missing -# /mkinstalldirs -# /src/config.h.in -# /test-driver -# Makefile.in +/aclocal.m4 +/compile +/config.guess +/config.sub +/configure +/depcomp +/install-sh +/missing +/mkinstalldirs +/src/config.h.in +/test-driver +Makefile.in # Generated by libtoolize: /libtool diff --git a/src/bdwgc/libatomic_ops/AUTHORS b/src/bdwgc/libatomic_ops/AUTHORS index 3820c8408..8ff28acc3 100644 --- a/src/bdwgc/libatomic_ops/AUTHORS +++ b/src/bdwgc/libatomic_ops/AUTHORS @@ -12,6 +12,7 @@ Daniel Grayson Doug Lea Earl Chew Emmanuel Stapf +Frank Schaefer Gilles Talis Gregory Farnum H.J. Lu @@ -19,20 +20,24 @@ Hans Boehm Hans-Peter Nilsson Ian Wienand Ivan Maidanski +James Cowgill Jeremy Huddleston Jim Marshall Joerg Wagner Linas Vepstas Luca Barbato +Kochin Chang Maged Michael Manuel Serrano Michael Hope Patrick Marlier +Pavel Raiskup Petter Urkedal Philipp Zambelli Ranko Zivojnovic Roger Hoover Sebastian Siewior +Steve Capper Takashi Yoshii Thiemo Seufer Thorsten Glaser diff --git a/src/bdwgc/libatomic_ops/ChangeLog b/src/bdwgc/libatomic_ops/ChangeLog index 35434612f..9418cbc72 100644 --- a/src/bdwgc/libatomic_ops/ChangeLog +++ b/src/bdwgc/libatomic_ops/ChangeLog @@ -1,4 +1,20 @@ +== [7.5.0] (development) == + +* Relax shareability domain for dmb st in AO_nop_write (ARM/AArch64). +* Use LLD and SCD instructions on mips64. + + +== [7.4.4] (unset) == + +* Eliminate 'variable set but not used' Cppcheck warnings in test_stack. +* Fix makefile preventing AO_pause undefined in libatomic_ops_gpl. +* Fix missing casts to match printf format specifier in test_atomic. +* Fix missing output folder on making auto-generated test files (Automake). +* Minor fix of code alignment in mips AO_compare_and_swap. +* Restore contribution info in ChangeLog for authors not listed in git log. + + == [7.4.2] 2014-05-02 == * Fix a typo in doc/README.txt (remove redundant "an" article). @@ -139,6 +155,11 @@ * Use __builtin_expect in CAS failure loop condition checks (GCC only). +== [7.2g] (unset) == + +* Remove inclusion of acquire_release_volatile.h on MIPS. + + == [7.2f] 2014-05-02 == * Fix a typo in doc/README.txt (remove redundant "an" article). @@ -277,7 +298,7 @@ == [7.0] 2007-06-28 == -* Add 64-bit version of AO_load_acquire for PowerPC. +* Add 64-bit version of AO_load_acquire for PowerPC (by Luca Barbato). * Add support of x86 and x86_64 for MS VC. * Do not assume that "mfence" is always present (x86.h). * Fix ARM AO_test_and_set_full. @@ -307,18 +328,22 @@ == [1.0] 2005-03-21 == -* Fix various bugs. * Add atomic_ops primitives for different sized data. * Add compare_double_and_swap_double and compare_and_swap_double. +* Add gcc/cris.h (originally comes from Hans-Peter Nilsson). +* Add gcc/m68k.h (contributed by Tony Mantler). +* Add gcc/powerpc.h (with help of Maged Michael, Doug Lea, Roger Hoover). * Add initial support for atomic_ops for VC++/Windows/X86 and HP/UX. * Add minimal support for the Sun SPARC compiler. * Add support for platforms that require out-of-line assembly code. * Add support of int-wide operations on platforms with int-sized pointers. * Added libatomic_ops_gpl library with support for lock-free stack and malloc. -* Attempt to support PowerPC. * Change atomic_ops include file structure. * Change most platforms to use byte-wide test-and-set locations. +* Define AO_CLEAR, __ldcw[_align] macros in gcc/hppa.h (by Carlos O'Donell). +* Fix various bugs. * Install under "atomic_ops" instead of "ao". * Remove compiler_barrier workaround for gcc 3.4+. * Renamed various types to end in _t. +* Replace AO_HAVE_NOP_FULL with AO_HAVE_nop_full (by Ranko Zivojnovic). * Use autoconf, automake. diff --git a/src/bdwgc/libatomic_ops/README.md b/src/bdwgc/libatomic_ops/README.md index fba895814..9d2b53db9 100644 --- a/src/bdwgc/libatomic_ops/README.md +++ b/src/bdwgc/libatomic_ops/README.md @@ -1,6 +1,6 @@ # The atomic_ops library (libatomic_ops) -This is version 7.4.2 of libatomic_ops. +This is version 7.5.0 of libatomic_ops. You might find a more recent version [here](http://www.hboehm.info/gc/), or diff --git a/src/bdwgc/libatomic_ops/configure b/src/bdwgc/libatomic_ops/configure index 5d5572121..46c5fbcfd 100755 --- a/src/bdwgc/libatomic_ops/configure +++ b/src/bdwgc/libatomic_ops/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libatomic_ops 7.4.2. +# Generated by GNU Autoconf 2.69 for libatomic_ops 7.5.0. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libatomic_ops' PACKAGE_TARNAME='libatomic_ops' -PACKAGE_VERSION='7.4.2' -PACKAGE_STRING='libatomic_ops 7.4.2' +PACKAGE_VERSION='7.5.0' +PACKAGE_STRING='libatomic_ops 7.5.0' PACKAGE_BUGREPORT='bdwgc@lists.opendylan.org' PACKAGE_URL='' @@ -782,6 +782,7 @@ with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock +enable_werror enable_assertions ' ac_precious_vars='build_alias @@ -1336,7 +1337,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libatomic_ops 7.4.2 to adapt to many kinds of systems. +\`configure' configures libatomic_ops 7.5.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1407,7 +1408,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libatomic_ops 7.4.2:";; + short | recursive ) echo "Configuration of libatomic_ops 7.5.0:";; esac cat <<\_ACEOF @@ -1429,6 +1430,7 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --enable-werror Pass -Werror to the C compiler --enable-assertions Assertion checking Optional Packages: @@ -1523,7 +1525,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libatomic_ops configure 7.4.2 +libatomic_ops configure 7.5.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1801,7 +1803,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libatomic_ops $as_me 7.4.2, which was +It was created by libatomic_ops $as_me 7.5.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2781,7 +2783,7 @@ fi # Define the identity of the package. PACKAGE='libatomic_ops' - VERSION='7.4.2' + VERSION='7.5.0' cat >>confdefs.h <<_ACEOF @@ -12360,6 +12362,15 @@ else WEXTRA="-W" fi CFLAGS="-Wall $WEXTRA $CFLAGS" + + # Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; +fi + + if test "$enable_werror" = yes; then + CFLAGS="-Werror $CFLAGS" + fi else case "$host" in *-*-hpux*) @@ -13072,7 +13083,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libatomic_ops $as_me 7.4.2, which was +This file was extended by libatomic_ops $as_me 7.5.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13138,7 +13149,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libatomic_ops config.status 7.4.2 +libatomic_ops config.status 7.5.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/src/bdwgc/libatomic_ops/configure.ac b/src/bdwgc/libatomic_ops/configure.ac index fd238ab86..e11b9c7ce 100644 --- a/src/bdwgc/libatomic_ops/configure.ac +++ b/src/bdwgc/libatomic_ops/configure.ac @@ -1,5 +1,5 @@ # Process this file with autoconf to produce a configure script. -AC_INIT([libatomic_ops],[7.4.2],bdwgc@lists.opendylan.org) +AC_INIT([libatomic_ops],[7.5.0],bdwgc@lists.opendylan.org) AC_PREREQ(2.61) AC_CANONICAL_TARGET([]) @@ -56,6 +56,12 @@ if test "$GCC" = yes; then AC_MSG_RESULT($ac_cv_cc_wextra) AS_IF([test "$ac_cv_cc_wextra" = yes], [WEXTRA="-Wextra"], [WEXTRA="-W"]) CFLAGS="-Wall $WEXTRA $CFLAGS" + + AC_ARG_ENABLE(werror, [AC_HELP_STRING([--enable-werror], + [Pass -Werror to the C compiler])]) + if test "$enable_werror" = yes; then + CFLAGS="-Werror $CFLAGS" + fi else case "$host" in *-*-hpux*) diff --git a/src/bdwgc/libatomic_ops/m4/.gitignore b/src/bdwgc/libatomic_ops/m4/.gitignore deleted file mode 100644 index 4902d2ea4..000000000 --- a/src/bdwgc/libatomic_ops/m4/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Place holder to keep this directory in the Git repository. -* -!.gitignore diff --git a/src/bdwgc/libatomic_ops/src/Makefile.am b/src/bdwgc/libatomic_ops/src/Makefile.am index 7d586e927..fc09b27e1 100644 --- a/src/bdwgc/libatomic_ops/src/Makefile.am +++ b/src/bdwgc/libatomic_ops/src/Makefile.am @@ -12,6 +12,7 @@ libatomic_ops_la_LDFLAGS = -version-info 1:3:0 -no-undefined libatomic_ops_gpl_la_SOURCES = atomic_ops_stack.c atomic_ops_malloc.c libatomic_ops_gpl_la_LDFLAGS = -version-info 1:3:0 -no-undefined +libatomic_ops_gpl_la_LIBADD = libatomic_ops.la EXTRA_DIST = Makefile.msft atomic_ops/sysdeps/README \ atomic_ops/generalize-arithm.template \ @@ -102,6 +103,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \ atomic_ops/sysdeps/sunc/x86.h atomic_ops/generalize-small.h: atomic_ops/generalize-small.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ @@ -109,12 +111,14 @@ atomic_ops/generalize-small.h: atomic_ops/generalize-small.template sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@ atomic_ops/generalize-arithm.h: atomic_ops/generalize-arithm.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@ atomic_ops/sysdeps/ao_t_is_int.h: atomic_ops/sysdeps/ao_t_is_int.template + mkdir -p `dirname $@` sed -e s:_XBAR::g $? > $@ sed -e s:XBAR:full:g $? >> $@ sed -e s:XBAR:acquire:g $? >> $@ @@ -124,6 +128,7 @@ atomic_ops/sysdeps/ao_t_is_int.h: atomic_ops/sysdeps/ao_t_is_int.template atomic_ops/sysdeps/gcc/generic-arithm.h: \ atomic_ops/sysdeps/gcc/generic-arithm.template + mkdir -p `dirname $@` sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \ -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \ @@ -159,6 +164,7 @@ atomic_ops/sysdeps/gcc/generic-arithm.h: \ atomic_ops/sysdeps/gcc/generic-small.h: \ atomic_ops/sysdeps/gcc/generic-small.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ @@ -166,6 +172,7 @@ atomic_ops/sysdeps/gcc/generic-small.h: \ atomic_ops/sysdeps/loadstore/ordered_loads_only.h: \ atomic_ops/sysdeps/loadstore/ordered_loads_only.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ @@ -174,6 +181,7 @@ atomic_ops/sysdeps/loadstore/ordered_loads_only.h: \ atomic_ops/sysdeps/loadstore/ordered_stores_only.h: \ atomic_ops/sysdeps/loadstore/ordered_stores_only.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ @@ -182,48 +190,60 @@ atomic_ops/sysdeps/loadstore/ordered_stores_only.h: \ atomic_ops/sysdeps/loadstore/acquire_release_volatile.h: \ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template + mkdir -p `dirname $@` sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@ atomic_ops/sysdeps/loadstore/char_acquire_release_volatile.h: \ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ atomic_ops/sysdeps/loadstore/int_acquire_release_volatile.h: \ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template + mkdir -p `dirname $@` sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@ atomic_ops/sysdeps/loadstore/short_acquire_release_volatile.h: \ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template + mkdir -p `dirname $@` sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@ atomic_ops/sysdeps/loadstore/atomic_load.h: \ atomic_ops/sysdeps/loadstore/atomic_load.template + mkdir -p `dirname $@` sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@ atomic_ops/sysdeps/loadstore/char_atomic_load.h: \ atomic_ops/sysdeps/loadstore/atomic_load.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ atomic_ops/sysdeps/loadstore/int_atomic_load.h: \ atomic_ops/sysdeps/loadstore/atomic_load.template + mkdir -p `dirname $@` sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@ atomic_ops/sysdeps/loadstore/short_atomic_load.h: \ atomic_ops/sysdeps/loadstore/atomic_load.template + mkdir -p `dirname $@` sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@ atomic_ops/sysdeps/loadstore/atomic_store.h: \ atomic_ops/sysdeps/loadstore/atomic_store.template + mkdir -p `dirname $@` sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@ atomic_ops/sysdeps/loadstore/char_atomic_store.h: \ atomic_ops/sysdeps/loadstore/atomic_store.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ atomic_ops/sysdeps/loadstore/int_atomic_store.h: \ atomic_ops/sysdeps/loadstore/atomic_store.template + mkdir -p `dirname $@` sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@ atomic_ops/sysdeps/loadstore/short_atomic_store.h: \ atomic_ops/sysdeps/loadstore/atomic_store.template + mkdir -p `dirname $@` sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@ diff --git a/src/bdwgc/libatomic_ops/src/Makefile.in b/src/bdwgc/libatomic_ops/src/Makefile.in index 1816d147a..123844a41 100644 --- a/src/bdwgc/libatomic_ops/src/Makefile.in +++ b/src/bdwgc/libatomic_ops/src/Makefile.in @@ -148,7 +148,7 @@ libatomic_ops_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libatomic_ops_la_LDFLAGS) $(LDFLAGS) \ -o $@ -libatomic_ops_gpl_la_LIBADD = +libatomic_ops_gpl_la_DEPENDENCIES = libatomic_ops.la am_libatomic_ops_gpl_la_OBJECTS = atomic_ops_stack.lo \ atomic_ops_malloc.lo libatomic_ops_gpl_la_OBJECTS = $(am_libatomic_ops_gpl_la_OBJECTS) @@ -366,6 +366,7 @@ lib_LTLIBRARIES = libatomic_ops.la libatomic_ops_gpl.la libatomic_ops_la_LDFLAGS = -version-info 1:3:0 -no-undefined libatomic_ops_gpl_la_SOURCES = atomic_ops_stack.c atomic_ops_malloc.c libatomic_ops_gpl_la_LDFLAGS = -version-info 1:3:0 -no-undefined +libatomic_ops_gpl_la_LIBADD = libatomic_ops.la EXTRA_DIST = Makefile.msft atomic_ops/sysdeps/README \ atomic_ops/generalize-arithm.template \ atomic_ops/generalize-small.template \ @@ -867,6 +868,7 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ atomic_ops/generalize-small.h: atomic_ops/generalize-small.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ @@ -874,12 +876,14 @@ atomic_ops/generalize-small.h: atomic_ops/generalize-small.template sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@ atomic_ops/generalize-arithm.h: atomic_ops/generalize-arithm.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@ atomic_ops/sysdeps/ao_t_is_int.h: atomic_ops/sysdeps/ao_t_is_int.template + mkdir -p `dirname $@` sed -e s:_XBAR::g $? > $@ sed -e s:XBAR:full:g $? >> $@ sed -e s:XBAR:acquire:g $? >> $@ @@ -889,6 +893,7 @@ atomic_ops/sysdeps/ao_t_is_int.h: atomic_ops/sysdeps/ao_t_is_int.template atomic_ops/sysdeps/gcc/generic-arithm.h: \ atomic_ops/sysdeps/gcc/generic-arithm.template + mkdir -p `dirname $@` sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \ -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \ @@ -924,6 +929,7 @@ atomic_ops/sysdeps/gcc/generic-arithm.h: \ atomic_ops/sysdeps/gcc/generic-small.h: \ atomic_ops/sysdeps/gcc/generic-small.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ @@ -931,6 +937,7 @@ atomic_ops/sysdeps/gcc/generic-small.h: \ atomic_ops/sysdeps/loadstore/ordered_loads_only.h: \ atomic_ops/sysdeps/loadstore/ordered_loads_only.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ @@ -939,6 +946,7 @@ atomic_ops/sysdeps/loadstore/ordered_loads_only.h: \ atomic_ops/sysdeps/loadstore/ordered_stores_only.h: \ atomic_ops/sysdeps/loadstore/ordered_stores_only.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@ @@ -947,50 +955,62 @@ atomic_ops/sysdeps/loadstore/ordered_stores_only.h: \ atomic_ops/sysdeps/loadstore/acquire_release_volatile.h: \ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template + mkdir -p `dirname $@` sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@ atomic_ops/sysdeps/loadstore/char_acquire_release_volatile.h: \ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ atomic_ops/sysdeps/loadstore/int_acquire_release_volatile.h: \ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template + mkdir -p `dirname $@` sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@ atomic_ops/sysdeps/loadstore/short_acquire_release_volatile.h: \ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template + mkdir -p `dirname $@` sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@ atomic_ops/sysdeps/loadstore/atomic_load.h: \ atomic_ops/sysdeps/loadstore/atomic_load.template + mkdir -p `dirname $@` sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@ atomic_ops/sysdeps/loadstore/char_atomic_load.h: \ atomic_ops/sysdeps/loadstore/atomic_load.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ atomic_ops/sysdeps/loadstore/int_atomic_load.h: \ atomic_ops/sysdeps/loadstore/atomic_load.template + mkdir -p `dirname $@` sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@ atomic_ops/sysdeps/loadstore/short_atomic_load.h: \ atomic_ops/sysdeps/loadstore/atomic_load.template + mkdir -p `dirname $@` sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@ atomic_ops/sysdeps/loadstore/atomic_store.h: \ atomic_ops/sysdeps/loadstore/atomic_store.template + mkdir -p `dirname $@` sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@ atomic_ops/sysdeps/loadstore/char_atomic_store.h: \ atomic_ops/sysdeps/loadstore/atomic_store.template + mkdir -p `dirname $@` sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@ atomic_ops/sysdeps/loadstore/int_atomic_store.h: \ atomic_ops/sysdeps/loadstore/atomic_store.template + mkdir -p `dirname $@` sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@ atomic_ops/sysdeps/loadstore/short_atomic_store.h: \ atomic_ops/sysdeps/loadstore/atomic_store.template + mkdir -p `dirname $@` sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/bdwgc/libatomic_ops/src/atomic_ops/ao_version.h b/src/bdwgc/libatomic_ops/src/atomic_ops/ao_version.h index d92ae87d6..976b6cfa4 100644 --- a/src/bdwgc/libatomic_ops/src/atomic_ops/ao_version.h +++ b/src/bdwgc/libatomic_ops/src/atomic_ops/ao_version.h @@ -33,5 +33,5 @@ /* The version here should match that in configure.ac and README. */ #define AO_VERSION_MAJOR 7 -#define AO_VERSION_MINOR 4 -#define AO_VERSION_MICRO 2 /* 7.4.2 */ +#define AO_VERSION_MINOR 5 +#define AO_VERSION_MICRO 0 /* 7.5.0 */ diff --git a/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/aarch64.h b/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/aarch64.h index 54e6d7f6d..b7f2ef057 100644 --- a/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/aarch64.h +++ b/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/aarch64.h @@ -23,13 +23,14 @@ AO_INLINE void AO_nop_write(void) { - __asm__ __volatile__("dmb st" : : : "memory"); + /* TODO: Use C++11 primitive. */ + __asm__ __volatile__("dmb ishst" : : : "memory"); } # define AO_HAVE_nop_write #endif /* TODO: Adjust version check on fixing double-wide AO support in GCC. */ -#if __GNUC__ == 4 +#if __GNUC__ >= 4 AO_INLINE AO_double_t AO_double_load(const volatile AO_double_t *addr) @@ -194,6 +195,6 @@ return !result; } # define AO_HAVE_double_compare_and_swap_full -#endif /* __GNUC__ == 4 */ +#endif /* __GNUC__ >= 4 */ #include "generic.h" diff --git a/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/arm.h b/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/arm.h index c19f6dabe..3d841e96f 100644 --- a/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/arm.h +++ b/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/arm.h @@ -111,7 +111,16 @@ AO_nop_write(void) { /* AO_THUMB_GO_ARM is empty. */ - __asm__ __volatile__("dmb st" : : : "memory"); + /* This will target the system domain and thus be overly */ + /* conservative as the CPUs will occupy the inner shareable domain. */ + /* The plain variant (dmb st) is theoretically slower, and should */ + /* not be needed. That said, with limited experimentation, a CPU */ + /* implementation for which it actually matters has not been found */ + /* yet, though they should already exist. */ + /* Anyway, note that the "st" and "ishst" barriers are actually */ + /* quite weak and, as the libatomic_ops documentation states, */ + /* usually not what you really want. */ + __asm__ __volatile__("dmb ishst" : : : "memory"); } # define AO_HAVE_nop_write diff --git a/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/cris.h b/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/cris.h index 5b9a6f378..be58ddc66 100644 --- a/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/cris.h +++ b/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/cris.h @@ -18,9 +18,6 @@ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. - * - * Most of this code originally comes from Hans-Peter Nilsson. It is included - * here with his permission. */ /* FIXME: seems to be untested. */ diff --git a/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/mips.h b/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/mips.h index a891de6ec..73ca551ad 100644 --- a/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/mips.h +++ b/src/bdwgc/libatomic_ops/src/atomic_ops/sysdeps/gcc/mips.h @@ -15,26 +15,33 @@ * FIXME: This should probably make finer distinctions. SGI MIPS is * much more strongly ordered, and in fact closer to sequentially * consistent. This is really aimed at modern embedded implementations. - * It looks to me like this assumes a 32-bit ABI. -HB */ #include "../all_aligned_atomic_load_store.h" -#include "../loadstore/acquire_release_volatile.h" - #include "../test_and_set_t_is_ao_t.h" /* Data dependence does not imply read ordering. */ #define AO_NO_DD_ORDERING +#if defined(_ABI64) && (_MIPS_SIM == _ABI64) +# define AO_MIPS_SET_ISA " .set mips3\n" +# define AO_MIPS_LL_1(args) " lld " args "\n" +# define AO_MIPS_SC(args) " scd " args "\n" +#else +# define AO_MIPS_SET_ISA " .set mips2\n" +# define AO_MIPS_LL_1(args) " ll " args "\n" +# define AO_MIPS_SC(args) " sc " args "\n" +# define AO_T_IS_INT +#endif + #ifdef AO_ICE9A1_LLSC_WAR /* ICE9 rev A1 chip (used in very few systems) is reported to */ /* have a low-frequency bug that causes LL to fail. */ /* To workaround, just issue the second 'LL'. */ -# define AO_MIPS_LL_FIX(args_str) \ - " ll " args_str "\n" +# define AO_MIPS_LL(args) AO_MIPS_LL_1(args) AO_MIPS_LL_1(args) #else -# define AO_MIPS_LL_FIX(args_str) "" +# define AO_MIPS_LL(args) AO_MIPS_LL_1(args) #endif AO_INLINE void @@ -42,7 +49,7 @@ AO_nop_full(void) { __asm__ __volatile__( " .set push \n" - " .set mips2 \n" + AO_MIPS_SET_ISA " .set noreorder \n" " .set nomacro \n" " sync \n" @@ -60,13 +67,13 @@ AO_fetch_and_add(volatile AO_t *addr, AO_t incr) __asm__ __volatile__( " .set push\n" - " .set mips2\n" + AO_MIPS_SET_ISA " .set noreorder\n" " .set nomacro\n" - "1: ll %0, %2\n" - AO_MIPS_LL_FIX("%0, %2") + "1: " + AO_MIPS_LL("%0, %2") " addu %1, %0, %3\n" - " sc %1, %2\n" + AO_MIPS_SC("%1, %2") " beqz %1, 1b\n" " nop\n" " .set pop " @@ -85,13 +92,13 @@ AO_test_and_set(volatile AO_TS_t *addr) __asm__ __volatile__( " .set push\n" - " .set mips2\n" + AO_MIPS_SET_ISA " .set noreorder\n" " .set nomacro\n" - "1: ll %0, %2\n" - AO_MIPS_LL_FIX("%0, %2") + "1: " + AO_MIPS_LL("%0, %2") " move %1, %3\n" - " sc %1, %2\n" + AO_MIPS_SC("%1, %2") " beqz %1, 1b\n" " nop\n" " .set pop " @@ -114,14 +121,14 @@ AO_test_and_set(volatile AO_TS_t *addr) __asm__ __volatile__( " .set push \n" - " .set mips2 \n" + AO_MIPS_SET_ISA " .set noreorder \n" " .set nomacro \n" - "1: ll %0, %1 \n" - AO_MIPS_LL_FIX("%0, %1") + "1: " + AO_MIPS_LL("%0, %1") " bne %0, %4, 2f \n" - " move %0, %3 \n" - " sc %0, %1 \n" + " move %0, %3 \n" + AO_MIPS_SC("%0, %1") " .set pop \n" " beqz %0, 1b \n" " li %2, 1 \n" @@ -142,14 +149,14 @@ AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) __asm__ __volatile__( " .set push\n" - " .set mips2\n" + AO_MIPS_SET_ISA " .set noreorder\n" " .set nomacro\n" - "1: ll %0, %2\n" - AO_MIPS_LL_FIX("%0, %2") + "1: " + AO_MIPS_LL("%0, %2") " bne %0, %4, 2f\n" " move %1, %3\n" - " sc %1, %2\n" + AO_MIPS_SC("%1, %2") " beqz %1, 1b\n" " nop\n" " .set pop\n" @@ -167,6 +174,3 @@ AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) /* CAS primitives with acquire, release and full semantics are */ /* generated automatically (and AO_int_... primitives are */ /* defined properly after the first generalization pass). */ - -/* FIXME: 32-bit ABI is assumed. */ -#define AO_T_IS_INT diff --git a/src/bdwgc/libatomic_ops/tests/Makefile.am b/src/bdwgc/libatomic_ops/tests/Makefile.am index 6bfe33c96..c8812bba5 100644 --- a/src/bdwgc/libatomic_ops/tests/Makefile.am +++ b/src/bdwgc/libatomic_ops/tests/Makefile.am @@ -35,6 +35,7 @@ test_malloc_LDADD = $(THREADDLLIBS) \ $(top_builddir)/src/libatomic_ops.la test_atomic_include.h: test_atomic_include.template + mkdir -p `dirname $@` sed -e s:XX::g $? > $@ sed -e s:XX:_release:g $? >> $@ sed -e s:XX:_acquire:g $? >> $@ @@ -45,6 +46,7 @@ test_atomic_include.h: test_atomic_include.template sed -e s:XX:_acquire_read:g $? >> $@ list_atomic.c: list_atomic.template + mkdir -p `dirname $@` echo "#include \"atomic_ops.h\"" > $@ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g -e s:XX::g $? >> $@ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g -e s:XX:_release:g $? >> $@ @@ -93,6 +95,7 @@ list_atomic.c: list_atomic.template sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g -e s:XX:_dd_acquire_read:g $? >> $@ list_atomic.i: list_atomic.c + mkdir -p `dirname $@` $(COMPILE) $? -E > $@ # Verify list_atomic.c syntax: diff --git a/src/bdwgc/libatomic_ops/tests/Makefile.in b/src/bdwgc/libatomic_ops/tests/Makefile.in index 31f665201..5efc67c9d 100644 --- a/src/bdwgc/libatomic_ops/tests/Makefile.in +++ b/src/bdwgc/libatomic_ops/tests/Makefile.in @@ -1073,6 +1073,7 @@ uninstall-am: test_atomic_include.h: test_atomic_include.template + mkdir -p `dirname $@` sed -e s:XX::g $? > $@ sed -e s:XX:_release:g $? >> $@ sed -e s:XX:_acquire:g $? >> $@ @@ -1083,6 +1084,7 @@ test_atomic_include.h: test_atomic_include.template sed -e s:XX:_acquire_read:g $? >> $@ list_atomic.c: list_atomic.template + mkdir -p `dirname $@` echo "#include \"atomic_ops.h\"" > $@ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g -e s:XX::g $? >> $@ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g -e s:XX:_release:g $? >> $@ @@ -1131,6 +1133,7 @@ list_atomic.c: list_atomic.template sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g -e s:XX:_dd_acquire_read:g $? >> $@ list_atomic.i: list_atomic.c + mkdir -p `dirname $@` $(COMPILE) $? -E > $@ # Verify list_atomic.c syntax: diff --git a/src/bdwgc/libatomic_ops/tests/test_atomic.c b/src/bdwgc/libatomic_ops/tests/test_atomic.c index 86fede1d2..b063a92d9 100644 --- a/src/bdwgc/libatomic_ops/tests/test_atomic.c +++ b/src/bdwgc/libatomic_ops/tests/test_atomic.c @@ -148,7 +148,7 @@ void * test_and_set_thr(void * id) if (locked_counter != 1) { fprintf(stderr, "Test and set failure 1, counter = %ld, id = %d\n", - locked_counter, (int)(AO_PTRDIFF_T)id); + (long)locked_counter, (int)(AO_PTRDIFF_T)id); abort(); } locked_counter *= 2; @@ -158,7 +158,7 @@ void * test_and_set_thr(void * id) if (locked_counter != 1) { fprintf(stderr, "Test and set failure 2, counter = %ld, id = %d\n", - locked_counter, (int)(AO_PTRDIFF_T)id); + (long)locked_counter, (int)(AO_PTRDIFF_T)id); abort(); } --locked_counter; diff --git a/src/bdwgc/libatomic_ops/tests/test_stack.c b/src/bdwgc/libatomic_ops/tests/test_stack.c index 8170e5c1c..a3c5c30a0 100644 --- a/src/bdwgc/libatomic_ops/tests/test_stack.c +++ b/src/bdwgc/libatomic_ops/tests/test_stack.c @@ -175,9 +175,9 @@ volatile AO_t ops_performed = 0; list_element * t[MAX_NTHREADS + 1]; int index = (int)(size_t)arg; int i; - int j = 0; - # ifdef VERBOSE + int j = 0; + printf("starting thread %d\n", index); # endif while (fetch_and_add(&ops_performed, index + 1) + index + 1 < LIMIT) @@ -195,7 +195,9 @@ volatile AO_t ops_performed = 0; { AO_stack_push(&the_list, (AO_t *)t[i]); } - j += (index + 1); +# ifdef VERBOSE + j += index + 1; +# endif } # ifdef VERBOSE printf("finished thread %d: %d total ops\n", index, j); @@ -303,22 +305,23 @@ int main(int argc, char **argv) } for (nthreads = 1; nthreads <= max_nthreads; ++nthreads) { - unsigned long sum = 0; +# ifndef NO_TIMES + unsigned long sum = 0; +# endif printf("About %d pushes + %d pops in %d threads:", LIMIT, LIMIT, nthreads); - for (exper_n = 0; exper_n < N_EXPERIMENTS; ++exper_n) - { +# ifndef NO_TIMES + for (exper_n = 0; exper_n < N_EXPERIMENTS; ++exper_n) { # if defined(VERBOSE) printf(" [%lu]", times[nthreads][exper_n]); # endif sum += times[nthreads][exper_n]; } -# ifndef NO_TIMES - printf(" %lu msecs\n", (sum + N_EXPERIMENTS/2)/N_EXPERIMENTS); -# else - printf(" completed\n"); -# endif + printf(" %lu msecs\n", (sum + N_EXPERIMENTS/2)/N_EXPERIMENTS); +# else + printf(" completed\n"); +# endif } return 0; }