summaryrefslogtreecommitdiff
path: root/gcc/config/i386
diff options
context:
space:
mode:
authorandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-18 20:48:18 +0000
committerandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2015-11-18 20:48:18 +0000
commite8ff623e7513bb3d56cc516c15bad678bbe9389a (patch)
tree274f8f1d517595db70353c8e8c92cbe2c60d8b5d /gcc/config/i386
parent5517ecc9be22bfcff11cfd98121a888f812cdb6c (diff)
downloadgcc-e8ff623e7513bb3d56cc516c15bad678bbe9389a.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230565 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386')
-rw-r--r--gcc/config/i386/freebsd.h20
1 files changed, 15 insertions, 5 deletions
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