From e8ff623e7513bb3d56cc516c15bad678bbe9389a Mon Sep 17 00:00:00 2001 From: andreast Date: Wed, 18 Nov 2015 20:48:18 +0000 Subject: 2015-11-18 Andreas Tobler * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Bring in the commit from r125920 for FreeBSD. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230565 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/i386/freebsd.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'gcc/config/i386') 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 -- cgit v1.2.1