Darwin, x86 - We have .p2align, so declare its use.
authorIain Sandoe <iain@sandoe.co.uk>
Fri, 31 May 2019 07:13:46 +0000 (07:13 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Fri, 31 May 2019 07:13:46 +0000 (07:13 +0000)
.p2align support is present in all x86 assemblers on released
Darwin systems.

gcc/

2019-05-29  Iain Sandoe  <iain@sandoe.co.uk>

* config/i386/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): New.

From-SVN: r271799

gcc/ChangeLog
gcc/config/i386/darwin.h

index 293744ea0910a8e68a7ab61efe06b4db54783921..e3792c6ee8598e7f61f34264357ffa774c34f704 100644 (file)
@@ -1,3 +1,7 @@
+2019-05-31  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * config/i386/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): New.
+
 2019-05-30  Bill Schmidt  <wschmidt@linux.ibm.com>
            Michael Meissner  <meissner@linux.ibm.com>
 
index 11284283304e108ab17fb8e7bae617e710923892..46fa329f622a95fcb909699805edc035af36ff89 100644 (file)
@@ -223,6 +223,18 @@ extern int darwin_emit_branch_islands;
       }                                                                   \
   } while (0)
 
+#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
+#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP)                    \
+  do {                                                                  \
+    if ((LOG) != 0) {                                                   \
+      if ((MAX_SKIP) == 0 || (MAX_SKIP) >= (1 << (LOG)) - 1)            \
+        fprintf ((FILE), "\t.p2align %d\n", (LOG));                     \
+      else                                                              \
+        fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP));     \
+    }                                                                   \
+  } while (0)
+#endif
+
 /* Darwin x86 assemblers support the .ident directive.  */
 
 #undef TARGET_ASM_OUTPUT_IDENT