From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id SX1XBvoElGmOej4AWB0awg (envelope-from ) for ; Tue, 17 Feb 2026 01:04:42 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ZRBmT070; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 15C631E089; Tue, 17 Feb 2026 01:04:42 -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 2F1C71E089 for ; Tue, 17 Feb 2026 01:04:41 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id AEA914BAE7C9 for ; Tue, 17 Feb 2026 06:04:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEA914BAE7C9 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ZRBmT070 Received: from mail-vk1-xa33.google.com (mail-vk1-xa33.google.com [IPv6:2607:f8b0:4864:20::a33]) by sourceware.org (Postfix) with ESMTPS id 386764BAE7D8 for ; Tue, 17 Feb 2026 06:01:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 386764BAE7D8 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 386764BAE7D8 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::a33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771308079; cv=none; b=fxEnCr0c7jWwFgDTZTKYRbjxmnzY8d3WTZl3ED/uxzzf4LQgQKavHVCyMk3G0aJ2G7h1qhNwsRIbTo+c9dKXuLrVllne+PjZXXmLs+bg81z/dvkjMcsmcCy9pyUE/WTKUAnJqnR+F6w2kH+gIqRf3Hz0QR6mQjw9S+9vkICAxP8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771308079; c=relaxed/simple; bh=B0Iy5cnuZHxa6i2G1dsWwJIUSyRuVabmjm3lR1zBkKQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=maijRvDsR1L2sYb2So04xt/dgnh45UfexRQpGzgqbFgtQX/a2q6aZEzVQIWW7SvI1RWjDow1SiqMadRs8P7NxHXTKmnsQ7Wx5ygHLiXlEhy5BuwtYvul3O9KRhI9FDRkDxZQ2LJn9B/SgwZ8ij3Cnt7Y9lOLkMysxML412vf0JQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 386764BAE7D8 Received: by mail-vk1-xa33.google.com with SMTP id 71dfb90a1353d-5662c2937fdso3224525e0c.0 for ; Mon, 16 Feb 2026 22:01:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1771308078; x=1771912878; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tbOdz0Ry0hcEK3TEFc/CNiNyCDnSqRl4d8nAA/o7RCI=; b=ZRBmT0701Qyo9SCuMMJ2RgSXXoDPlbDRVxjfT0UvrtgT6TxqJ0Ek8DwRkKZzit9+/H Y4RVJIos9fEa2TdttGp5Vrg/wAzLSvWMai2YMyE7lcP9K6ddpomu1aGK9KwQ31ICFosM /az2WgmSqlyJwdfVEhoOtGrfaKIA5g7bOYxsqQvFk847zLrXtaWBliEhZhWl1NqyhWQ5 DwPJRkYJ8y+Nh9ZP+Sy9fEgj/wGfZ/UQ2Wkerc4HdyiH4xn88a95endZ2RAES2ng2IyF RE0ZkWbGdGIgoRoF3wWEM57D+LrSI3tJKIoVfUVSWkREt5tSuSFH0N0jIjs9dbyTBuGe Byrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771308078; x=1771912878; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tbOdz0Ry0hcEK3TEFc/CNiNyCDnSqRl4d8nAA/o7RCI=; b=B+LRFZNQf7h+wx/yE1pjJZgtjT6E/fEpDHg4MKPIMkqtG8XsUYciHb5GazSgY09rm7 lL5tqNZCnPAm6rvSA2EyaFfuH+CGdPa1937pL87LGNVierfqrEbeycx1W9ljSGicIu11 KC+rPQf2eGAoI/rXfgWHPCh6XXCmuOYySz2aQB+43GdwBkGnbNArwNnU08pEZNmGKHht or6fULFCKqlxG7IBgEg2qvmkFmhY9RC2uW1Eo3f94KMw2qecPuITRyIayrKQqW318kS9 siCqsaQn43/EZeAMRygevTFRzTFrhQJk6mYT3OefT0qVIbI8gOI708l8B477q9azLHNN Jb6A== X-Gm-Message-State: AOJu0YyrxA/ak5F24RRvDhX8kZaSogAgM8OzGlFruZukRJdfSKOrb5Gs IzL4gIuT0kNpSxoDvTA9AqCrKwptFZYQmgy3tFvovzerfXRDx0rTPRBNOsAUraw9WbWhpQ1Ah3A x7hAn X-Gm-Gg: AZuq6aJsHNYykKmh2xvh8Ji/wczpvVsP0W1Z8HvUUAr/Lk++vQfoocDmQwTNk/3m830 +hWfSyygVhQ7rAEGu2BvGGmrBSA70Pbk8ZA1oO9X6hGnxowySJvoRC2Fq0UnhNHSYPRIbLsuP20 QScsFenL3tevA2iabSlsdn1d1oSMuokBBBnYUskhnpcpOR5nom40bodp4iV0wIZhpSK4HbbxNWF K0+suD3XQbmS1wBRNDDM6jNCjG7I5dH1Lv93cE8bQUr1UVPM93xlsZcCxihuBRLgRGyglyW5sUB hpnvRj45ZwtaKOtVyJYapzjZNSPjQ3bUA2/ArmaTf7ox4JJhIM8M+qMXf90Kzamv6y+fNIkWqaM vJEJIUIP58ZyIkLXCPIfJe2bMQndPu3u9GJ3HCeSrIlsHqXs5bO5Do5wXYCTTThwNJLXPvpZwsl EHKKe73GI4v3bbG6za4I1mz8r1bfyyg9raZQ== X-Received: by 2002:a05:6122:78d:b0:559:14e2:9fc7 with SMTP id 71dfb90a1353d-567b6159c05mr3943833e0c.0.1771308078589; Mon, 16 Feb 2026 22:01:18 -0800 (PST) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5674bfeff10sm8890757e0c.8.2026.02.16.22.01.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Feb 2026 22:01:17 -0800 (PST) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Cc: Chris Packham , Luis , Tom Tromey , Simon Marchi Subject: [PATCH v3 2/4] GDB: Add gdb/arch/aarch64-fpmr-linux.h Date: Tue, 17 Feb 2026 03:01:00 -0300 Message-ID: <20260217060106.1906312-3-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260217060106.1906312-1-thiago.bauermann@linaro.org> References: <20260217060106.1906312-1-thiago.bauermann@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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"