Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb <gdb@sourceware.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: gdb@sourceware.org,
	Manos Pitsidianakis <manos.pitsidianakis@linaro.org>,
	 luis.machado.foss@gmail.com
Subject: Re: gdb support for SME-without-SVE ?
Date: Tue, 27 Jan 2026 09:57:02 -0500	[thread overview]
Message-ID: <e45a75d5-8fd6-463a-a8ac-0e44c33f3e58@simark.ca> (raw)
In-Reply-To: <CAFEAcA_M-X9VG4Txk1cL4o4vX_H5z2=9s07VgLxP9UmWq_KDnA@mail.gmail.com>



On 2026-01-27 09:47, Peter Maydell wrote:
> On Tue, 27 Jan 2026 at 14:21, Simon Marchi <simark@simark.ca> wrote:
>>
>>
>>
>> On 2026-01-27 06:31, Peter Maydell via Gdb wrote:
>>> Hi: is GDB for Arm intended to support configurations where the target
>>> CPU has SME but not SVE?
>>>
>>> We're just implementing support for that in QEMU for using SME
>>> with the hvf hypervisor accelerator on macos systems, but when
>>> we tried connecting gdb to QEMU gdb crashed:
>>>
>>>   (gdb) target remote localhost:1234
>>>   Remote debugging using localhost:1234
>>>   ../../gdb/aarch64-tdep.c:3068: internal-error:
>>> aarch64_pseudo_register_type: bad register number 160
>>>   A problem internal to GDB has been detected,
>>>   further debugging may prove unreliable.
>>>   Fatal signal: Abort trap: 6
>>>
>>> https://lore.kernel.org/qemu-devel/CAAjaMXZLG2aBtStRhyvmdENj1Z+Mx05BmDgyYUoYrc_ZnHwyVQ@mail.gmail.com/
>>>
>>> Is this a known missing feature in GDB, or is it a config that's
>>> supposed to work but we've got the XML register description wrong
>>> somehow?
>>>
>>> It looks from the aarch64-tdep.c code like perhaps GDB assumes
>>> that the Vn vector registers only exist with SVE, but they also
>>> exist in SME-only CPUs.
>>
>> Not an ARM expert, but from what I read, SME builds on top of SVE, so I
>> would guess that having SME implies having SVE.
> 
> No, it does not imply it. SVE plus SME is a very common config,
> but the Apple M4 chip has SME without SVE.

Ok, I see.  Wiki says [1]:

  It is Apple's first SoC to reportedly use the ARMv9 CPU architecture.
  The M4 is based on ARMv9.2a. It supports the Scalable Matrix Extension
  (SME) but not the Scalable Vector Extension (SVE). Because of the lack
  of SVE support, the LLVM compiler officially flags the M4 as
  supporting ARMv8.7a.

And the Phoronix article it references says:

  So seeing the Apple-contributed compiler support for LLVM adding the
  M4 as an "ARMv8.7" based design was coming as a surprise. But in
  digging through the patch there is this code comment that explains the
  situation:

    "Technically apple-m4 is ARMv9.2a, but a quirk of LLVM defines v9.0
    as requiring SVE, which is optional according to the Arm ARM and not
    supported by the core. ARMv8.7a is the next closest choice."

So yeah, I guess that this use case was not expected when the
aarch64-tdep.c code was written.

Simon

[1] https://en.wikipedia.org/wiki/Apple_M4
[2] https://www.phoronix.com/news/Apple-M4-Added-To-LLVM-Clang

  reply	other threads:[~2026-01-27 14:57 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-27 11:31 Peter Maydell via Gdb
2026-01-27 14:21 ` Simon Marchi via Gdb
2026-01-27 14:47   ` Peter Maydell via Gdb
2026-01-27 14:57     ` Simon Marchi via Gdb [this message]
2026-01-27 21:23 ` Peter Maydell via Gdb
2026-01-27 21:28   ` Simon Marchi via Gdb
2026-01-28  1:07   ` Luis via Gdb
2026-01-28  4:23     ` Thiago Jung Bauermann via Gdb
2026-01-28  8:02       ` Luis via Gdb
2026-01-28 16:20       ` Peter Maydell via Gdb
2026-01-29  4:12         ` Thiago Jung Bauermann via Gdb
2026-01-29  9:10           ` Peter Maydell via Gdb
2026-01-29 11:34             ` Peter Maydell via Gdb
2026-01-30  4:28               ` Thiago Jung Bauermann via Gdb
2026-01-30  9:41                 ` Peter Maydell via Gdb
2026-01-30 12:29                 ` Peter Maydell via Gdb
2026-01-30 16:16                   ` Thiago Jung Bauermann via Gdb
2026-01-30 16:29                     ` Peter Maydell via Gdb
2026-01-30 17:06                       ` Thiago Jung Bauermann via Gdb
2026-01-30 17:17                         ` Peter Maydell via Gdb
2026-01-30 18:18                           ` Thiago Jung Bauermann via Gdb
2026-01-30 18:34                             ` Peter Maydell via Gdb
2026-01-30 18:40                               ` Thiago Jung Bauermann via Gdb
2026-01-30 18:59                                 ` Peter Maydell via Gdb
2026-01-30 18:59                                 ` Thiago Jung Bauermann via Gdb
2026-01-30 19:01                                   ` Peter Maydell via Gdb
2026-01-30 19:03                                     ` Thiago Jung Bauermann via Gdb
2026-02-02 11:01                                     ` Peter Maydell via Gdb
2026-02-02 14:06                                       ` Peter Maydell via Gdb
2026-02-02 20:43                                         ` Thiago Jung Bauermann via Gdb
2026-01-30 18:24                           ` Luis via Gdb
2026-01-27 21:29 ` Andrew Pinski via Gdb
2026-01-28  0:42 ` Luis via Gdb

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=e45a75d5-8fd6-463a-a8ac-0e44c33f3e58@simark.ca \
    --to=gdb@sourceware.org \
    --cc=luis.machado.foss@gmail.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=simark@simark.ca \
    /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