Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: Yao Qi <yao@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch 2/2] Implement gdbarch hook user_register_name on ARM
Date: Wed, 22 Dec 2010 17:54:00 -0000	[thread overview]
Message-ID: <1293039320.11190.9.camel@e102346-lin.cambridge.arm.com> (raw)
In-Reply-To: <4D089CD6.5030500@codesourcery.com>


On Wed, 2010-12-15 at 18:47 +0800, Yao Qi wrote:
> On 12/15/2010 06:22 PM, Yao Qi wrote:
> > Once this patch is applied, we leave more flexibility to backend to
> > determine what is the correct register number given a register alias.
> 
> This patch is to implement user_register_name on ARM.  With this, we can
> handle alias "fp" according to the current frame's mode (ARM or Thumb).
> 
> Regression testing is still running on ARM.  Comments are welcome.

I think this is misguided.  Historically, the ARM back-end to gcc
defined an alias of fp for R11, whether in ARM or Thumb mode.  The fact
that the Thumb-1 back-end doesn't use that register as a frame-pointer
is not particularly relevant.

The situation is quite messy, as GCC uses different registers in Thumb-1
and Thumb-2 code for a frame pointer; your code doesn't handle that
case, but seems to assume that all thumb code will use R7 as the frame
pointer.

Overall, I think it's just best if 'fp' is treated like any other
standard register alias on ARM and therefore that it always refers to
R11.  If we really want a register alias that refers to the *current*
frame pointer register, then we need a new name that doesn't conflict
with anything in the current or previous ABIs.  Maybe a
slightly-long-winded name like 'frame'?

R.



  parent reply	other threads:[~2010-12-22 17:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15 10:22 [patch 1/2] New gdbarch hook user_register_name Yao Qi
2010-12-15 10:48 ` [patch 2/2] Implement gdbarch hook user_register_name on ARM Yao Qi
2010-12-21 19:07   ` Ulrich Weigand
2010-12-22 17:44     ` Yao Qi
2010-12-22 18:12       ` Mark Kettenis
2010-12-23  7:19         ` Yao Qi
2010-12-23  1:54       ` Ulrich Weigand
2010-12-23  4:10         ` Yao Qi
2010-12-23 18:37           ` Ulrich Weigand
2010-12-24  5:16             ` Yao Qi
2010-12-28 14:52               ` Ulrich Weigand
2010-12-22 17:54   ` Richard Earnshaw [this message]
2010-12-23  2:05     ` Ulrich Weigand
2010-12-23  3:37       ` Joel Brobecker
2010-12-23 12:08         ` Mark Kettenis

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=1293039320.11190.9.camel@e102346-lin.cambridge.arm.com \
    --to=rearnsha@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.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