From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17294 invoked by alias); 6 Dec 2013 06:20:33 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 17256 invoked by uid 48); 6 Dec 2013 06:20:29 -0000 From: "achurch+gcc at achurch dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/56807] mingw32: Conflict between stack realignment and stack probe destroys function argument in EAX Date: Fri, 06 Dec 2013 06:20:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.7.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: achurch+gcc at achurch dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-12/txt/msg00454.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56807 --- Comment #6 from Andrew Church --- Still broken for me, sorry. Using SVN r205727 with the patch, the assembly now looks like: 00000000 <_bar>: 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 83 e4 f0 and $0xfffffff0,%esp 6: 50 push %eax 7: b8 1c 10 00 00 mov $0x101c,%eax c: e8 00 00 00 00 call 11 <_bar+0x11> d: DISP32 ___chkstk_ms 11: 29 c4 sub %eax,%esp 13: 8b 84 24 e4 ef ff ff mov -0x101c(%esp),%eax so it's using the stack pointer but the offset is in the wrong direction. Should "0 - allocate" be just "allocate" in the plus_constant() calls?