]> granicus.if.org Git - libatomic_ops/commitdiff
Fix test_atomic fail caused by AO_double_t misaligned load (Linux/i686)
authorIvan Maidanski <ivmai@mail.ru>
Tue, 31 Jan 2017 07:29:44 +0000 (10:29 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 6 Feb 2017 13:01:36 +0000 (16:01 +0300)
(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).

src/atomic_ops/sysdeps/standard_ao_double_t.h

index 3a9b00f709be0283e5b6194c5d82ef9c5287c95c..bfe6e3aa53707f146ad9c56e42349429311243e4 100644 (file)
@@ -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