From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4W2qFv+hmWltBwQAWB0awg (envelope-from ) for ; Sat, 21 Feb 2026 07:15:59 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=dL82z4Da; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 570261E0BA; Sat, 21 Feb 2026 07:15:59 -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,FREEMAIL_FROM,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 6A81E1E089 for ; Sat, 21 Feb 2026 07:15:58 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id E73B04B9DB47 for ; Sat, 21 Feb 2026 12:15:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E73B04B9DB47 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=dL82z4Da Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id DA2DC4BA23EF for ; Sat, 21 Feb 2026 12:15:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DA2DC4BA23EF Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DA2DC4BA23EF Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771676132; cv=none; b=OrfrPg2jRO4ckmjc/GhBiJKOFWC5bvMU6dY6aIjdqiG5A1mXvXwgQesYEq918fjztGbvg2GYUW0fY+m3vTgtdTFtoS4fQxaPryCmr71T3kLON2/UL7tiAI16TNY8Im9NZ5XxD/Wy/hK0vMtHscdg59lNe0VrFTy6joU9kTaW8eU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771676132; c=relaxed/simple; bh=bmsz6SaGg9kNTzh2yBmECXJeTWoOhIPPkLhKGOE6b1g=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=bjGfgvCfzfHgxQ20GeqTzerKJxZM2Ycr3cjIhsvccLMtEsbGCr9KEY6Qrwtc04v9/1u1Gtvj84i5jvN2L7oieBo3lHHP0sJAH/riJNdI1ss4Z5UERDskU18wuSHA28PIOz4hL4fCQ0YiPtT+/NpT5HsIXg5A5BX3cx9kFzQdB2Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA2DC4BA23EF Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4806bf39419so28707975e9.1 for ; Sat, 21 Feb 2026 04:15:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771676131; x=1772280931; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=UpgHnjxOnyY8XSbr8aHGmVF0iC2ZWszQZUPe8RrIPsU=; b=dL82z4DaJL1N0KLWGEwsJ3nYAEAuyA8f+XiacqXKa7jnf3wU+bb/4LcOhJqE/ApnCJ qMtT7K4NoIaaVDNuMPYoTwspJeHfzJVuQU4uYy72e+zVkQFloUSxwMKzqkuewoH7yhzO ofOe9U8OB8XGcdADdWnowx2OnI8/555Guan9D8jz78us9k+oeu3mLX+Gv0R6eDqW5Kl+ WCusmtY7Tc+EdIhO6g5SghaxGjwqdmQrOBU/MWwHvETRGJKgn/Le5hOr36JWzvC50bKw oZ8CZc6Skl4610h8oSjvHZQEg5PZ20zSsUOcVreYCu9T9Ktz1yZ6jYowDaQKszQHQxGN /wng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771676131; x=1772280931; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UpgHnjxOnyY8XSbr8aHGmVF0iC2ZWszQZUPe8RrIPsU=; b=Gqq8u12heVDP+tnvwKhyrxA3cO2PmMYljmSwKcvpAKBAQBsh5BLXd1OpTqCjHYPnEO +NP1Oo0rfKyN9TlkDqnCfld8fMjGQNu2u3C/+6Z/ND+PUi1GQ9kfhAHvXj5knszhGft6 4F4RYYqax1nVNPucGokAkp4VILQ3pPJFiMupsScrZko/7Zdmtfo7qCIXgs8H1V6+VFso TDTFdk7baOEn4nOyiSkWYKuu4zWjGVtJN1XaXqDU5OyoYN73Y3X8y09Q7dGCV3rEQXyf adPZWRqsCeRl7QUByaZJXy5i3mFkash7H9MkYkl8JSnlPhXkI1aotSIAJ5Ar6aNdE4S6 V6Pw== X-Forwarded-Encrypted: i=1; AJvYcCX1YT+Ap/wwjAq0Ir72WN9fOCdDTNGnmg6fKZ3iM5ZB9tD14uiYlXCMHRLS7ZnfU4XjkHRdl8aj6+VhZg==@sourceware.org X-Gm-Message-State: AOJu0Yz4A4NuEejranPUeSPO8iXdysw67ghmHhr7LwTvG3LiYKyH1OKq kUXgtoGfaihSM9cCNOElZ+3SaI51TdHVbnv7lnVVeNjClaBVEENhM2QQ X-Gm-Gg: AZuq6aLvbVQ/EhmNlnS7QAwvMrsjzFu0y+E14gAepULhMWGxZPlCRTD360g49p1Khk1 7UZO+0QPvK+GsAk3BBGP0h7yrIt0bs8yQUPx3XMS96GfFf66G777MP0UcPz9ZpctH76xn74+m70 kfRk4wLiF+n3eoEA835TdWaQJDUEhsODdLfiF/4UpPcD8VEUmIZ4Nz1ChH5e335hUsWJsl3pB79 NVOflXbL1N3zq3wp2EZYvdFfrYyc3BY7lJiObwnZvVuXj2LVsql4SCaNK44v+V2IdDLxPxtcKrI xeA3Og1m5Z/Svjm0AEwMGYpP/jbGtXUgNsAGH1nnj/cUAKg01oGbN5reF/IFuHAbaNk5SwaYoaz 7CAtos4Eq5K/QwNniVSV1GCEdmH8iBmOEfSOdX0/Gk1e4ufQ15Uufb5VotqrTVsC/FzKQ4fmjhf jOUe2EdT0b/2xcjsv+GcyfUIctbZ3OGdspPvki X-Received: by 2002:a05:600c:6487:b0:47e:e2b8:66e6 with SMTP id 5b1f17b1804b1-483a94d2fb5mr50947905e9.14.1771676130649; Sat, 21 Feb 2026 04:15:30 -0800 (PST) Received: from [192.168.0.38] ([86.12.216.189]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43970d4c626sm5888042f8f.28.2026.02.21.04.15.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 21 Feb 2026 04:15:29 -0800 (PST) Message-ID: <2d6c1492-de51-4b7f-854d-4f4e65fcd3ad@gmail.com> Date: Sat, 21 Feb 2026 12:15:28 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/4] GDB: Add gdb/arch/aarch64-fpmr-linux.h Content-Language: en-US To: Thiago Jung Bauermann , gdb-patches@sourceware.org Cc: Chris Packham , Tom Tromey , Simon Marchi References: <20260217060106.1906312-1-thiago.bauermann@linaro.org> <20260217060106.1906312-3-thiago.bauermann@linaro.org> From: Luis In-Reply-To: <20260217060106.1906312-3-thiago.bauermann@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 17/02/2026 06:01, Thiago Jung Bauermann wrote: > GDB conditionally defines HWCAP2_FPMR in gdb/arch/aarch64.h, but that's > not the best place for it since it's a Linux-specific definition. > > Add a new Linux- and feature-specific header to contain it. > > Suggested-by: Luis > --- > gdb/Makefile.in | 1 + > gdb/aarch64-linux-nat.c | 1 + > gdb/aarch64-linux-tdep.c | 1 + > gdb/arch/aarch64-fpmr-linux.h | 28 ++++++++++++++++++++++++++++ > gdb/arch/aarch64.h | 5 ----- > gdbserver/linux-aarch64-low.cc | 1 + > 6 files changed, 32 insertions(+), 5 deletions(-) > create mode 100644 gdb/arch/aarch64-fpmr-linux.h > > diff --git a/gdb/Makefile.in b/gdb/Makefile.in > index 8f8a95beccc3..f0f10e3946bf 100644 > --- a/gdb/Makefile.in > +++ b/gdb/Makefile.in > @@ -1301,6 +1301,7 @@ HFILES_NO_SRCDIR = \ > amdgpu-tdep.h \ > annotate.h \ > arch/aarch32.h \ > + arch/aarch64-fpmr-linux.h \ > arch/aarch64-gcs-linux.h \ > arch/aarch64.h \ > arch/aarch64-insn.h \ > diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c > index d310d3e814b2..9f85d96b59ef 100644 > --- a/gdb/aarch64-linux-nat.c > +++ b/gdb/aarch64-linux-nat.c > @@ -51,6 +51,7 @@ > #include "gdb_proc_service.h" > #include "arch-utils.h" > > +#include "arch/aarch64-fpmr-linux.h" > #include "arch/aarch64-gcs-linux.h" > #include "arch/aarch64-mte-linux.h" > #include "arch/aarch64-pauth-linux.h" > diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c > index b5af281d8a40..c17ccbc66220 100644 > --- a/gdb/aarch64-linux-tdep.c > +++ b/gdb/aarch64-linux-tdep.c > @@ -51,6 +51,7 @@ > #include "record-full.h" > #include "linux-record.h" > > +#include "arch/aarch64-fpmr-linux.h" > #include "arch/aarch64-gcs-linux.h" > #include "arch/aarch64-mte.h" > #include "arch/aarch64-mte-linux.h" > diff --git a/gdb/arch/aarch64-fpmr-linux.h b/gdb/arch/aarch64-fpmr-linux.h > new file mode 100644 > index 000000000000..d3040fa263e4 > --- /dev/null > +++ b/gdb/arch/aarch64-fpmr-linux.h > @@ -0,0 +1,28 @@ > +/* Common Linux target-dependent definitions for AArch64 FPMR. > + > + Copyright (C) 2025-2026 Free Software Foundation, Inc. > + > + This file is part of GDB. > + > + This program is free software; you can redistribute it and/or modify > + it under the terms of the GNU General Public License as published by > + the Free Software Foundation; either version 3 of the License, or > + (at your option) any later version. > + > + This program is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + GNU General Public License for more details. > + > + You should have received a copy of the GNU General Public License > + along with this program. If not, see . */ > + > +#ifndef GDB_ARCH_AARCH64_FPMR_LINUX_H > +#define GDB_ARCH_AARCH64_FPMR_LINUX_H > + > +/* Feature check for Floating Point Mode Register. */ > +#ifndef HWCAP2_FPMR > +#define HWCAP2_FPMR (1ULL << 48) > +#endif /* HWCAP2_FPMR */ > + > +#endif /* GDB_ARCH_AARCH64_FPMR_LINUX_H */ > diff --git a/gdb/arch/aarch64.h b/gdb/arch/aarch64.h > index 7856d95a93b1..c9a89ac40986 100644 > --- a/gdb/arch/aarch64.h > +++ b/gdb/arch/aarch64.h > @@ -243,9 +243,4 @@ enum aarch64_regnum > /* Size of the SME2 ZT0 register in bytes. */ > #define AARCH64_SME2_ZT0_SIZE 64 > > -/* Feature check for Floating Point Mode Register. */ > -#ifndef HWCAP2_FPMR > -#define HWCAP2_FPMR (1ULL << 48) > -#endif /* HWCAP2_FPMR */ > - > #endif /* GDB_ARCH_AARCH64_H */ > diff --git a/gdbserver/linux-aarch64-low.cc b/gdbserver/linux-aarch64-low.cc > index 69aaabc1a8f9..6b61f6d5a815 100644 > --- a/gdbserver/linux-aarch64-low.cc > +++ b/gdbserver/linux-aarch64-low.cc > @@ -39,6 +39,7 @@ > > #include "gdb_proc_service.h" > #include "arch/aarch64.h" > +#include "arch/aarch64-fpmr-linux.h" > #include "arch/aarch64-gcs-linux.h" > #include "arch/aarch64-mte-linux.h" > #include "arch/aarch64-scalable-linux.h" Also OK. Thanks. Approved-By: Luis Machado