diff mbox series

[committed] hppa: Rework MALLOC_ABI_ALIGNMENT macro

Message ID 5A5EAC5B.1080305@bell.net
State New
Headers show
Series [committed] hppa: Rework MALLOC_ABI_ALIGNMENT macro | expand

Commit Message

John David Anglin Jan. 17, 2018, 1:52 a.m. UTC
When I defined MALLOC_ABI_ALIGNMENT, I inadvertently changed the default 
alignment for
various hppa*-*-*bsd* targets.  Nick Hudson is still maintaining the 
netbsd target.

This patch corrects the default malloc alignment for 32-bit targest and 
moves the linux special
case to its own file.

Committed to trunk.

Dave

Comments

Kamil Rytarowski Jan. 17, 2018, 1:57 a.m. UTC | #1
On 17.01.2018 02:52, John David Anglin wrote:
> When I defined MALLOC_ABI_ALIGNMENT, I inadvertently changed the default
> alignment for
> various hppa*-*-*bsd* targets.  Nick Hudson is still maintaining the
> netbsd target.
> 
> This patch corrects the default malloc alignment for 32-bit targest and
> moves the linux special
> case to its own file.
> 
> Committed to trunk.
> 
> Dave
> 

NetBSD supports hppa in Tier2.
diff mbox series

Patch

Index: config/pa/pa.h
===================================================================
--- config/pa/pa.h	(revision 256561)
+++ config/pa/pa.h	(working copy)
@@ -307,7 +307,7 @@ 
    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: config/pa/pa32-linux.h
===================================================================
--- config/pa/pa32-linux.h	(revision 256561)
+++ config/pa/pa32-linux.h	(working copy)
@@ -62,3 +62,8 @@ 
 
 #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