From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGeUA-0002p6-44 for qemu-devel@nongnu.org; Wed, 19 Oct 2011 18:19:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGeU8-00074M-Ez for qemu-devel@nongnu.org; Wed, 19 Oct 2011 18:19:42 -0400 Received: from mail-ww0-f53.google.com ([74.125.82.53]:37278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGeU8-000743-7T for qemu-devel@nongnu.org; Wed, 19 Oct 2011 18:19:40 -0400 Received: by wwi36 with SMTP id 36so2985651wwi.10 for ; Wed, 19 Oct 2011 15:19:38 -0700 (PDT) Sender: Richard Henderson Message-ID: <4E9F4CF5.5050608@twiddle.net> Date: Wed, 19 Oct 2011 15:19:33 -0700 From: Richard Henderson 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: <4E9F3BB4.3050604@mc.net> 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: Bob Breuer Cc: "gcc@gcc.gnu.org" , Kai Tietz , qemu-devel , Mark Cave-Ayland On 10/19/2011 02:05 PM, Bob Breuer wrote: > Is it possible to force a > stackframe by just adding a suitable attribute to either the setjmp > function prototype, or the function which calls setjmp? The only thing I can think of that'll be portable to a large number of versions of GCC is { int n; char *p; asm("" : "=r"(n) : "0"(1)); p = __builtin_alloca(n); asm("" : : "r"(p)); } The first asm prevents constant propagation of the 1 to the alloca; the second asm prevents the alloca from being considered dead code. r~