Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: Daniel Jacobowitz <dan@codesourcery.com>
Cc: Ulrich Weigand <uweigand@de.ibm.com>, gdb-patches@sourceware.org
Subject: Re: [rfa] Fix software-watchpoint failures by adding epilogue	detection
Date: Wed, 29 Sep 2010 15:24:00 -0000	[thread overview]
Message-ID: <1285753957.22518.82.camel@e102346-lin.cambridge.arm.com> (raw)
In-Reply-To: <20100928163216.GH6886@caradoc.them.org>


On Tue, 2010-09-28 at 12:32 -0400, Daniel Jacobowitz wrote:
> On Tue, Sep 28, 2010 at 06:04:14PM +0200, Ulrich Weigand wrote:
> > I'm wondering how "bx lr" could be an indirect call; for a call,
> > lr would have to point to the return address, so it couldn't also
> > contain the target address ...  Am I missing something here?
> 
> Bah, you are correct.  Poor choice of example.  bx ip is a better
> example; that can be an indirect call, a return, or a tail call.
> 
> > As far as I can see, GCC never uses bx with any other register but
> > lr to implement a return instruction.  Do you know whether this is
> > also true for other compilers?  If so, maybe the easiest fix would
> > be to change this back to only accepting "bx lr".
> 
> Sorry, I don't know :-(  Does GCC also only use lr for an indirect
> tail call?  I can't tell - I couldn't get GCC to issue an indirect
> tail call.  But I did get this out of RealView:
> 

You can never use LR for an indirect tailcall as it must contain the
return address from the outer function (at least, in any ABI compliant
code).  The mcount code does something a bit funky here, but that's a
special case.



  reply	other threads:[~2010-09-29  9:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-22 19:20 Ulrich Weigand
2010-09-22 20:01 ` Daniel Jacobowitz
2010-09-23 16:13   ` Ulrich Weigand
2010-09-24 16:11     ` Ulrich Weigand
2010-09-28 20:23       ` Daniel Jacobowitz
2010-09-28 21:47         ` Ulrich Weigand
2010-09-28 21:49           ` Daniel Jacobowitz
2010-09-29 15:24             ` Richard Earnshaw [this message]
2010-10-07 16:12             ` [rfa, v3] Fix software-watchpoint failures on ARM " Ulrich Weigand
2010-10-08 13:01               ` Richard Earnshaw
2010-10-08 13:27                 ` Ulrich Weigand
2010-09-29 14:43           ` [rfa] Fix software-watchpoint failures " Yao Qi

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=1285753957.22518.82.camel@e102346-lin.cambridge.arm.com \
    --to=rearnsha@arm.com \
    --cc=dan@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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