This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[arm] Fix alignment of complex double types.


The following patch fixes the alignment of complex doubleword arguments under 
aapcs based ABIs. It looks at the alignment of the mode, rather than 
hardcoding specific modes.

Tested with cross to arm-none-elf.
Ok?

Paul

2004-04-30  Paul Brook  <paul@codesourcery.com>

	* arm.c (arm_needs_doubleword_align): Use mode alignment.

Index: arm.c
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.353
diff -u -p -r1.353 arm.c
--- a/arm.c	27 Apr 2004 14:20:10 -0000	1.353
+++ b/arm.c	29 Apr 2004 15:48:36 -0000
@@ -2318,11 +2319,8 @@ arm_init_cumulative_args (CUMULATIVE_ARG
 bool
 arm_needs_doubleword_align (enum machine_mode mode, tree type)
 {
-  return (mode == DImode
-	  || mode == DFmode
-	  || VECTOR_MODE_SUPPORTED_P (mode)
-	  || (mode == BLKmode
-	      && TYPE_ALIGN (type) > PARM_BOUNDARY));
+  return (GET_MODE_ALIGNMENT (mode) > PARM_BOUNDARY
+	  || (type && TYPE_ALIGN (type) > PARM_BOUNDARY));
 }
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]