Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Richard Earnshaw <Richard.Earnshaw@arm.com>
To: Luis <luis.machado.foss@gmail.com>,
	Ezra.Sitorus@arm.com, gdb-patches@sourceware.org
Cc: thiago.bauermann@linaro.org
Subject: Re: [PATCH v2 2/5] gdbserver/aarch64: Enable FPMR for AArch64 in gdbserver on Linux
Date: Mon, 13 Oct 2025 14:40:07 +0100	[thread overview]
Message-ID: <1db3bf19-02e4-40bb-adf7-6355b176e0f2@arm.com> (raw)
In-Reply-To: <5bff9203-f0f8-4661-8aff-7b28d758416b@gmail.com>

On 11/10/2025 12:50, Luis wrote:
> On 07/10/2025 13:31, Ezra.Sitorus@arm.com wrote:
>> From: Ezra Sitorus <ezra.sitorus@arm.com>
>>
>> Support FPMR in gdbserver.
> 
> Nit. Make it "Add support for FPMR register set in gdbserver."
> 
> It is a bit more descriptive.

But grammatically wrong, since FPMR is short for Floating Point Mode 
Register.  So then you'd have:

Add support for the floating point mode register register set in 
gdbserver!!!!

R.

> 
>> ---
>> Changes from v1->v2:
>> * Updated comments
>> * Use HWCAP2_FPMR in aarch64_target::low_arch_setup
>>
>> Ezra
>>
>>   gdbserver/linux-aarch64-low.cc | 29 +++++++++++++++++++++++++++++
>>   1 file changed, 29 insertions(+)
>>
>> diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64- 
>> low.cc
>> index 9d3ac803e7b..73db8f52ed5 100644
>> --- a/gdbserver/linux-aarch64-low.cc
>> +++ b/gdbserver/linux-aarch64-low.cc
>> @@ -248,6 +248,26 @@ aarch64_store_fpregset (struct regcache 
>> *regcache, const void *buf)
>>     supply_register (regcache, AARCH64_FPCR_REGNUM, &regset->fpcr);
>>   }
>> +/* Fill BUF with the FPMR register from the regcache.  */
>> +
>> +static void
>> +aarch64_fill_fpmr_regset (struct regcache *regcache, void *buf)
>> +{
>> +  uint64_t *fpmr = (uint64_t *) buf;
>> +  int fpmr_regnum = find_regno (regcache->tdesc, "fpmr");
>> +  collect_register (regcache, fpmr_regnum, fpmr);
>> +}
>> +
>> +/* Store the FPMR register to regcache.  */
>> +
>> +static void
>> +aarch64_store_fpmr_regset (struct regcache *regcache, const void *buf)
>> +{
>> +  uint64_t *fpmr = (uint64_t *) buf;
>> +  int fpmr_regnum = find_regno (regcache->tdesc, "fpmr");
>> +  supply_register (regcache, fpmr_regnum, fpmr);
>> +}
>> +
>>   /* Store the pauth registers to regcache.  */
>>   static void
>> @@ -879,6 +899,10 @@ static struct regset_info aarch64_regsets[] =
>>     { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_TAGGED_ADDR_CTRL,
>>       0, OPTIONAL_REGS,
>>       aarch64_fill_mteregset, aarch64_store_mteregset },
>> +  /* Floating Point Mode Register (FPMR).  */
>> +  { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_FPMR,
>> +    0, OPTIONAL_REGS,
>> +    aarch64_fill_fpmr_regset, aarch64_store_fpmr_regset },
>>     /* TLS register.  */
>>     { PTRACE_GETREGSET, PTRACE_SETREGSET, NT_ARM_TLS,
>>       0, OPTIONAL_REGS,
>> @@ -954,6 +978,10 @@ aarch64_adjust_register_sets (const struct 
>> aarch64_features &features)
>>         if (features.gcs_linux)
>>           regset->size = sizeof (user_gcs);
>>         break;
>> +    case NT_ARM_FPMR:
>> +      if (features.fpmr)
>> +        regset->size = sizeof (uint64_t);
>> +      break;
>>       default:
>>         gdb_assert_not_reached ("Unknown register set found.");
>>       }
>> @@ -986,6 +1014,7 @@ aarch64_target::low_arch_setup ()
>>         features.mte = linux_get_hwcap2 (pid, 8) & HWCAP2_MTE;
>>         features.tls = aarch64_tls_register_count (tid);
>>         features.gcs = features.gcs_linux = linux_get_hwcap (pid, 8) & 
>> HWCAP_GCS;
>> +      features.fpmr = linux_get_hwcap2 (pid, 8) & HWCAP2_FPMR;
>>         /* Scalable Matrix Extension feature and size check.  */
>>         if (linux_get_hwcap2 (pid, 8) & HWCAP2_SME)
> 
> This one looks OK and should be fine to push once we have the rest of 
> the series OK-ed
> 
> Approved-By: Luis Machado <luis.machado.foss@gmail.com>


  reply	other threads:[~2025-10-13 13:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-07 12:31 [PATCH v2 0/5] gdb/aarch64: Support for FPMR Ezra.Sitorus
2025-10-07 12:31 ` [PATCH v2 1/5] gdb/aarch64: Enable FPMR for AArch64 in gdb on Linux Ezra.Sitorus
2025-10-11 11:35   ` Luis
2025-10-07 12:31 ` [PATCH v2 2/5] gdbserver/aarch64: Enable FPMR for AArch64 in gdbserver " Ezra.Sitorus
2025-10-11 11:50   ` Luis
2025-10-13 13:40     ` Richard Earnshaw [this message]
2025-10-13 14:53       ` Ezra Sitorus
2025-10-16 22:01         ` Luis
2025-10-07 12:31 ` [PATCH v2 3/5] gdb/aarch64: signal frame support for fpmr Ezra.Sitorus
2025-10-11 11:57   ` Luis
2025-10-11 12:15   ` Luis
2025-10-07 12:31 ` [PATCH v2 4/5] gdb/aarch64: core file support for FPMR Ezra.Sitorus
2025-10-11 12:03   ` Luis
2025-10-07 12:31 ` [PATCH v2 5/5] gdb/aarch64: Tests for fpmr Ezra.Sitorus
2025-10-11 12:53   ` Luis
2025-10-11 12:05 ` [PATCH v2 0/5] gdb/aarch64: Support for FPMR Luis

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=1db3bf19-02e4-40bb-adf7-6355b176e0f2@arm.com \
    --to=richard.earnshaw@arm.com \
    --cc=Ezra.Sitorus@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=luis.machado.foss@gmail.com \
    --cc=thiago.bauermann@linaro.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