pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to 64 bits.
authorJohn David Anglin <danglin@gcc.gnu.org>
Wed, 17 Jan 2018 00:19:05 +0000 (00:19 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Wed, 17 Jan 2018 00:19:05 +0000 (00:19 +0000)
* 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
gcc/config/pa/pa.h
gcc/config/pa/pa32-linux.h

index e6d4bae..c90859f 100644 (file)
@@ -1,5 +1,10 @@
 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
 
+       * 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.
 
index 243641e..7e5542b 100644 (file)
@@ -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)            \
index b5cb504..ffcd1c6 100644 (file)
@@ -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