From 1e75a3806e32e0f7e4fcddeea5f539fffee05980 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Wed, 17 Jan 2018 00:19:05 +0000 Subject: [PATCH] pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to 64 bits. * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to 64 bits. * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to 128 bits. From-SVN: r256773 --- gcc/ChangeLog | 5 +++++ gcc/config/pa/pa.h | 2 +- gcc/config/pa/pa32-linux.h | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e6d4baea3ce..c90859fc450 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2018-01-16 John David Anglin + * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to + 64 bits. + * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to + 128 bits. + * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode variables. diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 243641e13b5..7e5542b5f4d 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -307,7 +307,7 @@ typedef struct GTY(()) machine_function POSIX types such as pthread_mutex_t require 16-byte alignment. Again, this is non critical since 16-byte alignment is no longer needed for atomic operations. */ -#define MALLOC_ABI_ALIGNMENT (TARGET_SOM ? 64 : 128) +#define MALLOC_ABI_ALIGNMENT (TARGET_64BIT ? 128 : 64) /* Make arrays of chars word-aligned for the same reasons. */ #define DATA_ALIGNMENT(TYPE, ALIGN) \ diff --git a/gcc/config/pa/pa32-linux.h b/gcc/config/pa/pa32-linux.h index b5cb50442d6..ffcd1c6f17c 100644 --- a/gcc/config/pa/pa32-linux.h +++ b/gcc/config/pa/pa32-linux.h @@ -62,3 +62,8 @@ call_ ## FUNC (void) \ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD + +/* POSIX types such as pthread_mutex_t require 16-byte alignment to retain + layout compatibility with the original linux thread implementation. */ +#undef MALLOC_ABI_ALIGNMENT +#define MALLOC_ABI_ALIGNMENT 128 -- 2.30.2