Only assume 4-byte stack alignment on 32-bit Solaris/x86 (PR target/62281)
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Mar 2016 09:51:31 +0000 (09:51 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Mar 2016 09:51:31 +0000 (09:51 +0000)
PR target/62281
* config/i386/sol2.h (STACK_REALIGN_DEFAULT): Define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234022 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/sol2.h

index 2b55498..a797dfa 100644 (file)
@@ -1,3 +1,8 @@
+2016-03-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR target/62281
+       * config/i386/sol2.h (STACK_REALIGN_DEFAULT): Define.
+
 2016-03-05  Venkataramanan Kumar  <Venkataramanan.kumar@amd.com>
 
        * config/i386/i386.c (znver1_cost): Fix Multiply cost.
index 51d1c55..e56e554 100644 (file)
@@ -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