]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pa.h (BIGGEST_ALIGNMENT): Adjust comment.
authorJohn David Anglin <danglin@gcc.gnu.org>
Sat, 29 Oct 2016 15:47:41 +0000 (15:47 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sat, 29 Oct 2016 15:47:41 +0000 (15:47 +0000)
* config/pa/pa.h (BIGGEST_ALIGNMENT): Adjust comment.
(MALLOC_ABI_ALIGNMENT): Define.

From-SVN: r241678

gcc/ChangeLog
gcc/config/pa/pa.h

index 3260d52317fe52ac93c08b460ecc2362eb3f5486..7fdec07efde3e46adac6fbe54c83c9cd5db6fe5e 100644 (file)
@@ -1,3 +1,8 @@
+2016-10-29  John David Anglin  <danglin@gcc.gnu.org>
+
+       * config/pa/pa.h (BIGGEST_ALIGNMENT): Adjust comment.
+       (MALLOC_ABI_ALIGNMENT): Define.
+
 2016-10-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        Backport from mainline
index 8314ba39e4ca7e519ae3e4bf30f2b29f094c04fd..818a7a6e0fd4f775dd34a8f9399503a596e0e37f 100644 (file)
@@ -298,9 +298,23 @@ typedef struct GTY(()) machine_function
 /* A bit-field declared as `int' forces `int' alignment for the struct.  */
 #define PCC_BITFIELD_TYPE_MATTERS 1
 
-/* No data type wants to be aligned rounder than this.  */
+/* No data type wants to be aligned rounder than this.  The long double
+   type has 16-byte alignment on the 64-bit target even though it was never
+   implemented in hardware.  The software implementation only needs 8-byte
+   alignment.  This matches the biggest alignment of the HP compilers.  */
 #define BIGGEST_ALIGNMENT (2 * BITS_PER_WORD)
 
+/* Alignment, in bits, a C conformant malloc implementation has to provide.
+   The HP-UX malloc implementation provides a default alignment of 8 bytes.
+   It should be 16 bytes on the 64-bit target since long double has 16-byte
+   alignment.  It can be increased with mallopt but it's non critical since
+   long double was never implemented in hardware.  The glibc implementation
+   currently provides 8-byte alignment.  It should be 16 bytes since various
+   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)
+
 /* Get around hp-ux assembler bug, and make strcpy of constants fast.  */
 #define CONSTANT_ALIGNMENT(EXP, ALIGN)         \
   (TREE_CODE (EXP) == STRING_CST               \