public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hutchinsonandy at aim dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/34879] __builtin_setjmp / __builtin_longjmp fails stack frame address with O2, O3 and Os
Date: Sat, 29 Mar 2008 11:37:00 -0000	[thread overview]
Message-ID: <20080329113705.1556.qmail@sourceware.org> (raw)
In-Reply-To: <bug-34879-15663@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from hutchinsonandy at aim dot com  2008-03-29 11:37 -------
Created an attachment (id=15395)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15395&action=view)
Setjmp patch for AVR

The attached patch is a fix for AVR target. MIPS does something similar to get
around same issue.

The real problem is with gcc builin setjmp receiver being removed by
optimizers.
Optimizers think that frame_pointer load in receiver is unneeded and remove it! 

The patch loads the frame pointer in the nonlocal_goto, making the receiver
(where it jumps to) empty, so bad optimization cannot remove it. Additionally,
it avoids the unnecessary arithmetic around frame pointer offsets.

This patch was tested and the testcase passes.

Further changes may be required in the future if AVR 24bit jumps are to be
supported.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34879


  reply	other threads:[~2008-03-29 11:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-20  4:18 [Bug target/34879] New: " pmarques at grupopie dot com
2008-03-29 11:37 ` hutchinsonandy at aim dot com [this message]
2008-04-04 21:41 ` [Bug target/34879] " eric dot weddington at atmel dot com
2008-06-02 22:09 ` hutchinsonandy at gcc dot gnu dot org
2008-06-02 23:49 ` eric dot weddington at atmel dot com

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=20080329113705.1556.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).