diff options
Diffstat (limited to '')
-rw-r--r-- | src/gen-posix-lock-obj.c | 13 | ||||
-rw-r--r-- | src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/gen-posix-lock-obj.c b/src/gen-posix-lock-obj.c index 79b56de..e32a3cd 100644 --- a/src/gen-posix-lock-obj.c +++ b/src/gen-posix-lock-obj.c @@ -43,6 +43,7 @@ #endif /* Special requirements for certain platforms. */ +# define USE_LONG_DOUBLE_FOR_ALIGNMENT 0 #if defined(__sun) && !defined (__LP64__) && !defined(_LP64) /* Solaris on 32-bit architecture. */ # define USE_DOUBLE_FOR_ALIGNMENT 1 @@ -50,9 +51,13 @@ # define USE_DOUBLE_FOR_ALIGNMENT 0 #endif #if defined(__hppa__) -# define USE_LONG_DOUBLE_FOR_ALIGNMENT 1 +# define USE_16BYTE_ALIGNMENT 1 #else -# define USE_LONG_DOUBLE_FOR_ALIGNMENT 0 +# define USE_16BYTE_ALIGNMENT 0 +#endif + +#if USE_16BYTE_ALIGNMENT && !HAVE_GCC_ATTRIBUTE_ALIGNED +# error compiler is not able to enforce a 16 byte alignment #endif #ifdef USE_POSIX_THREADS @@ -117,7 +122,9 @@ main (void) "\n" "#define GPGRT_LOCK_INITIALIZER {%d,{{", SIZEOF_PTHREAD_MUTEX_T, -# if USE_DOUBLE_FOR_ALIGNMENT +# if USE_16BYTE_ALIGNMENT + " int _x16_align __attribute__ ((aligned (16)));\n", +# elif USE_DOUBLE_FOR_ALIGNMENT " double _xd_align;\n", # elif USE_LONG_DOUBLE_FOR_ALIGNMENT " long double _xld_align;\n", diff --git a/src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h b/src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h index 3682577..b57bb76 100644 --- a/src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h +++ b/src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h @@ -7,7 +7,7 @@ typedef struct long _vers; union { volatile char _priv[48]; - long double _xld_align; + int _x16_align __attribute__ ((aligned (16))); long _x_align; long *_xp_align; } u; |