aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Tobler <andreast@gcc.gnu.org>2015-11-18 21:48:18 +0100
committerAndreas Tobler <andreast@gcc.gnu.org>2015-11-18 21:48:18 +0100
commit159e0d3b269d3cf48375b3984c6d10d806d4fa70 (patch)
tree274f8f1d517595db70353c8e8c92cbe2c60d8b5d
parent2a3047773e9cd7553e817486b735b6339ac16fee (diff)
downloadgcc-159e0d3b269d3cf48375b3984c6d10d806d4fa70.zip
gcc-159e0d3b269d3cf48375b3984c6d10d806d4fa70.tar.gz
gcc-159e0d3b269d3cf48375b3984c6d10d806d4fa70.tar.bz2
freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Bring in the commit from r125920 for FreeBSD.
2015-11-18 Andreas Tobler <andreast@gcc.gnu.org> * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Bring in the commit from r125920 for FreeBSD. From-SVN: r230565
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/freebsd.h20
2 files changed, 20 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 635de67..8bf60bb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-11-18 Andreas Tobler <andreast@gcc.gnu.org>
+
+ * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Bring in the
+ commit from r125920 for FreeBSD.
+
2015-11-18 Jason Merrill <jason@redhat.com>
* ggc-page.c (ggc_globals): Change finalizers and vec_finalizers
diff --git a/gcc/config/i386/freebsd.h b/gcc/config/i386/freebsd.h
index db7dd7f..78d5e19 100644
--- a/gcc/config/i386/freebsd.h
+++ b/gcc/config/i386/freebsd.h
@@ -98,11 +98,21 @@ along with GCC; see the file COPYING3. If not see
#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
#undef ASM_OUTPUT_MAX_SKIP_ALIGN
-#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)); \
- }
+#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
+ do { \
+ 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)); \
+ /* Make sure that we have at least 8 byte alignment if > 8 byte \
+ alignment is preferred. */ \
+ if ((LOG) > 3 \
+ && (1 << (LOG)) > ((MAX_SKIP) + 1) \
+ && (MAX_SKIP) >= 7) \
+ fputs ("\t.p2align 3\n", (FILE)); \
+ } \
+ } \
+ } while (0)
#endif
/* Don't default to pcc-struct-return, we want to retain compatibility with