From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KUV7MHPTBGlLHxUAWB0awg (envelope-from ) for ; Fri, 31 Oct 2025 11:19:15 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=GX1JorSg; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=GX1JorSg; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C18AD1E0BC; Fri, 31 Oct 2025 11:19:15 -0400 (EDT) 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 server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 15E081E04C for ; Fri, 31 Oct 2025 11:19:14 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6AB7E385EC2A for ; Fri, 31 Oct 2025 15:19:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6AB7E385EC2A Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=GX1JorSg; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=GX1JorSg Received: from AM0PR02CU008.outbound.protection.outlook.com (mail-westeuropeazon11013041.outbound.protection.outlook.com [52.101.72.41]) by sourceware.org (Postfix) with ESMTPS id 57AC6385EC4E for ; Fri, 31 Oct 2025 15:17:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 57AC6385EC4E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 57AC6385EC4E Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=52.101.72.41 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1761923865; cv=pass; b=BavYRGdM21QJTFlU5bVCLi1EXH5WUDdKQn/AkbctZzigHNIHFmhdJWnV0XjQJzwV883cwpVCTGmxl6oi7WUlxII1qLHnN+PoA+QLcj/f8bYRedKm2uz405RINWByeYVNr4uxLopR0X1PRm+UpkXZOLpwELjmimxarD0UiySOzzw= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1761923865; c=relaxed/simple; bh=8iATjTX2oMygoE13OreAoanQTNoBfUU9pvPigm94k8Q=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=q+/rmuhluv95rO75S28F+RI2R8y7EeEparEK1UZSusyRqsASEPZjFOUQwgcym4/eFNR7RDfszc0mfTkz9gxstPfHrc1y2oo7LByh2pPSSJtH6pSxvMUAEh6FJ5uGwGUX8Uw8WbvcYTv7lWxdqziv7Ko/JVV30MeeZOMq4VsjQ40= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57AC6385EC4E ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=YUWXjVCR7mOT+scOhci7QRgLTAXVGBiy190EHqEWXOHTySmFfjkfR3BeDXfY622FGVOBWtgDDWFIhMJYpGFhsa0K4pndU8jzzTyjmHP57Czd1fOfEYno47Dnd6XfD2dkMhLl5POD6Q5Y4EryMx8o0uzl9x/TKqtMMsTdbTd6fRs/m2b9a6NzuuU3I1/JgIF26dH0pNp6j+zXg/5wRpljRujxCf72y+IIrYq3x4kqjMu0Rg0S3ffA8YBZvLONwbMcKN+RBUUiPClG5jkzbHQp89wzurk+AsEcYrFLF14SBIPyrAWnELsgo52pZULRwWY3HF8VZsB7c56FXPJPnYnqeg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/vd1EMjaRkarCKqozaBCd5OkzuKJ99Jei2wLeuilllQ=; b=QmoSHOr/1Vkb+QjyoiARQ+4AxNAz7Uup3ryOjhFdVrtEkSh6zW44+byouZZRlufqj0czV/RiL2vCzXdNJnnreVlLjlR9HoH/bqv00gTYoMj03YYtYlcEZOSr6SRDwV/N4oO6nVOszG24dL2JzVEM8YnAnndQ8ETYjkho9UxtfX7lORef6qnMl9Y3etX+kbu0PSjQjGx/7n+KSwFXTPt3zQXI8lvwGA1dEt9Vv90Y4CTQ1Df/62KarMhUdA/8o3He0opG2/57Zt26ti3vgo3r5+RT6LcEL0apTFvIHrZzwaeEuaA2CyMWT9hwVHEaZAdVAOdLIRvXFIrhHd+U/lJn9Q== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/vd1EMjaRkarCKqozaBCd5OkzuKJ99Jei2wLeuilllQ=; b=GX1JorSg33fkYis/E5J2usdusORp3wavlbUhJxy1dkkcKqHHUltTzqb3js9zeVAF95ErflofnasjuQTt+NTdxro75rXcEObKuT9Y0arWqX8WF6qmMWSmSthST290Y1fKC3MO3fLNBDamkQTuCplnFOYSVNejtZhy85lu8mjBz9g= Received: from DUZPR01CA0042.eurprd01.prod.exchangelabs.com (2603:10a6:10:468::9) by DB8PR08MB5337.eurprd08.prod.outlook.com (2603:10a6:10:11e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.15; Fri, 31 Oct 2025 15:17:41 +0000 Received: from DB1PEPF000509EC.eurprd03.prod.outlook.com (2603:10a6:10:468:cafe::ae) by DUZPR01CA0042.outlook.office365.com (2603:10a6:10:468::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9275.15 via Frontend Transport; Fri, 31 Oct 2025 15:18:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by DB1PEPF000509EC.mail.protection.outlook.com (10.167.242.70) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9275.10 via Frontend Transport; Fri, 31 Oct 2025 15:17:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DkYy7AhMFm02wQE29MHfJScfGh2ZPlwJg3gozNY/UI0qdxzkqCN+p+0Ccj2koyTNspPmN3N08L2aGeFpJr/xnbCR/C87VmysO1qu4h1HhaTsnp1EkoEWH3dVpDUSW3ysm4mhGFRErQDrVkxPfyhHArd3nD+X71Xlp5siypampmikvavgPSdzqdZ0KBkhCo12QE0cjKUz1j987Ti4qp7jbCcgDZU2mU2rqyxtzS1XX+IxVMiYP/Rrppmv6m3/JUcFmwiqTcVqZCqsfwlvxtKwoMuiCla5Pyennax55UpSnDJsfGtjA3zlyCxFhdi+23Nqk0je68XXfLl8AW1/1O89hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/vd1EMjaRkarCKqozaBCd5OkzuKJ99Jei2wLeuilllQ=; b=ozm3UX99bNUAHiI9tXWdKlAShb0uT6ZfrcWUKJgQIf9mBUquK8m4VotN93AKG9FI7M8aaiGcv172cks8CoBWcFSOba1L2NpBiOaQClvdSJ1bvCydbS3q+OH1jwncDQoINWFaDhP+Agjczeyni2A/oIUTVECaoWcFAZ8ijoQiReGhN3oWSpksHJJ5CIMCmeLm6hnzulWoiyT7ZUmZTLl820DvJceprR7mRIK3nVCehnYPZzWZbtWF1sP8voBmqPJzlxzRhGSiKdIfeBXoGyGMle0kj11ZLSe9jZlDMN/CmuaagaD1ggWF9dsXjB5M1MCfUtHG73kuT5V2ZOmkqYbQcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 172.205.89.229) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/vd1EMjaRkarCKqozaBCd5OkzuKJ99Jei2wLeuilllQ=; b=GX1JorSg33fkYis/E5J2usdusORp3wavlbUhJxy1dkkcKqHHUltTzqb3js9zeVAF95ErflofnasjuQTt+NTdxro75rXcEObKuT9Y0arWqX8WF6qmMWSmSthST290Y1fKC3MO3fLNBDamkQTuCplnFOYSVNejtZhy85lu8mjBz9g= Received: from DUZPR01CA0207.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::9) by AS8PR08MB6422.eurprd08.prod.outlook.com (2603:10a6:20b:33b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.15; Fri, 31 Oct 2025 15:17:06 +0000 Received: from DB3PEPF0000885C.eurprd02.prod.outlook.com (2603:10a6:10:4b6:cafe::b1) by DUZPR01CA0207.outlook.office365.com (2603:10a6:10:4b6::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9275.15 via Frontend Transport; Fri, 31 Oct 2025 15:17:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 172.205.89.229) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 172.205.89.229 as permitted sender) receiver=protection.outlook.com; client-ip=172.205.89.229; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (172.205.89.229) by DB3PEPF0000885C.mail.protection.outlook.com (10.167.242.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9275.10 via Frontend Transport; Fri, 31 Oct 2025 15:17:06 +0000 Received: from AZ-NEU-EXJ02.Arm.com (10.240.25.139) by AZ-NEU-EX04.Arm.com (10.240.25.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.27; Fri, 31 Oct 2025 15:16:59 +0000 Received: from AZ-NEU-EX04.Arm.com (10.240.25.138) by AZ-NEU-EXJ02.Arm.com (10.240.25.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.27; Fri, 31 Oct 2025 15:16:44 +0000 Received: from D2G2X7XGD1.arm.com (10.57.84.217) by mail.arm.com (10.240.25.138) with Microsoft SMTP Server id 15.2.2562.27 via Frontend Transport; Fri, 31 Oct 2025 15:16:44 +0000 From: To: CC: , Ezra Sitorus Subject: [PATCH v4 1/6] gdb/aarch64: Enable FPMR for AArch64 in gdb on Linux Date: Fri, 31 Oct 2025 15:16:36 +0000 Message-ID: <20251031151641.83369-2-Ezra.Sitorus@arm.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251031151641.83369-1-Ezra.Sitorus@arm.com> References: <20251031151641.83369-1-Ezra.Sitorus@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB3PEPF0000885C:EE_|AS8PR08MB6422:EE_|DB1PEPF000509EC:EE_|DB8PR08MB5337:EE_ X-MS-Office365-Filtering-Correlation-Id: 023d9709-945b-4654-f2e4-08de1890a29e x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|376014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?KfSnGfNzsRaqsFu02+Jc9/aCIc7ED3jediWwY1LEiry7tyVnOL6LpVLJYqW4?= =?us-ascii?Q?FDu3NCoIESQo2EdWeyo6IyhGN/DrBjzJvT1BQS4gzl47IXMAKAuU/G1UFvOd?= =?us-ascii?Q?9SPYuheKpnTgYH3nd8OVHOaL7i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GvTm3gCxMBncxj0ZnhPiEIajh1jKCh/RMpWKEYtknuQyjNXsg3T/QOGrfn?= =?us-ascii?Q?AY6mxywQynkTknCDqfMXpSwaUI4mURRVpcJ45KhD4O/htshzS9VSLA9fZVYw?= =?us-ascii?Q?Aa2ZB0Pnk/eXLild8cYC9ZmzbJYVnqvHEH0EBvy7uGyhC5RogLaK1kAbMgPl?= =?us-ascii?Q?t+wq7zmkTGU3jskwJsJbYX6rgiX6vgcPmluOF8UDJt5zJomv5bisaxH7jD8C?= =?us-ascii?Q?Uk2IMoWWDYnDiVxHNPWH7UCb3mDg5pSlVF/4LcTfGZiuipc+Qghj8AY3a9bC?= =?us-ascii?Q?5hHW9gzBmHKwqZHkkMUv2oUTSIXkZggdCgcnhR53cRVHrchRmlS8SMilRXQL?= =?us-ascii?Q?VxV9PwurjuqEzQkes1ph7Cyu7Fxdj03xV1g2OEqXh/cihKHiR8mGqxHV0//e?= =?us-ascii?Q?hn5qT7YMtbgNtvPx1EnIo03SXrbDDihVltjhvNamAcxDdjo3QsiCN7vukYNr?= =?us-ascii?Q?zH08A9m+IlOEZWIh+gxr4KPDOg27NrNPk6f6/OlyDXOY+CNx2CbGE7iYYgjz?= =?us-ascii?Q?IEK4VpoQmzltEaNt+WA=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(1800799024)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6422 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF000509EC.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ed002ef7-78b8-4b3e-b6d6-08de18908dab X-Microsoft-Antispam: BCL:0; ARA:13230040|14060799003|35042699022|376014|82310400026|36860700013|1800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C0LL9HXhARfgymxzM4Y4+6v9VVel3va+UE0a7QEr8YDzmiQHotui1QK?= =?us-ascii?Q?zfJNPU9exICENyWjmekryBzCZr0ZamtJWfnV81B48EwNeKtF5/A4oJrifmOm?= =?us-ascii?Q?im2iHLMo9E4CSx5bg04RBPcmCIGMdI7dzN1f3qIfefq2LgzxELzr7PjER2sI?= =?us-ascii?Q?dDNdPCETrveM8Lrt+orOoo5o1ERnNVIetLd71clmMITXC0Lvnh2ow4QT9ArR?= =?us-ascii?Q?FWB1ciiC0pcLjG2uxTu4jWAFMRy3a/xiRnAJY6IdBn++vUlaz7NzdXbZ4iK5?= =?us-ascii?Q?OgUOiXy1n8Fhh+xP/DWDsH4Swmy9aAp4dYQGKirYoOFFE56IUNKql9a2NrSA?= =?us-ascii?Q?hEl2E4DQTRX7CSJkwjHiBNsgMgLgFD6/Kr3/OFrh/as4HwL05hPllFA86d65?= =?us-ascii?Q?C0vwzGGt7J67oFy69JyqUaWuEpNIisOk/qS9JcEb+rryNxQOMSuRkyvKOZfp?= =?us-ascii?Q?73yCMJ/FOoJM+VRlQ0fdW5Y0BD5wn2MOqaMR/QnKH8fSF7tHSf3kkVMhsC1F?= =?us-ascii?Q?0qx7U8ode4T2h5RHrrALLi0Qttem2sTmb3jJSlNSdtSe+4rTt/GJ1kbFCQwJ?= =?us-ascii?Q?2FSGqbnmp1PeQDld4zIfTVURcb/J259qImZUFCd4yv4s1uhTvqJoP/Go7RXj?= =?us-ascii?Q?vTvwind6QbE6ZV1WYJB0bW4FAJA6KP9LmnBKNorot7rmGVW9/4HtW3G8A7v1?= =?us-ascii?Q?RZT0gQl/macj2FY3sM4=3D?= X-Forefront-Antispam-Report: CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(14060799003)(35042699022)(376014)(82310400026)(36860700013)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2025 15:17:41.5160 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 023d9709-945b-4654-f2e4-08de1890a29e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129]; Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF000509EC.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5337 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 From: Ezra Sitorus The Floating Point Mode Register controls the behaviours of FP8 instructions. This patch add FPMR to GDB if it is enabled on the target. --- Changes from v1->v2: * Addressed comments/whitespace/formatting issues. * gdb/arch/aarch64.h: operator() takes fpmr into account now. * Defined HWCAP2_FPMR in gdb/arch/aarch64.h Changes from v2->v3: * Formatting fixes. * Moved initialisation of fpmr variables closer to where they are used. Changes from v3->v4: * Formatting in comment. Ezra gdb/aarch64-linux-nat.c | 57 +++++++++++++++++++++++++++++++++++ gdb/aarch64-linux-tdep.c | 1 + gdb/aarch64-tdep.c | 15 +++++++++ gdb/aarch64-tdep.h | 9 ++++++ gdb/arch/aarch64.c | 4 +++ gdb/arch/aarch64.h | 12 +++++++- gdb/features/Makefile | 1 + gdb/features/aarch64-fpmr.c | 44 +++++++++++++++++++++++++++ gdb/features/aarch64-fpmr.xml | 57 +++++++++++++++++++++++++++++++++++ 9 files changed, 199 insertions(+), 1 deletion(-) create mode 100644 gdb/features/aarch64-fpmr.c create mode 100644 gdb/features/aarch64-fpmr.xml diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c index 89ecedda57d..503a41c973d 100644 --- a/gdb/aarch64-linux-nat.c +++ b/gdb/aarch64-linux-nat.c @@ -604,6 +604,48 @@ store_gcsregs_to_thread (regcache *regcache) perror_with_name (_("Unable to store GCS registers")); } +/* Fill GDB's REGCACHE with the FPMR register set content from the + thread associated with REGCACHE. */ + +static void +fetch_fpmr_from_thread (struct regcache *regcache) +{ + aarch64_gdbarch_tdep *tdep + = gdbarch_tdep (regcache->arch ()); + + int tid = regcache->ptid ().lwp (); + + struct iovec iov; + uint64_t val; + iov.iov_base = &val; + iov.iov_len = sizeof (val); + + if (ptrace (PTRACE_GETREGSET, tid, NT_ARM_FPMR, &iov) < 0) + perror_with_name (_("Unable to fetch FPMR register set")); + regcache->raw_supply (tdep->fpmr_regnum, &val); +} + +/* Store the NT_ARM_FPMR register set contents from GDB's REGCACHE to the + thread associated with REGCACHE. */ + +static void +store_fpmr_to_thread (struct regcache *regcache) +{ + aarch64_gdbarch_tdep *tdep + = gdbarch_tdep (regcache->arch ()); + + int tid = regcache->ptid ().lwp (); + + struct iovec iov; + uint64_t val; + iov.iov_base = &val; + iov.iov_len = sizeof (val); + + regcache->raw_collect (tdep->fpmr_regnum, (char *) &val); + if (ptrace (PTRACE_SETREGSET, tid, NT_ARM_FPMR, &iov) < 0) + perror_with_name (_("Unable to store FPMR register set")); +} + /* The AArch64 version of the "fetch_registers" target_ops method. Fetch REGNO from the target and place the result into REGCACHE. */ @@ -642,6 +684,9 @@ aarch64_fetch_registers (struct regcache *regcache, int regno) if (tdep->has_gcs_linux ()) fetch_gcsregs_from_thread (regcache); + + if (tdep->has_fpmr ()) + fetch_fpmr_from_thread (regcache); } /* General purpose register? */ else if (regno < AARCH64_V0_REGNUM) @@ -679,6 +724,9 @@ aarch64_fetch_registers (struct regcache *regcache, int regno) && (regno == tdep->gcs_reg_base || regno == tdep->gcs_linux_reg_base || regno == tdep->gcs_linux_reg_base + 1)) fetch_gcsregs_from_thread (regcache); + /* FPMR? */ + else if (tdep->has_fpmr () && (regno == tdep->fpmr_regnum)) + fetch_fpmr_from_thread (regcache); } /* A version of the "fetch_registers" target_ops method used when running @@ -753,6 +801,9 @@ aarch64_store_registers (struct regcache *regcache, int regno) if (tdep->has_gcs_linux ()) store_gcsregs_to_thread (regcache); + + if (tdep->has_fpmr ()) + store_fpmr_to_thread (regcache); } /* General purpose register? */ else if (regno < AARCH64_V0_REGNUM) @@ -784,6 +835,9 @@ aarch64_store_registers (struct regcache *regcache, int regno) && (regno == tdep->gcs_reg_base || regno == tdep->gcs_linux_reg_base || regno == tdep->gcs_linux_reg_base + 1)) store_gcsregs_to_thread (regcache); + /* FPMR? */ + else if (tdep->has_fpmr () && regno == tdep->fpmr_regnum) + store_fpmr_to_thread (regcache); /* PAuth registers are read-only. */ } @@ -969,6 +1023,9 @@ aarch64_linux_nat_target::read_description () if ((hwcap2 & HWCAP2_SME2) || (hwcap2 & HWCAP2_SME2P1)) features.sme2 = supports_zt_registers (tid); + /* Check for FPMR. */ + features.fpmr = hwcap2 & HWCAP2_FPMR; + return aarch64_read_description (features); } diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index 048be4f3532..10b44d978af 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -1712,6 +1712,7 @@ aarch64_linux_core_read_description (struct gdbarch *gdbarch, features.pauth = hwcap & AARCH64_HWCAP_PACA; features.gcs = features.gcs_linux = hwcap & HWCAP_GCS; features.mte = hwcap2 & HWCAP2_MTE; + features.fpmr = hwcap2 & HWCAP2_FPMR; /* Handle the TLS section. */ asection *tls = bfd_get_section_by_name (abfd, ".reg-aarch-tls"); diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 500ac77d75a..969554ed571 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -4140,6 +4140,10 @@ aarch64_features_from_target_desc (const struct target_desc *tdesc) features.gcs_linux = (tdesc_find_feature (tdesc, "org.gnu.gdb.aarch64.gcs.linux") != nullptr); + /* Check for FPMR feature. */ + features.fpmr = (tdesc_find_feature (tdesc, "org.gnu.gdb.aarch64.fpmr") + != nullptr); + return features; } @@ -4550,6 +4554,16 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) num_pseudo_regs += 32; /* add the Bn scalar register pseudos */ } + int fpmr_regnum = -1; + const struct tdesc_feature *feature_fpmr + = tdesc_find_feature (tdesc, "org.gnu.gdb.aarch64.fpmr"); + if (feature_fpmr != nullptr) + { + fpmr_regnum = num_regs++; + valid_p &= tdesc_numbered_register (feature_fpmr, tdesc_data.get (), + fpmr_regnum, "fpmr"); + } + int first_sme_regnum = -1; int first_sme2_regnum = -1; int first_sme_pseudo_regnum = -1; @@ -4749,6 +4763,7 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->tls_register_count = tls_register_count; tdep->gcs_reg_base = first_gcs_regnum; tdep->gcs_linux_reg_base = first_gcs_linux_regnum; + tdep->fpmr_regnum = fpmr_regnum; /* Set the SME register set details. The pseudo-registers will be adjusted later. */ diff --git a/gdb/aarch64-tdep.h b/gdb/aarch64-tdep.h index 99e7d26ce4a..9acd29b2d88 100644 --- a/gdb/aarch64-tdep.h +++ b/gdb/aarch64-tdep.h @@ -207,6 +207,15 @@ struct aarch64_gdbarch_tdep : gdbarch_tdep_base { return gcs_linux_reg_base != -1; } + + /* First FPMR register. This is -1 if FPMR is not supported. */ + int fpmr_regnum = -1; + + bool + has_fpmr () const + { + return fpmr_regnum != -1; + } }; const target_desc *aarch64_read_description (const aarch64_features &features); diff --git a/gdb/arch/aarch64.c b/gdb/arch/aarch64.c index dff2bc16003..622138f43b5 100644 --- a/gdb/arch/aarch64.c +++ b/gdb/arch/aarch64.c @@ -20,6 +20,7 @@ #include "../features/aarch64-core.c" #include "../features/aarch64-fpu.c" +#include "../features/aarch64-fpmr.c" #include "../features/aarch64-sve.c" #include "../features/aarch64-pauth.c" #include "../features/aarch64-mte.c" @@ -73,6 +74,9 @@ aarch64_create_target_description (const aarch64_features &features) if (features.gcs_linux) regnum = create_feature_aarch64_gcs_linux (tdesc.get (), regnum); + if (features.fpmr) + regnum = create_feature_aarch64_fpmr (tdesc.get (), regnum); + return tdesc.release (); } diff --git a/gdb/arch/aarch64.h b/gdb/arch/aarch64.h index 679d845df74..8f4ba9c9e0c 100644 --- a/gdb/arch/aarch64.h +++ b/gdb/arch/aarch64.h @@ -34,6 +34,7 @@ struct aarch64_features uint64_t vq = 0; bool pauth = false; bool mte = false; + bool fpmr = false; /* A positive TLS value indicates the number of TLS registers available. */ uint8_t tls = 0; @@ -68,7 +69,8 @@ inline bool operator==(const aarch64_features &lhs, const aarch64_features &rhs) && lhs.svq == rhs.svq && lhs.sme2 == rhs.sme2 && lhs.gcs == rhs.gcs - && lhs.gcs_linux == rhs.gcs_linux; + && lhs.gcs_linux == rhs.gcs_linux + && lhs.fpmr == rhs.fpmr; } namespace std @@ -94,6 +96,9 @@ namespace std /* SME2 feature. */ h = h << 1 | features.sme2; + + /* FPMR feature. */ + h = h << 1 | features.fpmr; return h; } }; @@ -238,4 +243,9 @@ 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/gdb/features/Makefile b/gdb/features/Makefile index d17c349b6cf..ed1b8bf119c 100644 --- a/gdb/features/Makefile +++ b/gdb/features/Makefile @@ -201,6 +201,7 @@ $(outdir)/%.dat: %.xml number-regs.xsl sort-regs.xsl gdbserver-regs.xsl # For targets with feature based target descriptions, # the set of xml files we'll generate .c files for GDB from. FEATURE_XMLFILES = aarch64-core.xml \ + aarch64-fpmr.xml \ aarch64-fpu.xml \ aarch64-pauth.xml \ aarch64-mte.xml \ diff --git a/gdb/features/aarch64-fpmr.c b/gdb/features/aarch64-fpmr.c new file mode 100644 index 00000000000..a372b12530b --- /dev/null +++ b/gdb/features/aarch64-fpmr.c @@ -0,0 +1,44 @@ +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: + Original: aarch64-fpmr.xml */ + +#include "gdbsupport/tdesc.h" + +static int +create_feature_aarch64_fpmr (struct target_desc *result, long regnum) +{ + struct tdesc_feature *feature; + + feature = tdesc_create_feature (result, "org.gnu.gdb.aarch64.fpmr"); + tdesc_type_with_fields *type_with_fields; + type_with_fields = tdesc_create_enum (feature, "fp8_fmt", 3); + tdesc_add_enum_value (type_with_fields, 0, "E5M2"); + tdesc_add_enum_value (type_with_fields, 1, "E4M3"); + + type_with_fields = tdesc_create_enum (feature, "osc", 1); + tdesc_add_enum_value (type_with_fields, 0, "Inf/NaN"); + tdesc_add_enum_value (type_with_fields, 1, "MaxNormal"); + + type_with_fields = tdesc_create_enum (feature, "osm", 1); + tdesc_add_enum_value (type_with_fields, 0, "Inf"); + tdesc_add_enum_value (type_with_fields, 1, "MaxNormal"); + + type_with_fields = tdesc_create_flags (feature, "fpmr_flags", 8); + tdesc_type *field_type; + field_type = tdesc_named_type (feature, "fp8_fmt"); + tdesc_add_typed_bitfield (type_with_fields, "F8S1", 0, 2, field_type); + field_type = tdesc_named_type (feature, "fp8_fmt"); + tdesc_add_typed_bitfield (type_with_fields, "F8S2", 3, 5, field_type); + field_type = tdesc_named_type (feature, "fp8_fmt"); + tdesc_add_typed_bitfield (type_with_fields, "F8D", 6, 8, field_type); + field_type = tdesc_named_type (feature, "osm"); + tdesc_add_typed_bitfield (type_with_fields, "OSM", 14, 14, field_type); + field_type = tdesc_named_type (feature, "osc"); + tdesc_add_typed_bitfield (type_with_fields, "OSC", 15, 15, field_type); + tdesc_add_bitfield (type_with_fields, "LSCALE", 16, 22); + field_type = tdesc_named_type (feature, "int8"); + tdesc_add_typed_bitfield (type_with_fields, "NSCALE", 24, 31, field_type); + tdesc_add_bitfield (type_with_fields, "LSCALE2", 32, 37); + + tdesc_create_reg (feature, "fpmr", regnum++, 1, NULL, 64, "fpmr_flags"); + return regnum; +} diff --git a/gdb/features/aarch64-fpmr.xml b/gdb/features/aarch64-fpmr.xml new file mode 100644 index 00000000000..3e888432786 --- /dev/null +++ b/gdb/features/aarch64-fpmr.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.45.2