This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[m68k 12/13] properly align within code
- From: zippel at linux-m68k dot org
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Jan 2007 12:26:27 +0100
- Subject: [m68k 12/13] properly align within code
- References: <20070130112615.782382000@linux-m68k.org>
Hi,
If using some of -falign options with a larger alignment, no proper nop
instruction is inserted. The patch uses "move.l %a4,%a4" as nop (the
real nop has synchronizing properties).
2007-01-30 Roman Zippel <zippel@linux-m68k.org>
* config/m68k/m68k.h (ASM_OUTPUT_ALIGN_WITH_NOP): New, use
"move.l %a4,%a4" to produce nops.
---
gcc/config/m68k/linux.h | 5 +++++
1 file changed, 5 insertions(+)
Index: gcc-4.1/gcc/config/m68k/linux.h
===================================================================
--- gcc-4.1.orig/gcc/config/m68k/linux.h
+++ gcc-4.1/gcc/config/m68k/linux.h
@@ -163,6 +163,11 @@ Boston, MA 02110-1301, USA. */
if ((LOG) > 0) \
fprintf ((FILE), "%s%u\n", ALIGN_ASM_OP, 1 << (LOG));
+/* Use "move.l %a4,%a4" to advance within code. */
+#define ASM_OUTPUT_ALIGN_WITH_NOP(FILE,LOG) \
+ if ((LOG) > 0) \
+ fprintf ((FILE), "\t.balignw %u,0x284c\n", 1 << (LOG));
+
/* If defined, a C expression whose value is a string containing the
assembler operation to identify the following data as uninitialized global
data. */
--