public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Chen Gang <xili_gchen_5257@hotmail.com>
To: Mike Stump <mikestump@comcast.net>
Cc: Bernd Schmidt <bschmidt@redhat.com>, Jeff Law <law@redhat.com>,
	 Richard Henderson <rth@redhat.com>,
	"Joseph S. Myers" <joseph@codesourcery.com>,
	 gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] gcc/ira.c: Check !HAVE_FP_INSTEAD_INSNS when frame pointer is needed and as global register
Date: Tue, 13 Oct 2015 14:48:00 -0000	[thread overview]
Message-ID: <BLU437-SMTP937E579C4A787611A6BF66B9300@phx.gbl> (raw)
In-Reply-To: <F94D964C-C840-401A-BD3A-95BFC9C83987@comcast.net>


On 10/13/15 07:02, Mike Stump wrote:
> On Oct 12, 2015, at 3:32 PM, Chen Gang <xili_gchen_5257@hotmail.com> wrote:
>>
>> OK, thanks. If we really need to fix it, which target hook should I use?
>> (or do we need a new target hook?)
> 
> So, the first discussion would be if it is, or is not a bug.  If it isn’t, then there is no fix.  No fix, no target hook.  So far, Bernd said not a bug.
> 

OK, under the bugzilla, the maintainer treated it as expected behavior
(not a bug). For me, we need more explanation for it (why we treat it
as expected behavior).


> So, I’ll note that one _can_ do this with the stack pointer, as a fixed register.
> When the frame pointer is fixed, one cannot do this.
> 

Excuse me, I do not quite understand, could you please provide more
details?

> The code that does this is:
> 
>   /* Diagnose uses of the hard frame pointer when it is used as a global                                                                                                                                                   
>      register.  Often we can get away with letting the user appropriate                                                                                                                                                     
>      the frame pointer, but we should let them know when code generation                                                                                                                                                    
>      makes that impossible.  */
>   if (global_regs[HARD_FRAME_POINTER_REGNUM] && frame_pointer_needed)
>     {
>       tree decl = global_regs_decl[HARD_FRAME_POINTER_REGNUM];
>       error_at (DECL_SOURCE_LOCATION (current_function_decl),
>                 "frame pointer required, but reserved");
>       inform (DECL_SOURCE_LOCATION (decl), "for %qD", decl);
>     }
> 
> to `fix it’, one would simple remove this chunk as misguided and fix up any code gen issues exposed.
> 

If there were not only one issues related with it, for me, what you said
sounds reasonable to me.


Thanks.
-- 
Chen Gang (陈刚)

Open, share, and attitude like air, water, and life which God blessed

  reply	other threads:[~2015-10-13 14:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <561A7D5C.40409@hotmail.com>
2015-10-11 15:16 ` Chen Gang
2015-10-12 10:49   ` Bernd Schmidt
2015-10-12 22:30     ` Chen Gang
2015-10-12 23:03       ` Mike Stump
2015-10-13 14:48         ` Chen Gang [this message]
2015-10-13 14:56           ` Bernd Schmidt
2015-10-13 15:10             ` Chen Gang

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=BLU437-SMTP937E579C4A787611A6BF66B9300@phx.gbl \
    --to=xili_gchen_5257@hotmail.com \
    --cc=bschmidt@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=law@redhat.com \
    --cc=mikestump@comcast.net \
    --cc=rth@redhat.com \
    /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).