From 159e0d3b269d3cf48375b3984c6d10d806d4fa70 Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Wed, 18 Nov 2015 21:48:18 +0100 Subject: [PATCH] freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Bring in the commit from r125920 for FreeBSD. 2015-11-18 Andreas Tobler * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Bring in the commit from r125920 for FreeBSD. From-SVN: r230565 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/freebsd.h | 20 +++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 635de672c97..8bf60bb3eae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-11-18 Andreas Tobler + + * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Bring in the + commit from r125920 for FreeBSD. + 2015-11-18 Jason Merrill * 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 db7dd7ff9f0..78d5e198576 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 -- 2.30.2