Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libatomic_ops for openSUSE:Factory 
checked in at 2021-09-20 23:32:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libatomic_ops (Old)
 and      /work/SRC/openSUSE:Factory/.libatomic_ops.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libatomic_ops"

Mon Sep 20 23:32:20 2021 rev:15 rq:918781 version:7.6.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/libatomic_ops/libatomic_ops.changes      
2019-09-05 12:01:26.263952694 +0200
+++ /work/SRC/openSUSE:Factory/.libatomic_ops.new.1899/libatomic_ops.changes    
2021-09-20 23:33:13.327178687 +0200
@@ -1,0 +2,14 @@
+Mon Sep 13 10:45:00 UTC 2021 - Jan Engelhardt <jeng...@inai.de>
+
+- Update to release 7.6.12
+  * Declare argument of AO_load_next with const in
+    atomic_ops_stack.
+  * Fix gcc/sunc x86 AO_compare_double_and_swap_double
+    missing side effect.
+  * Fix link fail caused by missing GCC char/short atomic
+    primitives on riscv64.
+  * Turn off compare_double_and_swap_double_full PIC hack for
+    GCC 5+ (x86).
+  * Use GCC atomic intrinsics for s390x (clang 8.0+ and gcc 5.4+).
+
+-------------------------------------------------------------------

Old:
----
  libatomic_ops-7.6.10.tar.gz

New:
----
  libatomic_ops-7.6.12.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libatomic_ops.spec ++++++
--- /var/tmp/diff_new_pack.T10dZt/_old  2021-09-20 23:33:14.803180510 +0200
+++ /var/tmp/diff_new_pack.T10dZt/_new  2021-09-20 23:33:14.807180515 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libatomic_ops
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,15 +17,13 @@
 
 
 Name:           libatomic_ops
-Version:        7.6.10
+Version:        7.6.12
 Release:        0
 Summary:        A portable library for atomic memory operations
 License:        GPL-2.0-or-later AND MIT
 Group:          Development/Languages/C and C++
-Url:            https://github.com/ivmai/libatomic_ops
-
-#Git-Clone:    git://github.com/ivmai/libatomic_ops
-Source:         http://www.ivmaisoft.com/_bin/atomic_ops/%name-%version.tar.gz
+URL:            https://github.com/ivmai/libatomic_ops
+Source:         
https://github.com/ivmai/libatomic_ops/releases/download/v%version/%name-%version.tar.gz
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  libtool
@@ -52,26 +50,25 @@
 that involves minimum overhead across a variety of architectures.
 
 %prep
-%setup -q
+%autosetup
 
 %build
-%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
+%global _lto_cflags %_lto_cflags -ffat-lto-objects
 autoreconf -fiv
 %configure --docdir="%_docdir/%name"
-make %{?_smp_mflags}
+%make_build
 
 %install
 %make_install
-rm -f "%buildroot/%_libdir"/*.la
-cp -a ChangeLog "%buildroot/%_docdir/%name/"
+rm -fv "%buildroot/%_libdir"/*.la
+cp -av ChangeLog "%buildroot/%_docdir/%name/"
 
 %check
 %if !0%{?qemu_user_space_build:1}
-make check %{?_smp_mflags}
+%make_build check
 %endif
 
 %files devel
-%defattr(-,root,root)
 %_libdir/libatomic_ops*.a
 %_includedir/atomic_ops/
 %_includedir/atomic_ops*.h

++++++ libatomic_ops-7.6.10.tar.gz -> libatomic_ops-7.6.12.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/AUTHORS 
new/libatomic_ops-7.6.12/AUTHORS
--- old/libatomic_ops-7.6.10/AUTHORS    2019-03-01 17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/AUTHORS    2021-09-13 11:11:13.000000000 +0200
@@ -3,6 +3,7 @@
 by many others.
 Currently maintained by Ivan Maidanski.
 
+Alexey Pavlov <alex...@gmail.com>
 Andreas Tobler <andrea...@gmail.com>
 Andrew Agno <agno+boeh...@agno.net>
 Andy Li <a...@onthewings.net>
@@ -16,6 +17,8 @@
 Emmanuel Stapf <ma...@eiffel.com>
 Fabrizio Fabbri <ffabb...@bloomberg.net>
 Frank Schaefer <kelle...@gmail.com>
+Frederic Recoules <frederic.recou...@orange.fr>
+George Koehler <kern...@gmail.com>
 Gilles Talis <gilles.ta...@gmail.com>
 Gregory Farnum <gregory.far...@dreamhost.com>
 H.J. Lu <hjl.to...@gmail.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/ChangeLog 
new/libatomic_ops-7.6.12/ChangeLog
--- old/libatomic_ops-7.6.10/ChangeLog  2019-03-01 17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/ChangeLog  2021-09-13 11:11:13.000000000 +0200
@@ -1,4 +1,27 @@
 
+== [7.6.12] 2021-09-13 ==
+
+* Allow to generalize bool-CAS for sparc (gcc)
+* Declare argument of AO_load_next with const in atomic_ops_stack
+* Describe double_compare_and_swap operation in README_details
+* Document CAS operations better in README_details
+* Fix gcc/sunc x86 AO_compare_double_and_swap_double missing side effect
+* Fix library name in README_details
+* Fix link fail caused by missing GCC char/short atomic primitives on riscv64
+* Fix size of local variable passed to cas[x] (gcc/sparc)
+* Implement fetch-CAS for sparc (gcc)
+* Refactor gcc x86 memory constraints
+* Refine and reformat description of size prefix in README_details
+* Remove outdated notes in README_details
+* Replace x86 setz instruction by asm flag output operand (gcc)
+* Support MSYS host (configure)
+* Turn off compare_double_and_swap_double_full PIC hack for GCC 5+ (x86)
+* Update README_win32 to match Makefile.msft
+* Use GCC atomic intrinsics for s390x (clang 8.0+ and gcc 5.4+)
+* Use __alignof__ instead of sizeof in atomic variable alignment assertions
+* Workaround assertion violation in AO_load/store on m68k
+
+
 == [7.6.10] 2019-03-01 ==
 
 * Eliminate 'my_chunk_ptr-AO_initial_heap out of bounds' cppcheck warning
@@ -150,6 +173,14 @@
 Also, includes 7.4.6 changes
 
 
+== [7.4.16] 2021-09-13 ==
+
+* Fix gcc/sunc x86 AO_compare_double_and_swap_double missing side effect
+* Fix library name in README_details
+* Fix size of local variable passed to cas[x] (gcc/sparc)
+* Workaround assertion violation in AO_load/store on m68k
+
+
 == [7.4.14] 2019-03-01 ==
 
 * Fix 'AO_*_TS_T is not defined' compiler warnings (GCC-8)
@@ -367,9 +398,14 @@
 Also, includes 7.2 changes
 
 
-== [7.2j] (not released yet) ==
+== [7.2j] 2021-09-12 ==
 
 * Fix a typo in arm_v6.h
+* Fix asm constraints of primitives in sunc/x86_64.h
+* Fix gcc/sunc x86 AO_compare_double_and_swap_double missing side effect
+* Fix library name in README details
+* Fix size of local variable passed to cas[x] (gcc/sparc)
+* Workaround assertion violation in AO_load/store on m68k
 
 
 == [7.2i] 2017-12-21 ==
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/Makefile.in 
new/libatomic_ops-7.6.12/Makefile.in
--- old/libatomic_ops-7.6.10/Makefile.in        2019-03-01 18:00:55.000000000 
+0100
+++ new/libatomic_ops-7.6.12/Makefile.in        2021-09-13 11:12:09.000000000 
+0200
@@ -354,6 +354,7 @@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/README.md 
new/libatomic_ops-7.6.12/README.md
--- old/libatomic_ops-7.6.10/README.md  2019-03-01 17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/README.md  2021-09-13 11:11:13.000000000 +0200
@@ -2,7 +2,7 @@
 
 IN NEW CODE, PLEASE USE C11 OR C++14 STANDARD ATOMICS INSTEAD OF THIS PACKAGE.
 
-This is version 7.6.10 of libatomic_ops.
+This is version 7.6.12 of libatomic_ops.
 
 
 ## Download
@@ -99,7 +99,7 @@
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
  * Copyright (c) 1999-2011 Hewlett-Packard Development Company, L.P.
- * Copyright (c) 2008-2018 Ivan Maidanski
+ * Copyright (c) 2008-2021 Ivan Maidanski
 
 The file armcc/arm_v6.h is also
 
@@ -117,4 +117,4 @@
 
  * Copyright (c) 2009 by Takashi YOSHII. All rights reserved.
 
-See doc/LICENSING.txt for the details.
+See [LICENSING.txt](doc/LICENSING.txt) for the details.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/configure 
new/libatomic_ops-7.6.12/configure
--- old/libatomic_ops-7.6.10/configure  2019-03-01 18:00:54.000000000 +0100
+++ new/libatomic_ops-7.6.12/configure  2021-09-13 11:12:08.000000000 +0200
@@ -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.6.10.
+# Generated by GNU Autoconf 2.69 for libatomic_ops 7.6.12.
 #
 # Report bugs to <https://github.com/ivmai/libatomic_ops/issues>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='libatomic_ops'
 PACKAGE_TARNAME='libatomic_ops'
-PACKAGE_VERSION='7.6.10'
-PACKAGE_STRING='libatomic_ops 7.6.10'
+PACKAGE_VERSION='7.6.12'
+PACKAGE_STRING='libatomic_ops 7.6.12'
 PACKAGE_BUGREPORT='https://github.com/ivmai/libatomic_ops/issues'
 PACKAGE_URL=''
 
@@ -754,6 +754,7 @@
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -843,6 +844,7 @@
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1095,6 +1097,15 @@
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1232,7 +1243,7 @@
 for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
                datadir sysconfdir sharedstatedir localstatedir includedir \
                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-               libdir localedir mandir
+               libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1345,7 +1356,7 @@
   # 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.6.10 to adapt to many kinds of systems.
+\`configure' configures libatomic_ops 7.6.12 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1385,6 +1396,7 @@
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1416,7 +1428,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libatomic_ops 7.6.10:";;
+     short | recursive ) echo "Configuration of libatomic_ops 7.6.12:";;
    esac
   cat <<\_ACEOF
 
@@ -1537,7 +1549,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libatomic_ops configure 7.6.10
+libatomic_ops configure 7.6.12
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1815,7 +1827,7 @@
 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.6.10, which was
+It was created by libatomic_ops $as_me 7.6.12, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2795,7 +2807,7 @@
 
 # Define the identity of the package.
  PACKAGE='libatomic_ops'
- VERSION='7.6.10'
+ VERSION='7.6.12'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -12300,7 +12312,7 @@
   fi
 
   case "$host" in
-    *-*-cygwin* | *-*-mingw*)
+    *-*-cygwin* | *-*-mingw* | *-*-msys*)
       # Cygwin and Mingw[-w32/64] do not need -fPIC.
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
 $as_echo "not needed" >&6; }
@@ -12582,7 +12594,7 @@
       # against it.
       THREADDLLIBS=
       ;;
-    *-*-mingw*)
+    *-*-mingw* | *-*-msys*)
       # Use Win32 threads for tests anyway.
       THREADDLLIBS=
       # Skip test_atomic_pthreads.
@@ -13182,7 +13194,7 @@
 # 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.6.10, which was
+This file was extended by libatomic_ops $as_me 7.6.12, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -13248,7 +13260,7 @@
 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.6.10
+libatomic_ops config.status 7.6.12
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/configure.ac 
new/libatomic_ops-7.6.12/configure.ac
--- old/libatomic_ops-7.6.10/configure.ac       2019-03-01 17:59:46.000000000 
+0100
+++ new/libatomic_ops-7.6.12/configure.ac       2021-09-13 11:11:13.000000000 
+0200
@@ -1,5 +1,5 @@
 # Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
-# Copyright (c) 2009-2018 Ivan Maidanski
+# Copyright (c) 2009-2019 Ivan Maidanski
 #
 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
 # OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
@@ -12,7 +12,7 @@
 
 dnl Process this file with autoconf to produce configure.
 
-AC_INIT([libatomic_ops],[7.6.10],https://github.com/ivmai/libatomic_ops/issues)
+AC_INIT([libatomic_ops],[7.6.12],https://github.com/ivmai/libatomic_ops/issues)
 
 AC_PREREQ(2.61)
 AC_CANONICAL_TARGET([])
@@ -42,7 +42,7 @@
   fi
 
   case "$host" in
-    *-*-cygwin* | *-*-mingw*)
+    *-*-cygwin* | *-*-mingw* | *-*-msys*)
       # Cygwin and Mingw[-w32/64] do not need -fPIC.
       AC_MSG_RESULT([not needed])
       ;;
@@ -219,7 +219,7 @@
       # against it.
       THREADDLLIBS=
       ;;
-    *-*-mingw*)
+    *-*-mingw* | *-*-msys*)
       # Use Win32 threads for tests anyway.
       THREADDLLIBS=
       # Skip test_atomic_pthreads.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/doc/Makefile.in 
new/libatomic_ops-7.6.12/doc/Makefile.in
--- old/libatomic_ops-7.6.10/doc/Makefile.in    2019-03-01 18:00:55.000000000 
+0100
+++ new/libatomic_ops-7.6.12/doc/Makefile.in    2021-09-13 11:12:09.000000000 
+0200
@@ -273,6 +273,7 @@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/doc/README_details.txt 
new/libatomic_ops-7.6.12/doc/README_details.txt
--- old/libatomic_ops-7.6.10/doc/README_details.txt     2019-03-01 
17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/doc/README_details.txt     2021-09-13 
11:11:13.000000000 +0200
@@ -13,7 +13,7 @@
 are implemented by header files included from it.  It is sometimes
 necessary, and always recommended to also link against libatomic_ops.a.
 To use the almost non-blocking stack or malloc implementations,
-see the corresponding README files, and also link against libatomic_gpl.a
+see the corresponding README files, and also link against libatomic_ops_gpl.a
 before linking against libatomic_ops.a.
 
 OVERVIEW:
@@ -26,9 +26,9 @@
 barrier styles with sufficient generality.
 
 If this is included after defining AO_REQUIRE_CAS, then the package makes
-an attempt to emulate AO_compare_and_swap* (single-width) in a way that (at
-least on Linux) should still be async-signal-safe.  As a result, most other
-atomic operations will then be defined using the compare-and-swap
+an attempt to emulate [fetch_]compare_and_swap* (single-width) in a way that,
+at least on Linux, should still be async-signal-safe.  As a result, most
+other atomic operations may then be defined using the compare-and-swap
 emulation.  This emulation is slow, since it needs to disable signals.
 And it needs to block in case of contention.  If you care about performance
 on a platform that can't directly provide compare-and-swap, there are
@@ -48,31 +48,25 @@
 We of course are in no position to guarantee that future processors
 (even HPs) will continue to behave this way, though we hope they will.
 
-This is a work in progress.  Corrections/additions for other platforms are
-greatly appreciated.  It passes rudimentary tests on X86, Itanium, and
-Alpha.
+Corrections/additions for other platforms are greatly appreciated.
 
 OPERATIONS:
 
-Most operations operate on values of type AO_t, which are unsigned integers
-whose size matches that of pointers on the given architecture.  Exceptions
-are:
+Most operations handle values of type AO_t, which are unsigned integers
+whose size matches that of pointers on the given architecture.  Additionally,
+on most supported architectures the operations are also implemented to handle
+smaller integers types; such operations are indicated by the appropriate size
+prefix:
+- char_... Operates on unsigned char values;
+- short_... Operates on unsigned short values;
+- int_... Operates on unsigned int values.
+
+The notable exception is AO_test_and_set operating only on AO_TS_t, which is
+whatever size the hardware supports with good performance.  In some cases this
+is the length of a cache line, in some other cases it is a byte.  In many
+cases AO_TS_t is equivalent to AO_t.
 
-- AO_test_and_set operates on AO_TS_t, which is whatever size the hardware
-supports with good performance.  In some cases this is the length of a cache
-line.  In some cases it is a byte.  In many cases it is equivalent to AO_t.
-
-- A few operations are implemented on smaller or larger size integers.
-Such operations are indicated by the appropriate prefix:
-
-AO_char_... Operates on unsigned char values.
-AO_short_... Operates on unsigned short values.
-AO_int_... Operates on unsigned int values.
-
-(Currently a very limited selection of these is implemented.  We're
-working on it.)
-
-The defined operations are all of the form AO_[<size>_]<op><barrier>(<args>).
+The defined operations are all of the form AO_[<size>]<op><barrier>(<args>).
 
 The <op> component specifies an atomic memory operation.  It may be
 one of the following, where the corresponding argument and result types
@@ -98,11 +92,12 @@
         Atomically 'xor' value into *addr.
 int compare_and_swap(volatile AO_t * addr, AO_t old_val, AO_t new_val)
         Atomically compare *addr to old_val, and replace *addr by new_val
-        if the first comparison succeeds.  Returns nonzero if the comparison
-        succeeded and *addr was updated.
+        if the first comparison succeeds; returns nonzero if the comparison
+        succeeded and *addr was updated; cannot fail spuriously.
 AO_t fetch_compare_and_swap(volatile AO_t * addr, AO_t old_val, AO_t new_val)
         Atomically compare *addr to old_val, and replace *addr by new_val
-        if the first comparison succeeds; returns the original value of *addr.
+        if the first comparison succeeds; returns the original value of *addr;
+        cannot fail spuriously.
 AO_TS_VAL_t test_and_set(volatile AO_TS_t * addr)
         Atomically read the binary value at *addr, and set it.  AO_TS_VAL_t
         is an enumeration type which includes two values AO_TS_SET and
@@ -138,7 +133,11 @@
 where AO_double_t is a structure containing AO_val1 and AO_val2 fields,
 both of type AO_t.  For compare_and_swap_double, we compare against
 the val1 field.  AO_double_t exists only if AO_HAVE_double_t
-is defined.
+is defined.  If this type is available then the following operation is
+provided for convenience, fully equivalent to compare_double_and_swap_double:
+
+int double_compare_and_swap(volatile AO_double_t * addr,
+                            AO_double_t old_val, AO_double_t new_val)
 
 Please note that AO_double_t (and AO_stack_t) variables should be properly
 aligned (8-byte alignment on 32-bit targets, 16-byte alignment on 64-bit ones)
@@ -148,7 +147,8 @@
 already have proper alignment automatically but automatic variables (i.e.
 located on the stack) might be misaligned because the stack might be
 word-aligned (e.g. 4-byte stack alignment is the default one for x86).
-Luckily, stack-allocated AO variables is a rare case in practice.
+Luckily, stack-allocated AO variables operated atomically are used rarely
+in practice.
 
 ORDERING CONSTRAINTS:
 
@@ -195,8 +195,8 @@
 We assume that if a store is data-dependent on a previous load, then
 the two are always implicitly ordered.
 
-It is possible to test whether AO_<op><barrier> is available on the
-current platform by checking whether AO_HAVE_<op>_<barrier> is defined
+It is possible to test whether AO_[<size>]<op><barrier> is available on the
+target platform by checking whether AO_HAVE_[<size>]<op><barrier> is defined
 as a macro.
 
 Note that we generally don't implement operations that are either
@@ -224,10 +224,6 @@
 Dd_acquire_read is very hard or impossible to define in a way that cannot
 be invalidated by reasonably standard compiler transformations.
 
-There is probably no good reason to provide operations on standard
-integer types, since those may have the wrong alignment constraints.
-
-
 Example:
 
 If you want to initialize an object, and then "publish" a pointer to it
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/doc/README_win32.txt 
new/libatomic_ops-7.6.12/doc/README_win32.txt
--- old/libatomic_ops-7.6.10/doc/README_win32.txt       2019-03-01 
17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/doc/README_win32.txt       2021-09-13 
11:11:13.000000000 +0200
@@ -1,19 +1,16 @@
 Most of the atomic_ops functionality is available under Win32 with
-the Microsoft tools, but the build process currently is considerably more
-primitive than on Linux/Unix platforms.
+the Microsoft tools, but the build process is more primitive than that on
+Linux/Unix platforms.
 
 To build:
-
 1) Go to the src directory in the distribution.
 2) Make sure the Microsoft command-line tools (e.g. nmake) are available.
-3) Run "nmake -f Makefile.msft".  This should run some tests, which
-may print warnings about the types of the "Interlocked" functions.
-I haven't been able to make all versions of VC++ happy.  If you know
-how to, please send a patch.
+3) Run "nmake -f Makefile.msft check".  This should build libatomic_ops_gpl.lib
+and run some tests.
 4) To compile applications, you will need to retain or copy the following
 pieces from the resulting src directory contents:
         "atomic_ops.h" - Header file defining low-level primitives.  This
-                         includes files from:
+                         includes files from the following folder.
         "atomic_ops"- Subdirectory containing implementation header files.
         "atomic_ops_stack.h" - Header file describing almost lock-free stack.
         "atomic_ops_malloc.h" - Header file describing almost lock-free malloc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/src/Makefile.in 
new/libatomic_ops-7.6.12/src/Makefile.in
--- old/libatomic_ops-7.6.10/src/Makefile.in    2019-03-01 18:00:55.000000000 
+0100
+++ new/libatomic_ops-7.6.12/src/Makefile.in    2021-09-13 11:12:09.000000000 
+0200
@@ -346,6 +346,7 @@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/src/atomic_ops/ao_version.h 
new/libatomic_ops-7.6.12/src/atomic_ops/ao_version.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/ao_version.h        2019-03-01 
17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/ao_version.h        2021-09-13 
11:11:13.000000000 +0200
@@ -35,4 +35,4 @@
 /* The version here should match that in configure.ac and README.       */
 #define AO_VERSION_MAJOR 7
 #define AO_VERSION_MINOR 6
-#define AO_VERSION_MICRO 10 /* 7.6.10 */
+#define AO_VERSION_MICRO 12 /* 7.6.12 */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h
--- 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h 
    2019-03-01 17:59:46.000000000 +0100
+++ 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/all_aligned_atomic_load_store.h 
    2021-09-13 11:11:13.000000000 +0200
@@ -24,7 +24,14 @@
 /* short, and unsigned int loads and stores are atomic but only if data */
 /* is suitably aligned.                                                 */
 
-#define AO_ACCESS_CHECK_ALIGNED
+#if defined(__m68k__) && !defined(AO_ALIGNOF_SUPPORTED)
+  /* Even though AO_t is redefined in m68k.h, some clients use AO       */
+  /* pointer size primitives to access variables not declared as AO_t.  */
+  /* Such variables may have 2-byte alignment, while their sizeof is 4. */
+#else
+# define AO_ACCESS_CHECK_ALIGNED
+#endif
+
 /* Check for char type is a misnomer.   */
 #define AO_ACCESS_short_CHECK_ALIGNED
 #define AO_ACCESS_int_CHECK_ALIGNED
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/generic-arithm.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/generic-arithm.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/generic-arithm.h        
2019-03-01 17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/generic-arithm.h        
2021-09-13 11:11:13.000000000 +0200
@@ -15,6 +15,8 @@
  *
  */
 
+#ifndef AO_NO_char_ARITHM
+
 AO_INLINE unsigned/**/char
 AO_char_fetch_and_add(volatile unsigned/**/char *addr, unsigned/**/char incr)
 {
@@ -48,6 +50,8 @@
   }
 # define AO_HAVE_char_xor
 #endif
+
+#endif /* !AO_NO_char_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -65,6 +69,8 @@
  *
  */
 
+#ifndef AO_NO_short_ARITHM
+
 AO_INLINE unsigned/**/short
 AO_short_fetch_and_add(volatile unsigned/**/short *addr, unsigned/**/short 
incr)
 {
@@ -98,6 +104,8 @@
   }
 # define AO_HAVE_short_xor
 #endif
+
+#endif /* !AO_NO_short_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -115,6 +123,8 @@
  *
  */
 
+#ifndef AO_NO_int_ARITHM
+
 AO_INLINE unsigned
 AO_int_fetch_and_add(volatile unsigned *addr, unsigned incr)
 {
@@ -148,6 +158,8 @@
   }
 # define AO_HAVE_int_xor
 #endif
+
+#endif /* !AO_NO_int_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -165,6 +177,8 @@
  *
  */
 
+#ifndef AO_NO_ARITHM
+
 AO_INLINE AO_t
 AO_fetch_and_add(volatile AO_t *addr, AO_t incr)
 {
@@ -198,6 +212,8 @@
   }
 # define AO_HAVE_xor
 #endif
+
+#endif /* !AO_NO_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -215,6 +231,8 @@
  *
  */
 
+#ifndef AO_NO_char_ARITHM
+
 AO_INLINE unsigned/**/char
 AO_char_fetch_and_add_acquire(volatile unsigned/**/char *addr, 
unsigned/**/char incr)
 {
@@ -248,6 +266,8 @@
   }
 # define AO_HAVE_char_xor_acquire
 #endif
+
+#endif /* !AO_NO_char_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -265,6 +285,8 @@
  *
  */
 
+#ifndef AO_NO_short_ARITHM
+
 AO_INLINE unsigned/**/short
 AO_short_fetch_and_add_acquire(volatile unsigned/**/short *addr, 
unsigned/**/short incr)
 {
@@ -298,6 +320,8 @@
   }
 # define AO_HAVE_short_xor_acquire
 #endif
+
+#endif /* !AO_NO_short_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -315,6 +339,8 @@
  *
  */
 
+#ifndef AO_NO_int_ARITHM
+
 AO_INLINE unsigned
 AO_int_fetch_and_add_acquire(volatile unsigned *addr, unsigned incr)
 {
@@ -348,6 +374,8 @@
   }
 # define AO_HAVE_int_xor_acquire
 #endif
+
+#endif /* !AO_NO_int_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -365,6 +393,8 @@
  *
  */
 
+#ifndef AO_NO_ARITHM
+
 AO_INLINE AO_t
 AO_fetch_and_add_acquire(volatile AO_t *addr, AO_t incr)
 {
@@ -398,6 +428,8 @@
   }
 # define AO_HAVE_xor_acquire
 #endif
+
+#endif /* !AO_NO_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -415,6 +447,8 @@
  *
  */
 
+#ifndef AO_NO_char_ARITHM
+
 AO_INLINE unsigned/**/char
 AO_char_fetch_and_add_release(volatile unsigned/**/char *addr, 
unsigned/**/char incr)
 {
@@ -448,6 +482,8 @@
   }
 # define AO_HAVE_char_xor_release
 #endif
+
+#endif /* !AO_NO_char_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -465,6 +501,8 @@
  *
  */
 
+#ifndef AO_NO_short_ARITHM
+
 AO_INLINE unsigned/**/short
 AO_short_fetch_and_add_release(volatile unsigned/**/short *addr, 
unsigned/**/short incr)
 {
@@ -498,6 +536,8 @@
   }
 # define AO_HAVE_short_xor_release
 #endif
+
+#endif /* !AO_NO_short_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -515,6 +555,8 @@
  *
  */
 
+#ifndef AO_NO_int_ARITHM
+
 AO_INLINE unsigned
 AO_int_fetch_and_add_release(volatile unsigned *addr, unsigned incr)
 {
@@ -548,6 +590,8 @@
   }
 # define AO_HAVE_int_xor_release
 #endif
+
+#endif /* !AO_NO_int_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -565,6 +609,8 @@
  *
  */
 
+#ifndef AO_NO_ARITHM
+
 AO_INLINE AO_t
 AO_fetch_and_add_release(volatile AO_t *addr, AO_t incr)
 {
@@ -598,6 +644,8 @@
   }
 # define AO_HAVE_xor_release
 #endif
+
+#endif /* !AO_NO_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -615,6 +663,8 @@
  *
  */
 
+#ifndef AO_NO_char_ARITHM
+
 AO_INLINE unsigned/**/char
 AO_char_fetch_and_add_full(volatile unsigned/**/char *addr, unsigned/**/char 
incr)
 {
@@ -648,6 +698,8 @@
   }
 # define AO_HAVE_char_xor_full
 #endif
+
+#endif /* !AO_NO_char_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -665,6 +717,8 @@
  *
  */
 
+#ifndef AO_NO_short_ARITHM
+
 AO_INLINE unsigned/**/short
 AO_short_fetch_and_add_full(volatile unsigned/**/short *addr, 
unsigned/**/short incr)
 {
@@ -698,6 +752,8 @@
   }
 # define AO_HAVE_short_xor_full
 #endif
+
+#endif /* !AO_NO_short_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -715,6 +771,8 @@
  *
  */
 
+#ifndef AO_NO_int_ARITHM
+
 AO_INLINE unsigned
 AO_int_fetch_and_add_full(volatile unsigned *addr, unsigned incr)
 {
@@ -748,6 +806,8 @@
   }
 # define AO_HAVE_int_xor_full
 #endif
+
+#endif /* !AO_NO_int_ARITHM */
 /*
  * Copyright (c) 1991-1994 by Xerox Corporation.  All rights reserved.
  * Copyright (c) 1996-1999 by Silicon Graphics.  All rights reserved.
@@ -765,6 +825,8 @@
  *
  */
 
+#ifndef AO_NO_ARITHM
+
 AO_INLINE AO_t
 AO_fetch_and_add_full(volatile AO_t *addr, AO_t incr)
 {
@@ -798,3 +860,5 @@
   }
 # define AO_HAVE_xor_full
 #endif
+
+#endif /* !AO_NO_ARITHM */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/generic-arithm.template 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/generic-arithm.template
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/generic-arithm.template 
2019-03-01 17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/generic-arithm.template 
2021-09-13 11:11:13.000000000 +0200
@@ -15,6 +15,8 @@
  *
  */
 
+#ifndef AO_NO_XSIZE_ARITHM
+
 AO_INLINE XCTYPE
 AO_XSIZE_fetch_and_add_XBAR(volatile XCTYPE *addr, XCTYPE incr)
 {
@@ -48,3 +50,5 @@
   }
 # define AO_HAVE_XSIZE_xor_XBAR
 #endif
+
+#endif /* !AO_NO_XSIZE_ARITHM */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/m68k.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/m68k.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/m68k.h  2019-03-01 
17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/m68k.h  2021-09-13 
11:11:13.000000000 +0200
@@ -18,7 +18,7 @@
 /* The cas instruction causes an emulation trap for the */
 /* 060 with a misaligned pointer, so let's avoid this.  */
 #undef AO_t
-typedef unsigned long AO_t __attribute__ ((aligned (4)));
+typedef unsigned long AO_t __attribute__((__aligned__(4)));
 
 /* FIXME.  Very incomplete.  */
 #include "../all_aligned_atomic_load_store.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/powerpc.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/powerpc.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/powerpc.h       
2019-03-01 17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/powerpc.h       
2021-09-13 11:11:13.000000000 +0200
@@ -138,7 +138,7 @@
 /* only cost us a load immediate instruction.                           */
 AO_INLINE AO_TS_VAL_t
 AO_test_and_set(volatile AO_TS_t *addr) {
-/* Completely untested.  And we should be using smaller objects anyway. */
+  /* TODO: And we should be using smaller objects anyway.       */
   AO_t oldval;
   AO_t temp = 1; /* locked value */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/riscv.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/riscv.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/riscv.h 2019-03-01 
17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/riscv.h 2021-09-13 
11:11:13.000000000 +0200
@@ -9,14 +9,24 @@
  * modified is included with the above copyright notice.
  */
 
-/* As of gcc-7.2.0, some __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n are missing. */
-/* The operations are lock-free (even for the types smaller than word).  */
-#define AO_GCC_FORCE_HAVE_CAS
+#if defined(__clang__) || defined(AO_PREFER_BUILTIN_ATOMICS)
+  /* All __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n macros are still missing.   */
+  /* The operations are lock-free even for the types smaller than word. */
+# define AO_GCC_FORCE_HAVE_CAS
+#else
 
-/* While double-word atomic operations are provided by the compiler     */
-/* (which requires -latomic currently), they are not lock-free as       */
-/* riscv itself does not have the double-word atomic operations.        */
+  /* As of gcc-7.5, CAS and arithmetic atomic operations for char and   */
+  /* short are supported by the compiler but require -latomic flag.     */
+# if !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1)
+#   define AO_NO_char_ARITHM
+# endif
+# if !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2)
+#   define AO_NO_short_ARITHM
+# endif
+#endif /* !__clang__ */
 
 #include "generic.h"
 
 #undef AO_GCC_FORCE_HAVE_CAS
+#undef AO_NO_char_ARITHM
+#undef AO_NO_short_ARITHM
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/s390.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/s390.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/s390.h  2019-03-01 
17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/s390.h  2021-09-13 
11:11:13.000000000 +0200
@@ -15,7 +15,15 @@
  *
  */
 
-/* FIXME: untested.                                             */
+#if (AO_GNUC_PREREQ(5, 4) || AO_CLANG_PREREQ(8, 0)) && defined(__s390x__) \
+    && !defined(AO_DISABLE_GCC_ATOMICS)
+  /* Probably, it could be enabled for earlier clang/gcc versions.      */
+  /* But, e.g., clang-3.8.0 produces a backend error for AtomicFence.   */
+
+# include "generic.h"
+
+#else /* AO_DISABLE_GCC_ATOMICS */
+
 /* The relevant documentation appears to be at                  */
 /* http://publibz.boulder.ibm.com/epubs/pdf/dz9zr003.pdf        */
 /* around page 5-96.  Apparently:                               */
@@ -35,7 +43,7 @@
 #include "../ordered_except_wr.h"
 
 #include "../test_and_set_t_is_ao_t.h"
-/* FIXME: Is there a way to do byte-sized test-and-set? */
+/* TODO: Is there a way to do byte-sized test-and-set? */
 
 /* TODO: AO_nop_full should probably be implemented directly.   */
 /* It appears that certain BCR instructions have that effect.   */
@@ -79,4 +87,6 @@
 }
 #define AO_HAVE_fetch_compare_and_swap_full
 
+#endif /* AO_DISABLE_GCC_ATOMICS */
+
 /* TODO: Add double-wide operations for 32-bit executables.       */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/sparc.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/sparc.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/sparc.h 2019-03-01 
17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/sparc.h 2021-09-13 
11:11:13.000000000 +0200
@@ -38,10 +38,12 @@
 #define AO_HAVE_test_and_set_full
 
 #ifndef AO_NO_SPARC_V9
+
+# ifndef AO_GENERALIZE_ASM_BOOL_CAS
 /* Returns nonzero if the comparison succeeded. */
 AO_INLINE int
 AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
-  char ret;
+  AO_t ret;
   __asm__ __volatile__ ("membar #StoreLoad | #LoadLoad\n\t"
 #                       if defined(__arch64__)
                           "casx [%2],%0,%1\n\t"
@@ -59,9 +61,25 @@
                         : "memory", "cc");
   return (int)ret;
 }
-#define AO_HAVE_compare_and_swap_full
+#   define AO_HAVE_compare_and_swap_full
+# endif /* !AO_GENERALIZE_ASM_BOOL_CAS */
+
+AO_INLINE AO_t
+AO_fetch_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) {
+  __asm__ __volatile__ ("membar #StoreLoad | #LoadLoad\n\t"
+#                       if defined(__arch64__)
+                          "casx [%1],%2,%0\n\t"
+#                       else
+                          "cas [%1],%2,%0\n\t" /* 32-bit version */
+#                       endif
+                        "membar #StoreLoad | #StoreStore\n\t"
+                        : "+r" (new_val)
+                        : "r" (addr), "r" (old)
+                        : "memory");
+  return new_val;
+}
+#define AO_HAVE_fetch_compare_and_swap_full
 
-/* TODO: implement AO_fetch_compare_and_swap.   */
 #endif /* !AO_NO_SPARC_V9 */
 
 /* TODO: Extend this for SPARC v8 and v9 (V8 also has swap, V9 has CAS, */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/x86.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/x86.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/gcc/x86.h   2019-03-01 
17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/gcc/x86.h   2021-09-13 
11:11:13.000000000 +0200
@@ -125,8 +125,9 @@
   {
     AO_t result;
 
-    __asm__ __volatile__ ("lock; xadd %0, %1" :
-                        "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
+    __asm__ __volatile__ ("lock; xadd %0, %1"
+                        : "=r" (result), "+m" (*p)
+                        : "0" (incr)
                         : "memory");
     return result;
   }
@@ -138,8 +139,9 @@
 {
   unsigned char result;
 
-  __asm__ __volatile__ ("lock; xaddb %0, %1" :
-                        "=q" (result), "=m" (*p) : "0" (incr), "m" (*p)
+  __asm__ __volatile__ ("lock; xaddb %0, %1"
+                        : "=q" (result), "+m" (*p)
+                        : "0" (incr)
                         : "memory");
   return result;
 }
@@ -150,8 +152,9 @@
 {
   unsigned short result;
 
-  __asm__ __volatile__ ("lock; xaddw %0, %1" :
-                        "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
+  __asm__ __volatile__ ("lock; xaddw %0, %1"
+                        : "=r" (result), "+m" (*p)
+                        : "0" (incr)
                         : "memory");
   return result;
 }
@@ -161,8 +164,9 @@
   AO_INLINE void
   AO_and_full (volatile AO_t *p, AO_t value)
   {
-    __asm__ __volatile__ ("lock; and %1, %0" :
-                        "=m" (*p) : "r" (value), "m" (*p)
+    __asm__ __volatile__ ("lock; and %1, %0"
+                        : "+m" (*p)
+                        : "r" (value)
                         : "memory");
   }
 # define AO_HAVE_and_full
@@ -170,8 +174,9 @@
   AO_INLINE void
   AO_or_full (volatile AO_t *p, AO_t value)
   {
-    __asm__ __volatile__ ("lock; or %1, %0" :
-                        "=m" (*p) : "r" (value), "m" (*p)
+    __asm__ __volatile__ ("lock; or %1, %0"
+                        : "+m" (*p)
+                        : "r" (value)
                         : "memory");
   }
 # define AO_HAVE_or_full
@@ -179,8 +184,9 @@
   AO_INLINE void
   AO_xor_full (volatile AO_t *p, AO_t value)
   {
-    __asm__ __volatile__ ("lock; xor %1, %0" :
-                        "=m" (*p) : "r" (value), "m" (*p)
+    __asm__ __volatile__ ("lock; xor %1, %0"
+                        : "+m" (*p)
+                        : "r" (value)
                         : "memory");
   }
 # define AO_HAVE_xor_full
@@ -192,8 +198,9 @@
 AO_INLINE void
 AO_char_and_full (volatile unsigned char *p, unsigned char value)
 {
-  __asm__ __volatile__ ("lock; andb %1, %0" :
-                        "=m" (*p) : "r" (value), "m" (*p)
+  __asm__ __volatile__ ("lock; andb %1, %0"
+                        : "+m" (*p)
+                        : "r" (value)
                         : "memory");
 }
 #define AO_HAVE_char_and_full
@@ -201,8 +208,9 @@
 AO_INLINE void
 AO_char_or_full (volatile unsigned char *p, unsigned char value)
 {
-  __asm__ __volatile__ ("lock; orb %1, %0" :
-                        "=m" (*p) : "r" (value), "m" (*p)
+  __asm__ __volatile__ ("lock; orb %1, %0"
+                        : "+m" (*p)
+                        : "r" (value)
                         : "memory");
 }
 #define AO_HAVE_char_or_full
@@ -210,8 +218,9 @@
 AO_INLINE void
 AO_char_xor_full (volatile unsigned char *p, unsigned char value)
 {
-  __asm__ __volatile__ ("lock; xorb %1, %0" :
-                        "=m" (*p) : "r" (value), "m" (*p)
+  __asm__ __volatile__ ("lock; xorb %1, %0"
+                        : "+m" (*p)
+                        : "r" (value)
                         : "memory");
 }
 #define AO_HAVE_char_xor_full
@@ -219,8 +228,9 @@
 AO_INLINE void
 AO_short_and_full (volatile unsigned short *p, unsigned short value)
 {
-  __asm__ __volatile__ ("lock; andw %1, %0" :
-                        "=m" (*p) : "r" (value), "m" (*p)
+  __asm__ __volatile__ ("lock; andw %1, %0"
+                        : "+m" (*p)
+                        : "r" (value)
                         : "memory");
 }
 #define AO_HAVE_short_and_full
@@ -228,8 +238,9 @@
 AO_INLINE void
 AO_short_or_full (volatile unsigned short *p, unsigned short value)
 {
-  __asm__ __volatile__ ("lock; orw %1, %0" :
-                        "=m" (*p) : "r" (value), "m" (*p)
+  __asm__ __volatile__ ("lock; orw %1, %0"
+                        : "+m" (*p)
+                        : "r" (value)
                         : "memory");
 }
 #define AO_HAVE_short_or_full
@@ -237,8 +248,9 @@
 AO_INLINE void
 AO_short_xor_full (volatile unsigned short *p, unsigned short value)
 {
-  __asm__ __volatile__ ("lock; xorw %1, %0" :
-                        "=m" (*p) : "r" (value), "m" (*p)
+  __asm__ __volatile__ ("lock; xorw %1, %0"
+                        : "+m" (*p)
+                        : "r" (value)
                         : "memory");
 }
 #define AO_HAVE_short_xor_full
@@ -250,8 +262,8 @@
   unsigned char oldval;
   /* Note: the "xchg" instruction does not need a "lock" prefix */
   __asm__ __volatile__ ("xchgb %0, %1"
-                        : "=q" (oldval), "=m" (*addr)
-                        : "0" ((unsigned char)0xff), "m" (*addr)
+                        : "=q" (oldval), "+m" (*addr)
+                        : "0" ((unsigned char)0xff)
                         : "memory");
   return (AO_TS_VAL_t)oldval;
 }
@@ -270,10 +282,19 @@
                 /* variables are protected.                             */
 #   else
       char result;
-      __asm__ __volatile__ ("lock; cmpxchg %3, %0; setz %1"
-                        : "=m" (*addr), "=a" (result)
-                        : "m" (*addr), "r" (new_val), "a" (old)
+#     if defined(__GCC_ASM_FLAG_OUTPUTS__)
+        AO_t dummy;
+
+        __asm__ __volatile__ ("lock; cmpxchg %3, %0"
+                        : "+m" (*addr), "=@ccz" (result), "=a" (dummy)
+                        : "r" (new_val), "a" (old)
+                        : "memory");
+#     else
+        __asm__ __volatile__ ("lock; cmpxchg %2, %0; setz %1"
+                        : "+m" (*addr), "=a" (result)
+                        : "r" (new_val), "a" (old)
                         : "memory");
+#     endif
       return (int)result;
 #   endif
   }
@@ -289,9 +310,9 @@
                                        /* empty protection list */);
 # else
     AO_t fetched_val;
-    __asm__ __volatile__ ("lock; cmpxchg %3, %4"
-                        : "=a" (fetched_val), "=m" (*addr)
-                        : "a" (old_val), "r" (new_val), "m" (*addr)
+    __asm__ __volatile__ ("lock; cmpxchg %3, %1"
+                        : "=a" (fetched_val), "+m" (*addr)
+                        : "a" (old_val), "r" (new_val)
                         : "memory");
     return fetched_val;
 # endif
@@ -309,9 +330,9 @@
 #   else
       unsigned char fetched_val;
 
-      __asm__ __volatile__ ("lock; cmpxchgb %3, %4"
-                            : "=a" (fetched_val), "=m" (*addr)
-                            : "a" (old_val), "q" (new_val), "m" (*addr)
+      __asm__ __volatile__ ("lock; cmpxchgb %3, %1"
+                            : "=a" (fetched_val), "+m" (*addr)
+                            : "a" (old_val), "q" (new_val)
                             : "memory");
       return fetched_val;
 #   endif
@@ -329,9 +350,9 @@
 #   else
       unsigned short fetched_val;
 
-      __asm__ __volatile__ ("lock; cmpxchgw %3, %4"
-                            : "=a" (fetched_val), "=m" (*addr)
-                            : "a" (old_val), "r" (new_val), "m" (*addr)
+      __asm__ __volatile__ ("lock; cmpxchgw %3, %1"
+                            : "=a" (fetched_val), "+m" (*addr)
+                            : "a" (old_val), "r" (new_val)
                             : "memory");
       return fetched_val;
 #   endif
@@ -350,9 +371,9 @@
 #     else
         unsigned int fetched_val;
 
-        __asm__ __volatile__ ("lock; cmpxchgl %3, %4"
-                            : "=a" (fetched_val), "=m" (*addr)
-                            : "a" (old_val), "r" (new_val), "m" (*addr)
+        __asm__ __volatile__ ("lock; cmpxchgl %3, %1"
+                            : "=a" (fetched_val), "+m" (*addr)
+                            : "a" (old_val), "r" (new_val)
                             : "memory");
         return fetched_val;
 #     endif
@@ -366,8 +387,8 @@
       unsigned int result;
 
       __asm__ __volatile__ ("lock; xaddl %0, %1"
-                            : "=r" (result), "=m" (*p)
-                            : "0" (incr), "m" (*p)
+                            : "=r" (result), "+m" (*p)
+                            : "0" (incr)
                             : "memory");
       return result;
     }
@@ -377,7 +398,8 @@
     AO_int_and_full (volatile unsigned int *p, unsigned int value)
     {
       __asm__ __volatile__ ("lock; andl %1, %0"
-                            : "=m" (*p) : "r" (value), "m" (*p)
+                            : "+m" (*p)
+                            : "r" (value)
                             : "memory");
     }
 #   define AO_HAVE_int_and_full
@@ -386,7 +408,8 @@
     AO_int_or_full (volatile unsigned int *p, unsigned int value)
     {
       __asm__ __volatile__ ("lock; orl %1, %0"
-                            : "=m" (*p) : "r" (value), "m" (*p)
+                            : "+m" (*p)
+                            : "r" (value)
                             : "memory");
     }
 #   define AO_HAVE_int_or_full
@@ -395,7 +418,8 @@
     AO_int_xor_full (volatile unsigned int *p, unsigned int value)
     {
       __asm__ __volatile__ ("lock; xorl %1, %0"
-                            : "=m" (*p) : "r" (value), "m" (*p)
+                            : "+m" (*p)
+                            : "r" (value)
                             : "memory");
     }
 #   define AO_HAVE_int_xor_full
@@ -443,9 +467,12 @@
                                          AO_t new_val1, AO_t new_val2)
   {
     char result;
-#   ifdef __PIC__
+#   if defined(__PIC__) && !(AO_GNUC_PREREQ(5, 1) || AO_CLANG_PREREQ(4, 0))
       AO_t saved_ebx;
+      AO_t dummy;
 
+      /* The following applies to an ancient GCC (and, probably, it was   */
+      /* never needed for Clang):                                         */
       /* If PIC is turned on, we cannot use ebx as it is reserved for the */
       /* GOT pointer.  We should save and restore ebx.  The proposed      */
       /* solution is not so efficient as the older alternatives using     */
@@ -461,8 +488,9 @@
                              "lock; cmpxchg8b (%%edi)\n\t"
                              "mov %2, %%ebx\n\t" /* restore ebx */
                              "setz %1"
-                        : "=m" (*addr), "=a" (result), "=m" (saved_ebx)
-                        : "m" (*addr), "d" (old_val2), "a" (old_val1),
+                        : "+m" (*addr), "=a" (result),
+                          "=m" (saved_ebx), "=d" (dummy)
+                        : "d" (old_val2), "a" (old_val1),
                           "c" (new_val2), "m" (new_val1)
                         : "%edi", "memory");
 #     else
@@ -478,20 +506,33 @@
                              "mov %2, %%ebx\n\t" /* restore ebx */
                              "mov %3, %%edi\n\t" /* restore edi */
                              "setz %1"
-                        : "=m" (*addr), "=a" (result),
-                          "=m" (saved_ebx), "=m" (saved_edi)
-                        : "m" (*addr), "d" (old_val2), "a" (old_val1),
-                          "c" (new_val2), "m" (new_val1) : "memory");
+                        : "+m" (*addr), "=a" (result),
+                          "=m" (saved_ebx), "=m" (saved_edi), "=d" (dummy)
+                        : "d" (old_val2), "a" (old_val1),
+                          "c" (new_val2), "m" (new_val1)
+                        : "memory");
 #     endif
 #   else
       /* For non-PIC mode, this operation could be simplified (and be   */
-      /* faster) by using ebx as new_val1 (GCC would refuse to compile  */
+      /* faster) by using ebx as new_val1.  Reuse of the PIC hard       */
+      /* register, instead of using a fixed register, is implemented    */
+      /* in Clang and GCC 5.1+, at least. (Older GCC refused to compile */
       /* such code for PIC mode).                                       */
-      __asm__ __volatile__ ("lock; cmpxchg8b %0; setz %1"
-                        : "=m" (*addr), "=a" (result)
-                        : "m" (*addr), "d" (old_val2), "a" (old_val1),
+#     if defined(__GCC_ASM_FLAG_OUTPUTS__)
+        __asm__ __volatile__ ("lock; cmpxchg8b %0"
+                        : "+m" (*addr), "=@ccz" (result),
+                          "+d" (old_val2), "+a" (old_val1)
+                        : "c" (new_val2), "b" (new_val1)
+                        : "memory");
+#     else
+        AO_t dummy; /* an output for clobbered edx */
+
+        __asm__ __volatile__ ("lock; cmpxchg8b %0; setz %1"
+                        : "+m" (*addr), "=a" (result), "=d" (dummy)
+                        : "d" (old_val2), "a" (old_val1),
                           "c" (new_val2), "b" (new_val1)
                         : "memory");
+#     endif
 #   endif
     return (int) result;
   }
@@ -553,11 +594,22 @@
                                          AO_t new_val1, AO_t new_val2)
   {
     char result;
-    __asm__ __volatile__("lock; cmpxchg16b %0; setz %1"
-                        : "=m"(*addr), "=a"(result)
-                        : "m"(*addr), "d" (old_val2), "a" (old_val1),
+
+#   if defined(__GCC_ASM_FLAG_OUTPUTS__)
+      __asm__ __volatile__("lock; cmpxchg16b %0"
+                        : "+m" (*addr), "=@ccz" (result),
+                          "+d" (old_val2), "+a" (old_val1)
+                        : "c" (new_val2), "b" (new_val1)
+                        : "memory");
+#   else
+      AO_t dummy; /* an output for clobbered rdx */
+
+      __asm__ __volatile__("lock; cmpxchg16b %0; setz %1"
+                        : "+m" (*addr), "=a" (result), "=d" (dummy)
+                        : "d" (old_val2), "a" (old_val1),
                           "c" (new_val2), "b" (new_val1)
                         : "memory");
+#   endif
     return (int) result;
   }
 # define AO_HAVE_compare_double_and_swap_double_full
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/atomic_load.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/atomic_load.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/atomic_load.h     
2019-03-01 17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/atomic_load.h     
2021-09-13 11:11:13.000000000 +0200
@@ -28,7 +28,7 @@
 AO_load(const volatile AO_t *addr)
 {
 # ifdef AO_ACCESS_CHECK_ALIGNED
-    assert(((size_t)addr & (sizeof(*addr) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
 # endif
   /* Cast away the volatile for architectures like IA64 where   */
   /* volatile adds barrier (fence) semantics.                   */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/atomic_load.template 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/atomic_load.template
--- 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/atomic_load.template  
    2019-03-01 17:59:46.000000000 +0100
+++ 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/atomic_load.template  
    2021-09-13 11:11:13.000000000 +0200
@@ -28,7 +28,7 @@
 AO_XSIZE_load(const volatile XCTYPE *addr)
 {
 # ifdef AO_ACCESS_XSIZE_CHECK_ALIGNED
-    assert(((size_t)addr & (sizeof(*addr) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
 # endif
   /* Cast away the volatile for architectures like IA64 where   */
   /* volatile adds barrier (fence) semantics.                   */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/atomic_store.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/atomic_store.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/atomic_store.h    
2019-03-01 17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/atomic_store.h    
2021-09-13 11:11:13.000000000 +0200
@@ -28,7 +28,7 @@
 AO_store(volatile AO_t *addr, AO_t new_val)
 {
 # ifdef AO_ACCESS_CHECK_ALIGNED
-    assert(((size_t)addr & (sizeof(*addr) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
 # endif
   *(AO_t *)addr = new_val;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/atomic_store.template 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/atomic_store.template
--- 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/atomic_store.template 
    2019-03-01 17:59:46.000000000 +0100
+++ 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/atomic_store.template 
    2021-09-13 11:11:13.000000000 +0200
@@ -28,7 +28,7 @@
 AO_XSIZE_store(volatile XCTYPE *addr, XCTYPE new_val)
 {
 # ifdef AO_ACCESS_XSIZE_CHECK_ALIGNED
-    assert(((size_t)addr & (sizeof(*addr) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
 # endif
   *(XCTYPE *)addr = new_val;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/char_atomic_load.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/char_atomic_load.h
--- 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/char_atomic_load.h    
    2019-03-01 17:59:46.000000000 +0100
+++ 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/char_atomic_load.h    
    2021-09-13 11:11:13.000000000 +0200
@@ -28,7 +28,7 @@
 AO_char_load(const volatile unsigned/**/char *addr)
 {
 # ifdef AO_ACCESS_char_CHECK_ALIGNED
-    assert(((size_t)addr & (sizeof(*addr) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
 # endif
   /* Cast away the volatile for architectures like IA64 where   */
   /* volatile adds barrier (fence) semantics.                   */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/char_atomic_store.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/char_atomic_store.h
--- 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/char_atomic_store.h   
    2019-03-01 17:59:46.000000000 +0100
+++ 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/char_atomic_store.h   
    2021-09-13 11:11:13.000000000 +0200
@@ -28,7 +28,7 @@
 AO_char_store(volatile unsigned/**/char *addr, unsigned/**/char new_val)
 {
 # ifdef AO_ACCESS_char_CHECK_ALIGNED
-    assert(((size_t)addr & (sizeof(*addr) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
 # endif
   *(unsigned/**/char *)addr = new_val;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/double_atomic_load_store.h
 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/double_atomic_load_store.h
--- 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/double_atomic_load_store.h
        2019-03-01 17:59:46.000000000 +0100
+++ 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/double_atomic_load_store.h
        2021-09-13 11:11:13.000000000 +0200
@@ -31,7 +31,7 @@
   AO_double_t result;
 
 # ifdef AO_ACCESS_double_CHECK_ALIGNED
-    assert(((size_t)addr & (sizeof(AO_double_t) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
 # endif
   /* Cast away the volatile in case it adds fence semantics.  */
   result.AO_whole = ((const AO_double_t *)addr)->AO_whole;
@@ -43,7 +43,7 @@
 AO_double_store(volatile AO_double_t *addr, AO_double_t new_val)
 {
 # ifdef AO_ACCESS_double_CHECK_ALIGNED
-    assert(((size_t)addr & (sizeof(AO_double_t) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
 # endif
   ((AO_double_t *)addr)->AO_whole = new_val.AO_whole;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/int_atomic_load.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/int_atomic_load.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/int_atomic_load.h 
2019-03-01 17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/int_atomic_load.h 
2021-09-13 11:11:13.000000000 +0200
@@ -28,7 +28,7 @@
 AO_int_load(const volatile unsigned *addr)
 {
 # ifdef AO_ACCESS_int_CHECK_ALIGNED
-    assert(((size_t)addr & (sizeof(*addr) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
 # endif
   /* Cast away the volatile for architectures like IA64 where   */
   /* volatile adds barrier (fence) semantics.                   */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/int_atomic_store.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/int_atomic_store.h
--- 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/int_atomic_store.h    
    2019-03-01 17:59:46.000000000 +0100
+++ 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/int_atomic_store.h    
    2021-09-13 11:11:13.000000000 +0200
@@ -28,7 +28,7 @@
 AO_int_store(volatile unsigned *addr, unsigned new_val)
 {
 # ifdef AO_ACCESS_int_CHECK_ALIGNED
-    assert(((size_t)addr & (sizeof(*addr) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
 # endif
   *(unsigned *)addr = new_val;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/short_atomic_load.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/short_atomic_load.h
--- 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/short_atomic_load.h   
    2019-03-01 17:59:46.000000000 +0100
+++ 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/short_atomic_load.h   
    2021-09-13 11:11:13.000000000 +0200
@@ -28,7 +28,7 @@
 AO_short_load(const volatile unsigned/**/short *addr)
 {
 # ifdef AO_ACCESS_short_CHECK_ALIGNED
-    assert(((size_t)addr & (sizeof(*addr) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
 # endif
   /* Cast away the volatile for architectures like IA64 where   */
   /* volatile adds barrier (fence) semantics.                   */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/short_atomic_store.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/short_atomic_store.h
--- 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/loadstore/short_atomic_store.h  
    2019-03-01 17:59:46.000000000 +0100
+++ 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/loadstore/short_atomic_store.h  
    2021-09-13 11:11:13.000000000 +0200
@@ -28,7 +28,7 @@
 AO_short_store(volatile unsigned/**/short *addr, unsigned/**/short new_val)
 {
 # ifdef AO_ACCESS_short_CHECK_ALIGNED
-    assert(((size_t)addr & (sizeof(*addr) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
 # endif
   *(unsigned/**/short *)addr = new_val;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/msftc/x86.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/msftc/x86.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/msftc/x86.h 2019-03-01 
17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/msftc/x86.h 2021-09-13 
11:11:13.000000000 +0200
@@ -125,7 +125,7 @@
   AO_double_compare_and_swap_full(volatile AO_double_t *addr,
                                   AO_double_t old_val, AO_double_t new_val)
   {
-    assert(((size_t)addr & (sizeof(AO_double_t) - 1)) == 0);
+    AO_ASSERT_ADDR_ALIGNED(addr);
     return (double_ptr_storage)_InterlockedCompareExchange64(
                                         (__int64 volatile *)addr,
                                         new_val.AO_whole /* exchange */,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/msftc/x86_64.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/msftc/x86_64.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/msftc/x86_64.h      
2019-03-01 17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/msftc/x86_64.h      
2021-09-13 11:11:13.000000000 +0200
@@ -278,7 +278,7 @@
 {
    __int64 comparandResult[2];
 
-   assert(((size_t)addr & (sizeof(AO_double_t) - 1)) == 0);
+   AO_ASSERT_ADDR_ALIGNED(addr);
    comparandResult[0] = old_val1; /* low */
    comparandResult[1] = old_val2; /* high */
    return _InterlockedCompareExchange128((volatile __int64 *)addr,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/sunc/x86.h 
new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/sunc/x86.h
--- old/libatomic_ops-7.6.10/src/atomic_ops/sysdeps/sunc/x86.h  2019-03-01 
17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops/sysdeps/sunc/x86.h  2021-09-13 
11:11:13.000000000 +0200
@@ -176,10 +176,11 @@
                                            AO_t old_val1, AO_t old_val2,
                                            AO_t new_val1, AO_t new_val2)
     {
+      AO_t dummy;   /* an output for clobbered edx */
       char result;
 
       __asm__ __volatile__ ("lock; cmpxchg8b %0; setz %1"
-                        : "+m" (*addr), "=a" (result)
+                        : "+m" (*addr), "=a" (result), "=d" (dummy)
                         : "d" (old_val2), "a" (old_val1),
                           "c" (new_val2), "b" (new_val1)
                         : "memory");
@@ -215,9 +216,11 @@
                                             AO_t old_val1, AO_t old_val2,
                                             AO_t new_val1, AO_t new_val2)
     {
+      AO_t dummy;
       char result;
+
       __asm__ __volatile__ ("lock; cmpxchg16b %0; setz %1"
-                        : "+m" (*addr), "=a" (result)
+                        : "+m" (*addr), "=a" (result), "=d" (dummy)
                         : "d" (old_val2), "a" (old_val1),
                           "c" (new_val2), "b" (new_val1)
                         : "memory");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/src/atomic_ops.h 
new/libatomic_ops-7.6.12/src/atomic_ops.h
--- old/libatomic_ops-7.6.10/src/atomic_ops.h   2019-03-01 17:59:46.000000000 
+0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops.h   2021-09-13 11:11:13.000000000 
+0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2003-2011 Hewlett-Packard Development Company, L.P.
- * Copyright (c) 2008-2018 Ivan Maidanski
+ * Copyright (c) 2008-2021 Ivan Maidanski
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to 
deal
@@ -231,6 +231,18 @@
 # endif
 #endif /* !AO_ATTR_NO_SANITIZE_THREAD */
 
+#if (AO_GNUC_PREREQ(7, 5) || __STDC_VERSION__ >= 201112L) && !defined(LINT2)
+# define AO_ALIGNOF_SUPPORTED 1
+#endif
+
+#ifdef AO_ALIGNOF_SUPPORTED
+# define AO_ASSERT_ADDR_ALIGNED(addr) \
+    assert(((size_t)(addr) & (__alignof__(*(addr)) - 1)) == 0)
+#else
+# define AO_ASSERT_ADDR_ALIGNED(addr) \
+    assert(((size_t)(addr) & (sizeof(*(addr)) - 1)) == 0)
+#endif /* !AO_ALIGNOF_SUPPORTED */
+
 #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
 # define AO_compiler_barrier() __asm__ __volatile__("" : : : "memory")
 #elif defined(_MSC_VER) || defined(__DMC__) || defined(__BORLANDC__) \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/src/atomic_ops_stack.c 
new/libatomic_ops-7.6.12/src/atomic_ops_stack.c
--- old/libatomic_ops-7.6.10/src/atomic_ops_stack.c     2019-03-01 
17:59:46.000000000 +0100
+++ new/libatomic_ops-7.6.12/src/atomic_ops_stack.c     2021-09-13 
11:11:13.000000000 +0200
@@ -130,7 +130,7 @@
 /* data race (reported by TSan) is OK because it results in a retry.    */
 #ifdef AO_THREAD_SANITIZER
   AO_ATTR_NO_SANITIZE_THREAD
-  static AO_t AO_load_next(volatile AO_t *first_ptr)
+  static AO_t AO_load_next(const volatile AO_t *first_ptr)
   {
     /* Assuming an architecture on which loads of word type are atomic. */
     /* AO_load cannot be used here because it cannot be instructed to   */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libatomic_ops-7.6.10/tests/Makefile.in 
new/libatomic_ops-7.6.12/tests/Makefile.in
--- old/libatomic_ops-7.6.10/tests/Makefile.in  2019-03-01 18:00:55.000000000 
+0100
+++ new/libatomic_ops-7.6.12/tests/Makefile.in  2021-09-13 11:12:09.000000000 
+0200
@@ -526,6 +526,7 @@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
 psdir = @psdir@
+runstatedir = @runstatedir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@

Reply via email to