Define MALLOC_ABI_ALIGNMENT
authorWilco Dijkstra <wdijkstr@arm.com>
Thu, 2 Nov 2017 15:12:51 +0000 (15:12 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Thu, 2 Nov 2017 15:12:51 +0000 (15:12 +0000)
The AArch64 backend currently doesn't set MALLOC_ABI_ALIGNMENT, so
add this to enable alignment optimizations on malloc pointers.
Use the same value as STACK_BOUNDARY and BIGGEST_ALIGNMENT.

    gcc/
* config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define.

From-SVN: r254348

gcc/ChangeLog
gcc/config/aarch64/aarch64.h

index 12d55f8c7a1968e05efc26ee5b90e11e3aad3b44..0af62d172657a50bcc6a81dd940f4ba79a609045 100644 (file)
@@ -1,3 +1,7 @@
+2017-11-02  Wilco Dijkstra  <wdijkstr@arm.com>
+
+       * config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define.
+
 2017-11-02  Jeff Law  <law@redhat.com>
 
        * gimple-ssa-sprintf.c (sprintf_dom_walker): Remove
index bc1ccc342811de06c7fcbc0ba874ba410f358b17..5e2e2fccff3dd4829efd05e9a13f91d40e0aad1e 100644 (file)
 
 #define STRUCTURE_SIZE_BOUNDARY                8
 
+/* Heap alignment (same as BIGGEST_ALIGNMENT and STACK_BOUNDARY).  */
+#define MALLOC_ABI_ALIGNMENT  128
+
 /* Defined by the ABI */
 #define WCHAR_TYPE "unsigned int"
 #define WCHAR_TYPE_SIZE                        32