Patchwork [ARM] Fix definition of MALLOC_ABI_ALIGNMENT.

login
register
mail settings
Submitter Ramana Radhakrishnan
Date March 12, 2012, 10:35 p.m.
Message ID <CACUk7=Xv8c+-MKEp-_TrekLMNhmXf1mTC_31zqLq+meGOjDNaw@mail.gmail.com>
Download mbox | patch
Permalink /patch/146276/
State New
Headers show

Comments

Ramana Radhakrishnan - March 12, 2012, 10:35 p.m.
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.
Richard Earnshaw - March 13, 2012, 2:11 p.m.
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.

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
+