Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: James Bowman <james.bowman@ftdichip.com>
Cc: "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] FT32: support for FT32B processor - part 2/2
Date: Mon, 30 Oct 2017 11:48:00 -0000	[thread overview]
Message-ID: <86y3nsyhyt.fsf@gmail.com> (raw)
In-Reply-To: <2BB0A51F073B384698CACFD1D5A30FCC0DED3E34@glaexch1> (James	Bowman's message of "Mon, 30 Oct 2017 01:57:13 +0000")

James Bowman <james.bowman@ftdichip.com> writes:

Hi James,
gdb change is good to me, sim change still needs review.

> +static ULONGEST
> +ft32_fetch_instruction (CORE_ADDR a, int *isize,
> +		        enum bfd_endian byte_order)

Comments to this function is needed.

> +{
> +  unsigned int sc[2];
> +  ULONGEST inst;
> +
> +  CORE_ADDR a4 = a & ~3;
> +  inst = read_memory_unsigned_integer (a4, 4, byte_order);

Use read_code_unsigned_integer, and you'll get some speed up, especially
in remote debugging.

> +  *isize = ft32_decode_shortcode (a4, inst, sc) ? 2 : 4;
> +  if (*isize == 2)
> +    return sc[1 & (a >> 1)];
> +  else
> +    return inst;
> +}

-- 
Yao (齐尧)


      reply	other threads:[~2017-10-30 11:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-30  1:57 James Bowman
2017-10-30 11:48 ` Yao Qi [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=86y3nsyhyt.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=james.bowman@ftdichip.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