From: Ivan Maidanski Date: Tue, 31 Jan 2017 07:29:44 +0000 (+0300) Subject: Fix test_atomic fail caused by AO_double_t misaligned load (Linux/i686) X-Git-Tag: v7.2h~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4791ee0de3e6fa2759d66004a0c409a7b2da818a;p=libatomic_ops Fix test_atomic fail caused by AO_double_t misaligned load (Linux/i686) (Cherry-pick commit 5417195 from 'release-7_4' branch.) * src/atomic_ops/sysdeps/standard_ao_double_t.h [__i386__ && __GNUC__] (double_ptr_storage): Add aligned(8) attribute (so that AO_double_t global/static variables to have proper (double-word) alignment). --- diff --git a/src/atomic_ops/sysdeps/standard_ao_double_t.h b/src/atomic_ops/sysdeps/standard_ao_double_t.h index 3a9b00f..bfe6e3a 100644 --- a/src/atomic_ops/sysdeps/standard_ao_double_t.h +++ b/src/atomic_ops/sysdeps/standard_ao_double_t.h @@ -12,6 +12,9 @@ typedef __m128 double_ptr_storage; #elif defined(_WIN32) && !defined(__GNUC__) typedef unsigned __int64 double_ptr_storage; +#elif defined(__i386__) && defined(__GNUC__) + typedef unsigned long long double_ptr_storage + __attribute__((__aligned__(8))); #else typedef unsigned long long double_ptr_storage; #endif