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]
Other format: [Raw text]

[m68k 12/13] properly align within code


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.  */

--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]