summaryrefslogtreecommitdiff
path: root/src/atomic_ops.h
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2013-03-29 08:55:13 +0400
committerIvan Maidanski <ivmai@mail.ru>2013-03-29 17:56:44 +0400
commita3b07048d62f6e247286dc6a9c2d757f2cdc0531 (patch)
tree64f86790b76b257c3bae96d303680c94377df054 /src/atomic_ops.h
parent556e6348fc490f6f825c9304fae551a50ce6de3e (diff)
downloadlibatomic_ops-a3b07048d62f6e247286dc6a9c2d757f2cdc0531.tar.gz
Generalize double_load/store for x86_64 (GCC)
* src/atomic_ops.h (AO_GENERALIZE_TWICE): Define in case of missing double-wide load or store primitives while double-wide CAS is present (required for x86-64, at least).
Diffstat (limited to 'src/atomic_ops.h')
-rw-r--r--src/atomic_ops.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/atomic_ops.h b/src/atomic_ops.h
index e468e5e..33fe00e 100644
--- a/src/atomic_ops.h
+++ b/src/atomic_ops.h
@@ -391,6 +391,12 @@
/* of iterations, usually one. */
#include "atomic_ops/generalize.h"
+#if !defined(AO_GENERALIZE_TWICE) \
+ && defined(AO_HAVE_compare_double_and_swap_double) \
+ && (!defined(AO_HAVE_double_load) || !defined(AO_HAVE_double_store))
+# define AO_GENERALIZE_TWICE
+#endif
+
#ifdef AO_T_IS_INT
/* Included after the first generalization pass. */
# include "atomic_ops/sysdeps/ao_t_is_int.h"