From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id s3E/HGPSeGkhHBgAWB0awg (envelope-from ) for ; Tue, 27 Jan 2026 09:57:39 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=lVDnXcrO; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 6319F1E0DD; Tue, 27 Jan 2026 09:57:39 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id AE7041E08D for ; Tue, 27 Jan 2026 09:57:38 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 216F14BA2E05 for ; Tue, 27 Jan 2026 14:57:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 216F14BA2E05 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1769525858; bh=ldP6JIfAvpSblu6bnaOME+Mkqjy+00yyOJPONFoX0xA=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=lVDnXcrOLMF9MNhHRvOJR2gu5LmRY+D5Z4tW5NLzLV56gvoGfHHi2TqtcGCJ/iNwY 3fKcdsy/STU8kCJhGuqurCA9s6D/BU5VHqgK+BXsJ4TJYiRb20HDr8n0GMeEWsjhGZ 2g/GROLW6e48hyhBIlnHP4mThvVzWPj8SE/ymuGg= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 582274BA2E05 for ; Tue, 27 Jan 2026 14:57:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 582274BA2E05 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 582274BA2E05 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769525823; cv=none; b=RSvIvmAwbkjyXauyIO6pJKY5PYsI3mBqWrqLB6jUB+G5rojNgeqM1e7zRKWAAreH5EDKMjlsdkF8r/HwLoCsdQo+w1Dv8pUYDkeYGXL1oI+ogIBJPCSgZHx/u1n8uRUMrKjBNuCAAG4LE2Pv9HwDU9ka10aNs8RzUxN7JgA9pTE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769525823; c=relaxed/simple; bh=6Xs4vaSulUuAR9KSvpT8S+LFCbf9EyL5g2SHdO3wg5Q=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=U7YdKQjn0qF88HpJy3HNfXbqE1eykhPX0r5T0bydut3qLk03iVMz1waAF10syoUYUfQTnzz+prakqfcK3cJR6JMMG8yQvMoAXKdjAfYN3VfDUL5v9I5wJBERDukcxgP8Fq4lt74OjFXBPQq2ATANWqtSJT4P8m3SEdaAwsK+skg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 582274BA2E05 Received: by simark.ca (Postfix) id B053D1E08D; Tue, 27 Jan 2026 09:57:02 -0500 (EST) Message-ID: Date: Tue, 27 Jan 2026 09:57:02 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: gdb support for SME-without-SVE ? To: Peter Maydell Cc: gdb@sourceware.org, Manos Pitsidianakis , luis.machado.foss@gmail.com References: <608ac8b2-7041-4e50-85a6-3504fb1af074@simark.ca> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb Reply-To: Simon Marchi Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" On 2026-01-27 09:47, Peter Maydell wrote: > On Tue, 27 Jan 2026 at 14:21, Simon Marchi 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