This is the mail archive of the gcc@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]

SH -Os patch


Hi,

on the SH (and my be on other targets too) some alignments
for string storage can be reduce to save space.

Hartmut

*** sh.h.orig	Tue Jan  9 11:25:22 2001
--- sh.h	Wed Jan 10 01:32:11 2001
***************
*** 366,372 ****
  /* Make strings word-aligned so strcpy from constants will be faster.  */
  #define CONSTANT_ALIGNMENT(EXP, ALIGN)	\
    ((TREE_CODE (EXP) == STRING_CST	\
!     && (ALIGN) < FASTEST_ALIGNMENT)	\
      ? FASTEST_ALIGNMENT : (ALIGN))
  
  #ifndef MAX_OFILE_ALIGNMENT
--- 366,373 ----
  /* Make strings word-aligned so strcpy from constants will be faster.  */
  #define CONSTANT_ALIGNMENT(EXP, ALIGN)	\
    ((TREE_CODE (EXP) == STRING_CST	\
!     && (ALIGN) < FASTEST_ALIGNMENT 	\
!     && !TARGET_SMALLCODE)		\
      ? FASTEST_ALIGNMENT : (ALIGN))
  
  #ifndef MAX_OFILE_ALIGNMENT
***************
*** 377,382 ****
--- 378,384 ----
  #define DATA_ALIGNMENT(TYPE, ALIGN)		\
    (TREE_CODE (TYPE) == ARRAY_TYPE		\
     && TYPE_MODE (TREE_TYPE (TYPE)) == QImode	\
+    && !TARGET_SMALLCODE			\
     && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
  
  /* Number of bits which any structure or union's size must be a

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