aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2015-10-08 18:57:11 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2015-10-08 11:57:11 -0700
commitbc8642d6cef0782bc3181ade2ba577e53bcefc15 (patch)
tree845b51076e952216469c5e571cdda916683ab1b5 /gcc
parentd1acc3f4d2dbe3619f977f2cacca446bff74e1a7 (diff)
downloadgcc-bc8642d6cef0782bc3181ade2ba577e53bcefc15.zip
gcc-bc8642d6cef0782bc3181ade2ba577e53bcefc15.tar.gz
gcc-bc8642d6cef0782bc3181ade2ba577e53bcefc15.tar.bz2
Round up the SSE register save area only if needed
There is is no point to round up the SSE register save area to 16 bytes if the incoming stack boundary is less than 16 bytes. * config/i386/i386.c (ix86_compute_frame_layout): Round up the SSE register save area to 16 bytes only if the incoming stack boundary is no less than 16 bytes. From-SVN: r228621
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9f84b6e..4286491 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (ix86_compute_frame_layout): Round up the
+ SSE register save area to 16 bytes only if the incoming stack
+ boundary is no less than 16 bytes.
+
2015-10-08 Jeff Law <law@redhat.com>
* tree-ssa-phiopt.c (factor_out_conversion): Add missing calls to
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a24bd26..4806a7c 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -11383,9 +11383,14 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
if (frame->nsseregs)
{
/* The only ABI that has saved SSE registers (Win64) also has a
- 16-byte aligned default stack, and thus we don't need to be
- within the re-aligned local stack frame to save them. */
- offset = ROUND_UP (offset, 16);
+ 16-byte aligned default stack, and thus we don't need to be
+ within the re-aligned local stack frame to save them. In case
+ incoming stack boundary is aligned to less than 16 bytes,
+ unaligned move of SSE register will be emitted, so there is
+ no point to round up the SSE register save area outside the
+ re-aligned local stack frame to 16 bytes. */
+ if (ix86_incoming_stack_boundary >= 128)
+ offset = ROUND_UP (offset, 16);
offset += frame->nsseregs * 16;
}
frame->sse_reg_save_offset = offset;