qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Bob Breuer <breuerr@mc.net>
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>,
	Kai Tietz <ktietz70@googlemail.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Subject: Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp
Date: Wed, 19 Oct 2011 15:19:33 -0700	[thread overview]
Message-ID: <4E9F4CF5.5050608@twiddle.net> (raw)
In-Reply-To: <4E9F3BB4.3050604@mc.net>

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~

  reply	other threads:[~2011-10-19 22:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17  4:39 [Qemu-devel] qemu-system-sparc io-thread segfault on win32 Bob Breuer
     [not found] ` <4E9C0497.2000605@siriusit.co.uk>
2011-10-17 14:09   ` Bob Breuer
2011-10-17 17:22     ` [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp Richard Henderson
2011-10-17 19:14       ` Blue Swirl
2011-10-17 20:11         ` Richard Henderson
2011-10-17 21:20       ` Bob Breuer
2011-10-17 21:31         ` Kai Tietz
2011-10-17 22:23           ` Bob Breuer
2011-10-17 22:56             ` Kai Tietz
2011-10-19 21:05               ` Bob Breuer
2011-10-19 22:19                 ` Richard Henderson [this message]
2011-10-20  4:22                 ` xunxun
2011-10-20 14:48                   ` Kai Tietz
2011-10-20 15:34                     ` Kai Tietz
     [not found]                       ` <j7sgfi$i66$1@dough.gmane.org>
2011-10-22  5:13                         ` xunxun
2011-10-22  5:21                           ` xunxun
2011-10-22 11:19                             ` Kai Tietz
2011-10-22 14:23                       ` asmwarrior
2011-10-24 14:45                       ` Bob Breuer
2011-10-24 16:18                         ` Kai Tietz
2011-10-25 15:14                           ` Bob Breuer
2011-10-20 13:04                 ` jojelino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E9F4CF5.5050608@twiddle.net \
    --to=rth@twiddle.net \
    --cc=breuerr@mc.net \
    --cc=gcc@gcc.gnu.org \
    --cc=ktietz70@googlemail.com \
    --cc=mark.cave-ayland@siriusit.co.uk \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).