public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/51784] PIC register not correctly preserved in nested funcs / with non-local goto
Date: Sat, 14 Jan 2012 17:46:00 -0000	[thread overview]
Message-ID: <bug-51784-4-a2JQA3Ffb1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51784-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #30 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-14 16:56:10 UTC ---
(In reply to comment #28)
> Created attachment 26324 [details]
> a first attempt at a fix
> 
> this is pretty much the first ever RTL I've written ....
> ... so comments welcome ... 
> 
> I've had a quick look at the output on a couple of test-cases and it seems to
> DTRT .. but it's "hardly tested" so far.

That #if TARGET_MACHO and if (TARGET_MACHO) is unneeded, the condition already
guards it.  If it was using some darwin specific functions or macros, you'd
just surround the body in #if TARGET_MACHO.
Furthermore, you don't know during expansion whether the PIC pointer will be
emitted or not, therefore probably the nonlocal goto receiver (with the
condition you've used) should be initially an instruction with unspec_volatile
UNSPECV_NONLOCAL_GOTO_RECEIVER or so, and only split after prologue is emitted,
either into nothing (if the PIC register doesn't need to be restored), or to
the actual instructions.


  parent reply	other threads:[~2012-01-14 16:56 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-07 14:21 [Bug middle-end/51784] New: [4.7 Regression] FAIL: gcc.dg/tree-prof/pr44777.c execution, -fprofile-generate -D_PROFILE_GENERATE dominiq at lps dot ens.fr
2012-01-07 21:34 ` [Bug middle-end/51784] " jakub at gcc dot gnu.org
2012-01-07 22:41 ` dominiq at lps dot ens.fr
2012-01-08 12:10 ` dominiq at lps dot ens.fr
2012-01-08 12:13 ` dominiq at lps dot ens.fr
2012-01-08 12:14 ` dominiq at lps dot ens.fr
2012-01-08 12:15 ` dominiq at lps dot ens.fr
2012-01-08 12:16 ` dominiq at lps dot ens.fr
2012-01-08 12:19 ` dominiq at lps dot ens.fr
2012-01-09  9:09 ` rguenth at gcc dot gnu.org
2012-01-09 12:03 ` rguenth at gcc dot gnu.org
2012-01-11  8:20 ` jakub at gcc dot gnu.org
2012-01-11 21:11 ` dominiq at lps dot ens.fr
2012-01-11 21:31 ` iains at gcc dot gnu.org
2012-01-13 23:12 ` dominiq at lps dot ens.fr
2012-01-13 23:33 ` dominiq at lps dot ens.fr
2012-01-13 23:41 ` jakub at gcc dot gnu.org
2012-01-14  0:09 ` dominiq at lps dot ens.fr
2012-01-14  1:41 ` jakub at gcc dot gnu.org
2012-01-14  2:47 ` jakub at gcc dot gnu.org
2012-01-14 10:21 ` [Bug target/51784] " iains at gcc dot gnu.org
2012-01-14 10:22 ` jakub at gcc dot gnu.org
2012-01-14 11:04 ` iains at gcc dot gnu.org
2012-01-14 11:29 ` [Bug target/51784] PIC register not correctly preserved in nested funcs / with non-local goto iains at gcc dot gnu.org
2012-01-14 11:34 ` jakub at gcc dot gnu.org
2012-01-14 11:43 ` iains at gcc dot gnu.org
2012-01-14 11:49 ` dominiq at lps dot ens.fr
2012-01-14 12:04 ` iains at gcc dot gnu.org
2012-01-14 12:07 ` jakub at gcc dot gnu.org
2012-01-14 16:51 ` iains at gcc dot gnu.org
2012-01-14 16:56 ` iains at gcc dot gnu.org
2012-01-14 17:46 ` jakub at gcc dot gnu.org [this message]
2012-01-14 23:43 ` pinskia at gcc dot gnu.org
2012-01-15 12:06 ` iains at gcc dot gnu.org
2012-01-15 12:47 ` iains at gcc dot gnu.org
2012-01-15 12:55 ` jakub at gcc dot gnu.org
2012-01-18 14:17 ` iains at gcc dot gnu.org
2012-01-18 14:25 ` iains at gcc dot gnu.org
2012-01-19 11:21 ` dominiq at lps dot ens.fr
2012-01-19 11:57 ` jakub at gcc dot gnu.org
2012-01-19 12:23 ` iains at gcc dot gnu.org
2012-03-22  9:16 ` rguenth at gcc dot gnu.org
2012-07-02 13:03 ` rguenth at gcc dot gnu.org
2012-12-15 18:15 ` pinskia at gcc dot gnu.org
2013-02-06  9:20 ` iains at gcc dot gnu.org
2013-02-07 13:46 ` howarth at nitro dot med.uc.edu
2013-02-07 13:50 ` howarth at nitro dot med.uc.edu
2013-02-07 13:54 ` dominiq at lps dot ens.fr
2013-02-07 16:28 ` howarth at nitro dot med.uc.edu
2013-07-26 17:00 ` dominiq at lps dot ens.fr
2013-08-03 11:30 ` dominiq at lps dot ens.fr
2013-08-03 11:52 ` iains at gcc dot gnu.org
2013-09-01 15:39 ` iains at gcc dot gnu.org

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=bug-51784-4-a2JQA3Ffb1@http.gcc.gnu.org/bugzilla/ \
    --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).