From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RILm2-0004IQ-0d for qemu-devel@nongnu.org; Mon, 24 Oct 2011 10:45:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RILly-0002wJ-31 for qemu-devel@nongnu.org; Mon, 24 Oct 2011 10:45:09 -0400 Received: from mail.mc.net ([209.172.128.24]:40740) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RILlx-0002uT-VL for qemu-devel@nongnu.org; Mon, 24 Oct 2011 10:45:06 -0400 Message-ID: <4EA57A26.1050806@mc.net> Date: Mon, 24 Oct 2011 09:45:58 -0500 From: Bob Breuer MIME-Version: 1.0 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 Subject: Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kai Tietz Cc: xunxun , Richard Henderson , qemu-devel , Mark Cave-Ayland , "gcc@gcc.gnu.org" 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