public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Feiyang Chen <chris.chenfeiyang@gmail.com>
Cc: Feiyang Chen <chenfeiyang@loongson.cn>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] gdb/gdbserver: LoongArch: Improve implementation of fcc registers
Date: Tue, 9 Aug 2022 22:27:06 +0800	[thread overview]
Message-ID: <7631ce1e-b31b-6e45-151c-bc6aaf438b0e@loongson.cn> (raw)
In-Reply-To: <20220802091656.55802-1-chenfeiyang@loongson.cn>



On 8/2/22 17:16, Feiyang Chen wrote:
> The current implementation of the fcc register is referenced to the
> user_fp_state structure of the kernel uapi [1]. But it is mistakenly
> defined as a 64-bit fputype register, resulting in in a confusing
> output of "info register".
> 
> (gdb) info register
> ...
> fcc            {f = 0x0, d = 0x0}  {f = 0, d = 0}
> ...
> 
> According to "Condition Flag Register" in "LoongArch Reference Manual"
> [2], there are 8 condition flag registers of size 1. Use 8 registers of
> uint8 to make it easier for users to view the fcc register groups.
> 
> (gdb) info register
> ...
> fcc0           0x1                 1
> fcc1           0x0                 0
> fcc2           0x0                 0
> fcc3           0x0                 0
> fcc4           0x0                 0
> fcc5           0x0                 0
> fcc6           0x0                 0
> fcc7           0x0                 0
> ...
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/include/uapi/asm/ptrace.h
> [2] https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#_condition_flag_register
> 
> Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn>
> ---
>   gdb/arch/loongarch.h             |  7 ++--
>   gdb/features/loongarch/fpu.c     |  9 +++++-
>   gdb/features/loongarch/fpu.xml   |  9 +++++-
>   gdb/loongarch-linux-tdep.c       | 55 +++++++++++++++++++++++++++++---
>   gdb/loongarch-tdep.c             |  6 ++--
>   gdbserver/linux-loongarch-low.cc | 24 ++++++++++++++
>   6 files changed, 99 insertions(+), 11 deletions(-)

Thanks for the detailed commit message in this version.
Looks good to me, tested on LoongArch, pushed.

Thanks,
Tiezhu


      reply	other threads:[~2022-08-09 14:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02  9:16 Feiyang Chen
2022-08-09 14:27 ` Tiezhu Yang [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=7631ce1e-b31b-6e45-151c-bc6aaf438b0e@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=chenfeiyang@loongson.cn \
    --cc=chris.chenfeiyang@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /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).