Define ASM_OUTPUT_MAX_SKIP_ALIGN if the assembler supports .p2align.
authorNick Clifton <nickc@cambridge.redhat.com>
Thu, 26 Apr 2001 15:37:02 +0000 (15:37 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Thu, 26 Apr 2001 15:37:02 +0000 (15:37 +0000)
From-SVN: r41591

gcc/ChangeLog
gcc/config/arm/arm.h

index 9f85328..6b62da1 100644 (file)
@@ -1,3 +1,8 @@
+2001-04-26  Nick Clifton  <nickc@cambridge.redhat.com>
+
+       * config/arm/arm.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Define, if the
+       assembler supports .p2align.
+
 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
 
        * c-lex.c (c_lex): Remove # from %o diagnostic formatting.
index 4387193..a4c1b70 100644 (file)
@@ -2704,6 +2704,21 @@ extern int making_const_table;
     }                                                          \
   while (0)
 
+#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
+/* To support -falign-* switches we need to use .p2align so
+   that alignment directives in code sections will be padded
+   with no-op instructions, rather than zeroes.  */
+#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP)           \
+  if ((LOG) != 0)                                              \
+    {                                                          \
+      if ((MAX_SKIP) == 0)                                     \
+        fprintf ((FILE), "\t.p2align %d\n", (LOG));            \
+      else                                                     \
+        fprintf ((FILE), "\t.p2align %d,,%d\n",                        \
+                 (LOG), (MAX_SKIP));                           \
+    }
+#endif
+
 /* Target characters.  */
 #define TARGET_BELL    007
 #define TARGET_BS      010