public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Chen Gang <xili_gchen_5257@hotmail.com>
To: Bernd Schmidt <bschmidt@redhat.com>,  Mike Stump <mikestump@comcast.net>
Cc: 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 15:10:00 -0000	[thread overview]
Message-ID: <BLU436-SMTP237194271F36D4F69C08BFAB9300@phx.gbl> (raw)
In-Reply-To: <561D1B80.8050706@redhat.com>


On 10/13/15 22:56, Bernd Schmidt wrote:
> On 10/13/2015 04:50 PM, Chen Gang wrote:
>> 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).
> 
> A global register is under control of the user. If the compiler uses it as a frame pointer, it will get clobbered outside the user's control, which is unexpected behaviour. Therefore, the code Mike quoted detects that case and issues an error, indicating that you must use -fomit-frame-pointer if you expect to use the frame pointer register for other purposes.
> 

OK, thanks.

> If you want an address on the stack there's __builtin_frame_address which may or may not do what was intended. The code quoted in the bugzilla is just invalid.
> 

OK, thank you very much, I shall send related kernel fix patch to kernel
mailing list.

Thanks.
-- 
Chen Gang (陈刚)

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

      reply	other threads:[~2015-10-13 15:10 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
2015-10-13 14:56           ` Bernd Schmidt
2015-10-13 15:10             ` Chen Gang [this message]

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=BLU436-SMTP237194271F36D4F69C08BFAB9300@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).