This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
SH -Os patch
- To: gcc at gcc dot gnu dot org
- Subject: SH -Os patch
- From: Hartmut Schirmer <hartmut dot schirmer at arcormail dot de>
- Date: Wed, 10 Jan 2001 13:35:12 +0100
- Cc: Alexandre Oliva <aoliva at redhat dot com>, amylaar at redhat dot com
- Reply-To: hartmut dot schirmer at arcormail dot de
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