summaryrefslogtreecommitdiff
path: root/src/atomic_ops
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-01-24 17:49:58 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-01-24 22:50:46 +0300
commit4949e9b8cb409288fcaa0553ead9704ca6219a23 (patch)
treec974c47343c12fb77daa8b50db88f06bba545fb6 /src/atomic_ops
parent90281551455f043fc027ad98ac9e7063803b7b31 (diff)
downloadlibatomic_ops-4949e9b8cb409288fcaa0553ead9704ca6219a23.tar.gz
Revert "Fix test_atomic fail caused unaligned AO_double_t access (VC/x86)"
This reverts commit 69c4010c1b3d43e2e179421e27379aaa5aeeb6d8. The failure is actually caused by the fact that default alignment of stack on x86 is 4 bytes. So, another solution should be proposed to fix the issue for other compilers (and, potentially, other targets). E.g. do not place AO_double_t volatile variables on stack.
Diffstat (limited to 'src/atomic_ops')
-rw-r--r--src/atomic_ops/sysdeps/generic_pthread.h1
-rw-r--r--src/atomic_ops/sysdeps/standard_ao_double_t.h14
2 files changed, 0 insertions, 15 deletions
diff --git a/src/atomic_ops/sysdeps/generic_pthread.h b/src/atomic_ops/sysdeps/generic_pthread.h
index 2e70068..3c65624 100644
--- a/src/atomic_ops/sysdeps/generic_pthread.h
+++ b/src/atomic_ops/sysdeps/generic_pthread.h
@@ -367,7 +367,6 @@ typedef struct {
AO_t AO_val2;
} AO_double_t;
#define AO_HAVE_double_t
-#define AO_DOUBLE_ALIGN /* empty */
#define AO_DOUBLE_T_INITIALIZER { (AO_t)0, (AO_t)0 }
diff --git a/src/atomic_ops/sysdeps/standard_ao_double_t.h b/src/atomic_ops/sysdeps/standard_ao_double_t.h
index 636ba46..7d85c9d 100644
--- a/src/atomic_ops/sysdeps/standard_ao_double_t.h
+++ b/src/atomic_ops/sysdeps/standard_ao_double_t.h
@@ -50,25 +50,11 @@
typedef __m128 double_ptr_storage;
#elif defined(_WIN32) && !defined(__GNUC__)
typedef unsigned __int64 double_ptr_storage;
-# ifdef _MSC_VER
- /* VC++/x86 does not align __int64 properly by default, thus, */
- /* causing an undefined behavior or assertions violation in */
- /* the double-wide atomic primitives. For the proper alignment, */
- /* all variables of AO_double_t type (in the client code) those */
- /* address is passed to an AO primitive should be defined with the */
- /* given attribute. Not a part of double_ptr_storage because the */
- /* attribute cannot be applied to function parameters. */
-# define AO_DOUBLE_ALIGN __declspec(align(8))
-# endif
#else
typedef unsigned long long double_ptr_storage;
#endif
# define AO_HAVE_DOUBLE_PTR_STORAGE
-#ifndef AO_DOUBLE_ALIGN
-# define AO_DOUBLE_ALIGN /* empty */
-#endif
-
typedef union {
struct { AO_t AO_v1; AO_t AO_v2; } AO_parts;
/* Note that AO_v1 corresponds to the low or the high part of */