From: Ivan Maidanski <ivmai@mail.ru> Date: Mon, 1 Oct 2012 10:48:43 +0000 (+0400) Subject: Fix double_ptr_storage definition for gcc/x32 X-Git-Tag: libatomic_ops-7_2e~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3124a592982b5154815c68349b37fff395dc0a7c;p=libatomic_ops Fix double_ptr_storage definition for gcc/x32 (Apply commit 9957645 from 'master' branch.) * src/atomic_ops/sysdeps/standard_ao_double_t.h (double_ptr_storage): Define as "unsigned long long" instead of __m128 for gcc/x32 (i.e., ILP32 on x86_64); update and reformat comment. Conflicts: src/atomic_ops/sysdeps/standard_ao_double_t.h --- diff --git a/src/atomic_ops/sysdeps/standard_ao_double_t.h b/src/atomic_ops/sysdeps/standard_ao_double_t.h index 7089f05..95803f2 100644 --- a/src/atomic_ops/sysdeps/standard_ao_double_t.h +++ b/src/atomic_ops/sysdeps/standard_ao_double_t.h @@ -1,12 +1,13 @@ /* * NEC LE-IT: For 64-bit OS we extend the double type to hold two int64's * - * x86-64: __m128 serves as placeholder which also requires the compiler - * to align it on 16 byte boundary (as required by cmpxchg16). + * x86-64 (except for x32): __m128 serves as placeholder which also requires + * the compiler to align it on 16 byte boundary (as required by cmpxchg16). * Similar things could be done for PowerPC 64-bit using a VMX data type... */ -#if (defined(__x86_64__) && __GNUC__ >= 4) || defined(_WIN64) +#if ((defined(__x86_64__) && __GNUC__ >= 4) || defined(_WIN64)) \ + && !defined(__ILP32__) # include <xmmintrin.h> typedef __m128 double_ptr_storage; #elif defined(_WIN32) && !defined(__GNUC__) @@ -14,7 +15,6 @@ #else typedef unsigned long long double_ptr_storage; #endif - # define AO_HAVE_DOUBLE_PTR_STORAGE typedef union {