From 41604008c050f35dbc4d9280814843d46feb447e Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Mon, 7 Mar 2016 09:51:31 +0000 Subject: [PATCH] Only assume 4-byte stack alignment on 32-bit Solaris/x86 (PR target/62281) PR target/62281 * config/i386/sol2.h (STACK_REALIGN_DEFAULT): Define. From-SVN: r234022 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/sol2.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b5549808ee..a797dfa0fd4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-03-07 Rainer Orth + + PR target/62281 + * config/i386/sol2.h (STACK_REALIGN_DEFAULT): Define. + 2016-03-05 Venkataramanan Kumar * config/i386/i386.c (znver1_cost): Fix Multiply cost. diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h index 51d1c55de0d..e56e554a740 100644 --- a/gcc/config/i386/sol2.h +++ b/gcc/config/i386/sol2.h @@ -21,6 +21,11 @@ along with GCC; see the file COPYING3. If not see #define SUBTARGET_OPTIMIZATION_OPTIONS \ { OPT_LEVELS_1_PLUS, OPT_momit_leaf_frame_pointer, NULL, 1 } +/* 32-bit Solaris/x86 only guarantees 4-byte stack alignment as required by + the i386 psABI, so realign it as necessary for SSE instructions. */ +#undef STACK_REALIGN_DEFAULT +#define STACK_REALIGN_DEFAULT (TARGET_64BIT ? 0 : 1) + /* Old versions of the Solaris assembler can not handle the difference of labels in different sections, so force DW_EH_PE_datarel if so. */ #ifndef HAVE_AS_IX86_DIFF_SECT_DELTA -- 2.30.2