diff mbox

[ARM] Fix definition of MALLOC_ABI_ALIGNMENT.

Message ID CACUk7=Xv8c+-MKEp-_TrekLMNhmXf1mTC_31zqLq+meGOjDNaw@mail.gmail.com
State New
Headers show

Commit Message

Ramana Radhakrishnan March 12, 2012, 10:35 p.m. UTC
Hi,

This sets MALLOC_ABI_ALIGNMENT to 64 bits on ARM which should be safe
on all AAPCS implementations given that this is a requirement on our
alignment specifiers. I would expect this to be true for most modern
malloc implementations on AAPCS targets -

Ok ?


Ramana

2012-03-12  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

	* config/arm/arm.h (MALLOC_ABI_ALIGNMENT): Set to biggest
	alignment.

Comments

Richard Earnshaw March 13, 2012, 2:11 p.m. UTC | #1
On 12/03/12 22:35, Ramana Radhakrishnan wrote:
> Hi,
> 
> This sets MALLOC_ABI_ALIGNMENT to 64 bits on ARM which should be safe
> on all AAPCS implementations given that this is a requirement on our
> alignment specifiers. I would expect this to be true for most modern
> malloc implementations on AAPCS targets -
> 
> Ok ?
> 
> 
> Ramana
> 
> 2012-03-12  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
> 
> 	* config/arm/arm.h (MALLOC_ABI_ALIGNMENT): Set to biggest
> 	alignment.
> 
> Index: gcc/config/arm/arm.h
> ===================================================================
> --- gcc/config/arm/arm.h	(revision 185248)
> +++ gcc/config/arm/arm.h	(working copy)
> @@ -534,6 +534,11 @@
> 
>  #define BIGGEST_ALIGNMENT (ARM_DOUBLEWORD_ALIGN ? DOUBLEWORD_ALIGNMENT : 32)
> 
> +#ifndef MALLOC_ABI_ALIGNMENT
> +#define MALLOC_ABI_ALIGNMENT (ARM_DOUBLEWORD_ALIGN ? DOUBLEWORD_ALIGNMENT : \
> +			      BITS_PER_WORD)
> +#endif
> +
> 

OK.

R.
diff mbox

Patch

Index: gcc/config/arm/arm.h
===================================================================
--- gcc/config/arm/arm.h	(revision 185248)
+++ gcc/config/arm/arm.h	(working copy)
@@ -534,6 +534,11 @@ 

 #define BIGGEST_ALIGNMENT (ARM_DOUBLEWORD_ALIGN ? DOUBLEWORD_ALIGNMENT : 32)

+#ifndef MALLOC_ABI_ALIGNMENT
+#define MALLOC_ABI_ALIGNMENT (ARM_DOUBLEWORD_ALIGN ? DOUBLEWORD_ALIGNMENT : \
+			      BITS_PER_WORD)
+#endif
+