Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kyle McMartin <kmcmarti@redhat.com>
To: Marcus Shawcroft <marcus.shawcroft@gmail.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/2] aarch64: extend decode_adrp to decode immediate offset
Date: Tue, 03 Jun 2014 14:50:00 -0000	[thread overview]
Message-ID: <20140603145035.GE15355@redacted.bos.redhat.com> (raw)
In-Reply-To: <CAFqB+PxVhes+w_290C3GTAsairv7eG5f7LR8ZCg9yOwgpqBDqQ@mail.gmail.com>

On Tue, Jun 03, 2014 at 09:22:28AM +0100, Marcus Shawcroft wrote:
> Hi,
> 
> On 3 June 2014 06:01, Kyle McMartin <kmcmarti@redhat.com> wrote:
> 
> > @@ -264,16 +264,28 @@ decode_add_sub_imm (CORE_ADDR addr, uint32_t insn, unsigned *rd, unsigned *rn,
> >     Return 1 if the opcodes matches and is decoded, otherwise 0.  */
> >
> >  static int
> > -decode_adrp (CORE_ADDR addr, uint32_t insn, unsigned *rd)
> > +decode_adrp (CORE_ADDR addr, uint32_t insn, int *page, unsigned *rd,
> > +            int64_t *imm)
> 
> Given that this now decodes both adrp and adr the function name seems
> inappropriate, how about following the convention used in the other
> decode_ functions and changing to something like decode_adrp_adr ()..
> ?
> 

Sure, sounds good.

> Returning both 'page' and 'imm' isn't necessary and I don't think it
> makes sense given that logically both adr and adrp are used to
> construct an address.  Looking at this patch and the following patch I
> think you can achieve the same functionality by having the decodes of
> both adrp and adr return a value in 'imm'.  In the case of an adrp
> decode just returning: imm = page << 12  ....
> 

Hmm, I was trying to avoid doing the actual computation inside it. I'm
happy one way or another though.

--Kyle

> Cheers
> /Marcus


  reply	other threads:[~2014-06-03 14:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03  5:00 [PATCH 0/2] aarch64: skip over stack protector setup in function prologues Kyle McMartin
2014-06-03  5:02 ` [PATCH 1/2] aarch64: extend decode_adrp to decode immediate offset Kyle McMartin
2014-06-03  8:22   ` Marcus Shawcroft
2014-06-03 14:50     ` Kyle McMartin [this message]
2014-06-03  5:03 ` [PATCH 2/2] aarch64: implement walking over the stack protector Kyle McMartin
2014-06-03  5:42   ` Andrew Pinski
2014-06-03 14:51     ` Kyle McMartin
2014-06-05 20:06       ` Kyle McMartin
2014-06-05 20:36         ` Andrew Pinski
2014-06-05 20:53           ` Kyle McMartin

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=20140603145035.GE15355@redacted.bos.redhat.com \
    --to=kmcmarti@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=marcus.shawcroft@gmail.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