summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Figueroa <figueroa@apple.com>2002-09-17 21:36:29 +0000
committerDale Johannesen <dalej@gcc.gnu.org>2002-09-17 21:36:29 +0000
commit8e16ab99953149a0936735618e6d26b79651a1b3 (patch)
tree940a284b4bcf3c4e0a81c05417042a6b0f29b2cb
parentac19be7ebaaa65f6bf5df62db247a57dc41dde57 (diff)
downloadgcc-8e16ab99953149a0936735618e6d26b79651a1b3.tar.gz
Sam Figueroa's change to add ASM_OUTPUT_ALIGN_WITH_NOP.
From-SVN: r57261
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/sparc/sparc.h7
-rw-r--r--gcc/doc/tm.texi5
-rw-r--r--gcc/final.c4
4 files changed, 21 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 472a9b8af60..1aef739a5aa 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-17 Samuel Figueroa <figueroa@apple.com>
+ * final.c (final_scan_insn): Use new macro ASM_OUTPUT_ALIGN_WITH_NOP.
+ * config/sparc/sparc.h (ASM_OUTPUT_ALIGN_WITH_NOP) New macro.
+ * doc/tm.texi (ASM_OUTPUT_ALIGN_WITH_NOP) New description.
+
2002-09-17 Dale Johannesen <dalej@apple.com>
* cfgcleanup.c (try_forward_edges): Do not forward a
branch to just after a loop exit before loop optimization;
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index d294a07910b..aa7c23af4d9 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -2812,6 +2812,13 @@ do { \
if ((LOG) != 0) \
fprintf (FILE, "\t.align %d\n", (1<<(LOG)))
+/* This is how to output an assembler line that says to advance
+ the location counter to a multiple of 2**LOG bytes using the
+ "nop" instruction as padding. */
+#define ASM_OUTPUT_ALIGN_WITH_NOP(FILE,LOG) \
+ if ((LOG) != 0) \
+ fprintf (FILE, "\t.align %d,0x1000000\n", (1<<(LOG)))
+
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
fprintf (FILE, "\t.skip %u\n", (SIZE))
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index b4a808b10de..ebc242fdbc0 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -7577,6 +7577,11 @@ A C statement to output to the stdio stream @var{stream} an assembler
command to advance the location counter to a multiple of 2 to the
@var{power} bytes. @var{power} will be a C expression of type @code{int}.
+@findex ASM_OUTPUT_ALIGN_WITH_NOP
+@item ASM_OUTPUT_ALIGN_WITH_NOP (@var{stream}, @var{power})
+Like @code{ASM_OUTPUT_ALIGN}, except that the ``nop'' instruction is used
+for padding, if necessary.
+
@findex ASM_OUTPUT_MAX_SKIP_ALIGN
@item ASM_OUTPUT_MAX_SKIP_ALIGN (@var{stream}, @var{power}, @var{max_skip})
A C statement to output to the stdio stream @var{stream} an assembler
diff --git a/gcc/final.c b/gcc/final.c
index 9d2c42632b5..0ff3c3a249c 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -2185,8 +2185,12 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
#ifdef ASM_OUTPUT_MAX_SKIP_ALIGN
ASM_OUTPUT_MAX_SKIP_ALIGN (file, align, max_skip);
#else
+#ifdef ASM_OUTPUT_ALIGN_WITH_NOP
+ ASM_OUTPUT_ALIGN_WITH_NOP (file, align);
+#else
ASM_OUTPUT_ALIGN (file, align);
#endif
+#endif
}
}
#ifdef HAVE_cc0