rhill 16/04/29 00:29:02 Modified: README.history Added: 91_all_pr69140-msabi-stack-alignment.patch Log: Add patch for bug #574044 and push out p1.1.
Revision Changes Path 1.4 src/patchsets/gcc/5.3.0/gentoo/README.history file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/gentoo/README.history?rev=1.4&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/gentoo/README.history?rev=1.4&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/gentoo/README.history?r1=1.3&r2=1.4 Index: README.history =================================================================== RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/5.3.0/gentoo/README.history,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- README.history 26 Jan 2016 21:05:43 -0000 1.3 +++ README.history 29 Apr 2016 00:29:02 -0000 1.4 @@ -1,6 +1,7 @@ -1.1 [pending] +1.1 28 Apr 2016 + 36_all_gcc-ia64-pr60465.patch U 74_all_gcc5_isl-dl.patch + + 91_all_pr69140-msabi-stack-alignment.patch 1.0 05 Dec 2015 + 05_all_gcc-spec-env.patch 1.1 src/patchsets/gcc/5.3.0/gentoo/91_all_pr69140-msabi-stack-alignment.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/gentoo/91_all_pr69140-msabi-stack-alignment.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/5.3.0/gentoo/91_all_pr69140-msabi-stack-alignment.patch?rev=1.1&content-type=text/plain Index: 91_all_pr69140-msabi-stack-alignment.patch =================================================================== https://bugs.gentoo.org/574044 https://gcc.gnu.org/PR69140 commit 11e330df4d27cf801f7edd61605082f66d1ee4ae Author: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Mon Jan 18 16:19:53 2016 +0000 Backport from mainline 2016-01-07 Uros Bizjak <ubiz...@gmail.com> PR target/69140 * config/i386/i386.c (ix86_frame_pointer_required): Enable frame pointer for TARGET_64BIT_MS_ABI when stack is misaligned. testsuite/ChangeLog: Backport from mainline 2016-01-06 Uros Bizjak <ubiz...@gmail.com> PR target/69140 * gcc.target/i386/pr69140.c: New test git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@232528 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/config/i386/i386.c | 4 ++++ gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/gcc.target/i386/pr69140.c | 24 ++++++++++++++++++++++++ 4 files changed, 45 insertions(+) --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -9690,6 +9690,10 @@ ix86_frame_pointer_required (void) if (TARGET_64BIT_MS_ABI && get_frame_size () > SEH_MAX_FRAME_SIZE) return true; + /* SSE saves require frame-pointer when stack is misaligned. */ + if (TARGET_64BIT_MS_ABI && ix86_incoming_stack_boundary < 128) + return true; + /* In ix86_option_override_internal, TARGET_OMIT_LEAF_FRAME_POINTER turns off the frame pointer by default. Turn it back on now if we've not got a leaf function. */ --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr69140.c @@ -0,0 +1,24 @@ +/* { dg-do compile { target lp64 } } */ +/* { dg-options "-O2 -mincoming-stack-boundary=3" } */ + +typedef struct { + unsigned int buf[4]; + unsigned char in[64]; +} MD4_CTX; + +static void +MD4Transform (unsigned int buf[4], const unsigned int in[16]) +{ + unsigned int a, b, c, d; + (b) += ((((c)) & ((d))) | ((~(c)) & ((a)))) + (in[7]); + (a) += ((((b)) & ((c))) | ((~(b)) & ((d)))) + (in[8]); + (d) += ((((a)) & ((b))) | ((~(a)) & ((c)))) + (in[9]); + buf[3] += d; +} + +void __attribute__((ms_abi)) +MD4Update (MD4_CTX *ctx, const unsigned char *buf) +{ + MD4Transform( ctx->buf, (unsigned int *)ctx->in); + MD4Transform( ctx->buf, (unsigned int *)ctx->in); +}