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]

[SPARC] Align local variables like global variables


Reviving a tradition from the 3.4.x era, here is SPARC again shamelessly 
borrowing MIPS material, namely Nigel Stephens' latest patch. :-)

In fact the same problem as on MIPS was reported on SPARC by Amruth Laxman a 
couple of weeks ago (PR target/33594).  This is a regression from 3.4.x.

Bootstrapped/regtested on SPARC/Solaris 8, applied on the mainline.


2007-10-16  Amruth Laxman  <amruth.laxman@nsn.com>

	PR target/33594
	* config/sparc/sparc.h (LOCAL_ALIGNMENT): Define.


-- 
Eric Botcazou
Index: config/sparc/sparc.h
===================================================================
--- config/sparc/sparc.h	(revision 129282)
+++ config/sparc/sparc.h	(working copy)
@@ -691,6 +691,9 @@ if (TARGET_ARCH64				\
    && TYPE_MODE (TREE_TYPE (TYPE)) == QImode	\
    && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
 
+/* Make local arrays of chars word-aligned for the same reasons.  */
+#define LOCAL_ALIGNMENT(TYPE, ALIGN) DATA_ALIGNMENT (TYPE, ALIGN)
+
 /* Set this nonzero if move instructions will actually fail to work
    when given unaligned data.  */
 #define STRICT_ALIGNMENT 1

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