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]

SH: don't extend alignment with -Os


Hi,

the SH port (and others) uses FASTEST_ALIGNMENT even in -mspace mode.

Hartmut

diff --recursive -c gcc-20010604.orig/gcc/config/sh/sh.h
gcc-20010604/gcc/config/sh/sh.h
*** gcc-20010604.orig/gcc/config/sh/sh.h	Wed Jun  6 05:58:25 2001
--- gcc-20010604/gcc/config/sh/sh.h	Fri Jun  1 13:37:55 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]