Commit Graph

17 Commits

Author SHA1 Message Date
Andrey Semashev
c043562511 Disable floating point tests when BOOST_ATOMIC_NO_FLOATING_POINT is defined.
Also check that int128 is available for float128 tests. Int128 is used
as the storage for atomic variables.
2019-10-12 21:58:56 +03:00
Andrey Semashev
edef50f042 Added support for atomic floating point operations.
The support includes:

- The standard fetch_add/fetch_sub operations.
- Extra operations: (fetch_/opaque_)negate, (opaque_)add/sub.
- Extra capability macros: BOOST_ATOMIC_FLOAT/DOUBLE/LONG_DOUBLE_LOCK_FREE.

The atomic operations are currently implemented on top of the integer-based
backends and thus are mostly CAS-based. The CAS operations perform binary
comparisons, and as such have different behavior wrt. special FP values like
NaN and signed zero than normal C++.

The support for floating point types is optional and can be disabled by
defining BOOST_ATOMIC_NO_FLOATING_POINT. This can be useful if on a certain
platform parameters of the floating point types cannot be deduced from the
compiler-defined or system macros (in which case the compilation fails).

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0020r6.html
2018-02-13 03:36:35 +03:00
Andrey Semashev
2b6ef06b57 Added preliminary support for MSVC for ARM64 target. 2017-01-07 21:27:09 +03:00
Andrey Semashev
5b30e196a6 Added is_always_lock_free static constant from C++17. 2016-10-13 15:59:22 +03:00
Andrey Semashev
9be3389f06 Updated test to refrect improved support for Oracle Studio and SPARC. 2016-09-17 13:30:26 +03:00
Andrey Semashev
7b1d722d94 Ported tests to core/lightweight_test.hpp.
Boost.Test was dropped due to instability and long-standing differences between develop and master branches. We don't use most of its features anyway.
2015-01-25 18:50:58 +03:00
Andrey Semashev
97ae84a474 Adjusted the workaround for ldrexd/strexd instruction problem with register pairs allocation. The problem only affects ARMv6k in Thumb mode, so enable these instructions for ARM mode. Also don't base the decision on the compiler version, it is probably not relevant. Updated lockfree test to reflect the recent changes related to ARM backends. 2014-05-23 21:02:07 +04:00
Andrey Semashev
17cf91d8c9 Working on the library rewrite. Implemented gcc-x86 and gcc-sync
backends.
2014-05-04 00:14:24 +04:00
Andrey Semashev
625c3c3a2e Compilation fixes. Added public headers for atomic_flag and atomic. 2014-04-20 17:26:42 +04:00
Andrey Semashev
3869ce33cf Added tests for int128 atomicity.
[SVN r84804]
2013-06-16 14:01:04 +00:00
Andrey Semashev
9cab8a9ebf Added a generic atomic<> implementation based on the new __atomic intrinsics available in gcc 4.7 and clang 3.2. The new implementation adds support for 128-bit atomic. Other implementations updated to employ new macros in Boost.Config for defaulted and deleted functions (this is not complete yet). Fixed padding for the lock pool. Initializing constructor for atomic<> made explicit to avoid ambiguities of different overloads of operator=.
[SVN r84800]
2013-06-15 20:43:48 +00:00
Andrey Semashev
179e72cfd1 Code cleanup.
[SVN r84700]
2013-06-08 18:22:36 +00:00
Andrey Semashev
5b0186dc7d Added implementation of 64-bit atomic operations on 32-bit Windows. Pointer specializations of 64-bit CAS-based atomic implementation extracted to a separate header, since these specializations are not needed on 32-bit platforms.
[SVN r84695]
2013-06-08 17:36:38 +00:00
Tim Blechmann
18b97cbe7a atomic: Optimization for 64 bit loads and stores for 32 bit x86 on gcc
fixes #8574

[SVN r84288]
2013-05-15 06:12:46 +00:00
Helge Bahmann
a7b62d7f46 atomic: fix lockfree expectation on win64
Expect atomic<long long> to be lockfree on win64 since it it using cmpxchg64
now.


[SVN r79667]
2012-07-22 13:02:43 +00:00
Helge Bahmann
e2966c0f1b atomic: fix atomicity unit test
Make expectation for BOOST_ATOMIC_*_LOCK_FREE macros match actual platform
support.


[SVN r79644]
2012-07-21 19:00:40 +00:00
Helge Bahmann
131b70c1fa atomic: initial import
[SVN r79348]
2012-07-08 11:21:45 +00:00