From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4382 invoked by alias); 24 Oct 2011 14:45:35 -0000 Received: (qmail 4343 invoked by uid 22791); 24 Oct 2011 14:45:32 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,TW_GJ,TW_TJ X-Spam-Check-By: sourceware.org Received: from mail.mc.net (HELO mail.mc.net) (209.172.128.24) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 24 Oct 2011 14:45:05 +0000 Received: (qmail 23042 invoked by uid 420); 24 Oct 2011 14:45:04 -0000 Received: from unknown (HELO ?127.0.0.1?) (breuerr@209.172.177.18) by mail.mc.net with SMTP; 24 Oct 2011 14:45:04 -0000 Message-ID: <4EA57A26.1050806@mc.net> Date: Mon, 24 Oct 2011 20:05:00 -0000 From: Bob Breuer User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Kai Tietz CC: xunxun , "gcc@gcc.gnu.org" , qemu-devel , Mark Cave-Ayland , Richard Henderson Subject: Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp References: <4E9BB180.6080506@mc.net> <4E9C0497.2000605@siriusit.co.uk> <4E9C3703.3040109@mc.net> <4E9C645A.5060200@twiddle.net> <4E9C9C08.20001@mc.net> <4E9CAACE.4070804@mc.net> <4E9F3BB4.3050604@mc.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Rating: mail.mc.net 1.6.2.pk.2 0/0/N Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg00428.txt.bz2 Kai Tietz wrote: > Hi, > > For trunk-version I have a tentative patch for this issue. On 4.6.x > and older branches this doesn't work, as here we can't differenciate > that easy between ms- and sysv-abi. > > But could somebody give this patch a try? > > Regards, > Kai > > ChangeLog > > * config/i386/i386.c (ix86_frame_pointer_required): Enforce use of > frame-pointer for 32-bit ms-abi, if setjmp is used. > > Index: i386.c > =================================================================== > --- i386.c (revision 180099) > +++ i386.c (working copy) > @@ -8391,6 +8391,10 @@ > if (SUBTARGET_FRAME_POINTER_REQUIRED) > return true; > > + /* For older 32-bit runtimes setjmp requires valid frame-pointer. */ > + if (TARGET_32BIT_MS_ABI && cfun->calls_setjmp) > + 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. */ > For a gcc 4.7 snapshot, this does fix the longjmp problem that I encountered. So aside from specifying -fno-omit-frame-pointer for affected files, what can be done for 4.6? Bob