From: Mark Wielaard <mark@klomp.org>
To: Youling Tang <tangyouling@loongson.cn>
Cc: elfutils-devel@sourceware.org, Mark@sourceware.org,
Wielaard@sourceware.org, Hengqi Chen <hengqi.chen@gmail.com>,
Liwei Ge <geliwei@openanolis.org>
Subject: Re: [PATCH 2/5] backends: Add set_initial_registers_tid callback for LoongArch
Date: Mon, 8 May 2023 21:57:44 +0200 [thread overview]
Message-ID: <20230508195744.GE11475@gnu.wildebeest.org> (raw)
In-Reply-To: <1680836368-5373-3-git-send-email-tangyouling@loongson.cn>
Him
On Fri, Apr 07, 2023 at 10:59:25AM +0800, Youling Tang wrote:
> This patch implements the set_initial_registers_tid hook for LoongArch.
Looks good, but one question:
> + /* Floating-point registers (only 64bits are used). */
> + struct user_fp_struct fregs;
> + iovec.iov_base = &fregs;
> + iovec.iov_len = sizeof (fregs);
> + if (ptrace (PTRACE_GETREGSET, tid, NT_FPREGSET, &iovec) != 0)
> + return false;
> +
> + Dwarf_Word dwarf_fregs[32];
> + for (int r = 0; r < 32; r++)
> + dwarf_fregs[r] = fregs.fpr[r] & 0xFFFFFFFF;
The comment says 64bits, but the mask is for 32bits.
I assume the comment is wrong and the masking is deliberate?
Cheers,
Mark
next prev parent reply other threads:[~2023-05-08 19:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-07 2:59 [PATCH 0/5] Improve LoongArch support Youling Tang
2023-04-07 2:59 ` [PATCH 1/5] backends: Add abi_cfi and register_info callbacks for LoongArch Youling Tang
2023-05-08 19:48 ` Mark Wielaard
2023-04-07 2:59 ` [PATCH 2/5] backends: Add set_initial_registers_tid callback " Youling Tang
2023-05-08 19:57 ` Mark Wielaard [this message]
2023-05-09 1:32 ` Youling Tang
2023-05-09 1:38 ` Youling Tang
2023-05-09 9:57 ` Mark Wielaard
2023-04-07 2:59 ` [PATCH 3/5] backends: Add initial return value location support " Youling Tang
2023-05-08 20:04 ` Mark Wielaard
2023-04-07 2:59 ` [PATCH 4/5] backends: Add frame pointer unwinding " Youling Tang
2023-05-08 20:06 ` Mark Wielaard
2023-04-07 2:59 ` [PATCH 5/5] backends: Add core_note callback " Youling Tang
2023-05-08 20:15 ` Mark Wielaard
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=20230508195744.GE11475@gnu.wildebeest.org \
--to=mark@klomp.org \
--cc=Mark@sourceware.org \
--cc=Wielaard@sourceware.org \
--cc=elfutils-devel@sourceware.org \
--cc=geliwei@openanolis.org \
--cc=hengqi.chen@gmail.com \
--cc=tangyouling@loongson.cn \
/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).