X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=hs-boehmgc.git;a=blobdiff_plain;f=gc-7.2%2Flibatomic_ops%2Fsrc%2Fatomic_ops%2Fsysdeps%2Fstandard_ao_double_t.h;fp=gc-7.2%2Flibatomic_ops%2Fsrc%2Fatomic_ops%2Fsysdeps%2Fstandard_ao_double_t.h;h=7089f05190ae5c66f825c3219d84ec1a07f97399;hp=0000000000000000000000000000000000000000;hb=324587ba93dc77f37406d41fd2a20d0e0d94fb1d;hpb=2a4ea609491b225a1ceb06da70396e93916f137a diff --git a/gc-7.2/libatomic_ops/src/atomic_ops/sysdeps/standard_ao_double_t.h b/gc-7.2/libatomic_ops/src/atomic_ops/sysdeps/standard_ao_double_t.h new file mode 100644 index 0000000..7089f05 --- /dev/null +++ b/gc-7.2/libatomic_ops/src/atomic_ops/sysdeps/standard_ao_double_t.h @@ -0,0 +1,27 @@ +/* + * 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). + * Similar things could be done for PowerPC 64-bit using a VMX data type... + */ + +#if (defined(__x86_64__) && __GNUC__ >= 4) || defined(_WIN64) +# include + typedef __m128 double_ptr_storage; +#elif defined(_WIN32) && !defined(__GNUC__) + typedef unsigned __int64 double_ptr_storage; +#else + typedef unsigned long long double_ptr_storage; +#endif + +# define AO_HAVE_DOUBLE_PTR_STORAGE + +typedef union { + double_ptr_storage AO_whole; + struct {AO_t AO_v1; AO_t AO_v2;} AO_parts; +} AO_double_t; + +#define AO_HAVE_double_t +#define AO_val1 AO_parts.AO_v1 +#define AO_val2 AO_parts.AO_v2