diff options
author | Nick Clifton <nickc@cygnus.com> | 2000-02-18 18:22:10 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2000-02-18 18:22:10 +0000 |
commit | 725790629f4c9d4efcd88e50f4173b47fd90f869 (patch) | |
tree | c26369d1fb9467c96e1407110dd6668104cf2d4d /gcc | |
parent | a0f4cca64282e20ad9736528dc5d1b20ce4536e0 (diff) | |
download | gcc-725790629f4c9d4efcd88e50f4173b47fd90f869.zip gcc-725790629f4c9d4efcd88e50f4173b47fd90f869.tar.gz gcc-725790629f4c9d4efcd88e50f4173b47fd90f869.tar.bz2 |
Prevent emission of "a.lign 0" directives
From-SVN: r32052
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/arm/elf.h | 12 | ||||
-rw-r--r-- | gcc/config/arm/thumb.h | 19 |
3 files changed, 29 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ec11780..db5b0a8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2000-02-18 Nick Clifton <nickc@cygnus.com> + + * config/arm/elf.h (ASM_OUTPUT_ALIGN): Do not generate + anything for an alignment of zero. + + * config/arm/thumb.h (ASM_OUTPUT_ALIGN): Do not generate + anything for an alignment of zero. + 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de> * gcc.texi (Bug Reporting): Refer to bugs.html. diff --git a/gcc/config/arm/elf.h b/gcc/config/arm/elf.h index 71b36d2..9b620206 100644 --- a/gcc/config/arm/elf.h +++ b/gcc/config/arm/elf.h @@ -356,8 +356,14 @@ dtors_section () \ not defined, the default value is `BIGGEST_ALIGNMENT'. */ #define MAX_OFILE_ALIGNMENT (32768 * 8) -/* Align output to a power of two. */ -#define ASM_OUTPUT_ALIGN(STREAM, POWER) \ - fprintf (STREAM, "\t.align\t%d\n", POWER) +/* Align output to a power of two. Note ".align 0" is redundant, + and also GAS will treat it as ".align 2" which we do not want. */ +#define ASM_OUTPUT_ALIGN(STREAM, POWER) \ + do \ + { \ + if ((POWER) > 0) \ + fprintf (STREAM, "\t.align\t%d\n", POWER); \ + } \ + while (0) #include "arm/aout.h" diff --git a/gcc/config/arm/thumb.h b/gcc/config/arm/thumb.h index ab89828..2366e14 100644 --- a/gcc/config/arm/thumb.h +++ b/gcc/config/arm/thumb.h @@ -139,13 +139,18 @@ extern int target_flags; #define ASM_OUTPUT_SKIP(STREAM, NBYTES) \ fprintf ((STREAM), "\t.space\t%u\n", (NBYTES)) -/* This is how to output an assembler line - that says to advance the location counter - to a multiple of 2**LOG bytes. */ -#define ASM_OUTPUT_ALIGN(STREAM,LOG) \ -{ \ - fprintf (STREAM, "\t.align\t%d\n", (LOG)); \ -} +/* This is how to output an assembler line that says to advance the + location counter to a multiple of 2**LOG bytes. Advancing to the + nearest 1 byte boundary is redundant, and anyway the assembler would + treat it as meaning "advance to nearest 4 byte boundary", which we do + not want. */ +#define ASM_OUTPUT_ALIGN(STREAM,LOG) \ + do \ + { \ + if ((LOG) > 0) \ + fprintf (STREAM, "\t.align\t%d\n", LOG); \ + } \ + while (0) /* Output a common block */ #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \ |