From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id EQV8D9TjumgDzxYAWB0awg (envelope-from ) for ; Fri, 05 Sep 2025 09:21:24 -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=D/f7gh+c; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=D/f7gh+c; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 36E1F1E087; Fri, 05 Sep 2025 09:21:24 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no 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 BA4DF1E023 for ; Fri, 05 Sep 2025 09:21:22 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 61B673857B84 for ; Fri, 5 Sep 2025 13:21:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61B673857B84 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=D/f7gh+c; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=D/f7gh+c Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazlp170120005.outbound.protection.outlook.com [IPv6:2a01:111:f403:c200::5]) by sourceware.org (Postfix) with ESMTPS id 9E1A33858294 for ; Fri, 5 Sep 2025 13:17:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E1A33858294 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 9E1A33858294 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c200::5 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1757078252; cv=pass; b=lT1Ac+6xs7rC36OPe21R+T0OCQTVvfYtWsYb0GpAysM/ApM88joc3SPvGRr2UzpQXDarYVAshIXcyLh3YxmbPBle/+Q0HJsslCM9KDetum8wwtmctPD76uGckvZQwGtBjxd1rNWLFMlBzj4jOOJy0uwxAAD8+Vmr13gCEEKwWrA= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1757078252; c=relaxed/simple; bh=NOqLwESER0/YZ27YLwytPCVzIaZzaCTrJAhjUmLRpeg=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=DE5gGGmidgLjT5uq+8IdQd6981cHHi8sXiJ7HfFWnaW8Iqy9mI/qW+dh/FbB6x5rhcIEk8XjWM2d92m8oLcy2cUyvSqrXzIb2T1qUtjkphU7nsHOaDLzKxSkCCEbM4eIm17MwLUpOg+HagMflOnh+qlz1PDCgB2CoVIeLcFLKDc= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E1A33858294 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=JTMZkT0mr7N4Ww7KGQCN6abmzSdO5pz958oCW5n36012qPSbaVJnoc+a2puPPRchabi9p0RieYcQAzQPqaHh9oV2bH62FwYfUPkcySb0jcrGkOMV1ERCaMZFnPDI+jPSftUhhJGqDHjeQZkp1FNDpMDTYlGzZ1k4yHcJUTngm0PnOlpydYL5dUl8LQ5hDMFhH0RbtHI/a0rNwx1Zn6M5VczvR1r2k9j7cnBF1/Z6N07DPWhpuLNCQqr1OgFzfp9QexhnJe6djVHDNlvx667sbz0zPWn1uQ2BylJI3L4b0AxGTpkJjKRJEK2JXJdveWDzho0/9Xx8JdbwMQYtGrdSbg== 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=uqf8nntCRlYAdKOD84UWd/UM0m5HsKzVDxJrWTL6Yu4=; b=TNrGdMCmoIuqegZw033qQAPTQ+WBGneBhk+vZV7JyT7cQPihoOqJ2OXKFd+wnluxFvnyORYqCHPOvPU9vYxepxmPhYebfPOv4cV25QE4jxFtZpJ9g246HeHLf5FwvpAXjoof8D1D78LBLyE7f0DoyFOg0mfIaH3EIGCf1+aarHn6AV4MiuirrwmKLVv63HzGuMWmqnfNANZ0bN787gEu/3ScVx5taZVd8JGfCfRLBmotPdziUC0BaNGfNmce9XCQEtGfiBZqM0dfcX6Ffr2KGhxWR+V7d+USLxrVnqMEE9xbqwSf0II9UC7gp2GWaxt2t5/rnlj1WUDeTGddqnk8fw== 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=uqf8nntCRlYAdKOD84UWd/UM0m5HsKzVDxJrWTL6Yu4=; b=D/f7gh+c06oSsfLYxhVyvlcrSqqyXtujYQpjImiiXuoTIHMdJDEJoXw1gWhR39+8sbnrbgzoS+gDyetUE62cVXRuFPGWiEXvDJre79CAfJzdUIey1WyclAavH5Rsm/vCiWB1nYZ1JlnltXwsXj1QNMLEoJtptQXx0od0n0w/2hw= Received: from DU2PR04CA0047.eurprd04.prod.outlook.com (2603:10a6:10:234::22) by DB9PR08MB9636.eurprd08.prod.outlook.com (2603:10a6:10:45c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9094.19; Fri, 5 Sep 2025 13:17:24 +0000 Received: from DB1PEPF0003922F.eurprd03.prod.outlook.com (2603:10a6:10:234:cafe::c0) by DU2PR04CA0047.outlook.office365.com (2603:10a6:10:234::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9094.21 via Frontend Transport; Fri, 5 Sep 2025 13:17:24 +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 DB1PEPF0003922F.mail.protection.outlook.com (10.167.8.102) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9094.14 via Frontend Transport; Fri, 5 Sep 2025 13:17:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gM8+XP1DzDnorb2+OaNa/mSYxiwc9L8wSSp8HcOkBmwvi02MOhh62Sdu9zCMZMpW0gNpqhgh2bTKXgsY9VCT/tA69lB6wOQxB6ItaLTCe7jp/U9zViELi4Ci+FHiQUHeuceZnNDzc1tPE5owPtCrZco3b/kyi6rRjz3Lt6vdtGpD87Ug2Lw06L996yG8S+s2XZHgkKoFXno04JQzio17ipVq2/VYUb6UBS2dsnZSIveZaUp0dciEq4Obif7On3nNoJjWqEpo6e6+s177QN9OaVpVO9ONJmoHMOsFy316YwxP00J5mHojuwml7EkHuJIp9HuXt4UY7+4PdJL/kEbmjw== 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=uqf8nntCRlYAdKOD84UWd/UM0m5HsKzVDxJrWTL6Yu4=; b=FUOi57s0FcrAbApLbU8SyidkItQ4x3ICjNuOpTAq1mO5TLcNZhhMwq8tuUidXVF4ZXe1Vj86KTeY/i/XTJ6sqd7+dEnbS63IcSdTOXq/wYZjGkhOuFS9CFk0SAdCUx3u6jWzHNtmICNZBjLKzgRyFtoG9yuS4YHi7X4QQbznXfzh5U0+XFIspLbNosSkAkgqOoD4YNH2gA4nX1AFS+F1nJ2uphixU9Lj5XpnYIECB7XLupsBATYL2soM3gyMQJlOQO28aYd+sAUNYFz17WUeB4vtkzkbTBMG/h31fD8jQiJWr3anqONhJKlzxHkCBk4T7p95cEHjaEQwG9Ax0T3O7g== 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=uqf8nntCRlYAdKOD84UWd/UM0m5HsKzVDxJrWTL6Yu4=; b=D/f7gh+c06oSsfLYxhVyvlcrSqqyXtujYQpjImiiXuoTIHMdJDEJoXw1gWhR39+8sbnrbgzoS+gDyetUE62cVXRuFPGWiEXvDJre79CAfJzdUIey1WyclAavH5Rsm/vCiWB1nYZ1JlnltXwsXj1QNMLEoJtptQXx0od0n0w/2hw= Received: from DB3PR08CA0025.eurprd08.prod.outlook.com (2603:10a6:8::38) by AS8PR08MB7765.eurprd08.prod.outlook.com (2603:10a6:20b:521::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9094.17; Fri, 5 Sep 2025 13:16:48 +0000 Received: from DB1PEPF000509F5.eurprd02.prod.outlook.com (2603:10a6:8:0:cafe::5c) by DB3PR08CA0025.outlook.office365.com (2603:10a6:8::38) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9094.19 via Frontend Transport; Fri, 5 Sep 2025 13:16:45 +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 DB1PEPF000509F5.mail.protection.outlook.com (10.167.242.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.9094.14 via Frontend Transport; Fri, 5 Sep 2025 13:16:45 +0000 Received: from AZ-NEU-EX04.Arm.com (10.240.25.138) by AZ-NEU-EX06.Arm.com (10.240.25.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 5 Sep 2025 13:16:43 +0000 Received: from AZ-NEU-EX06.Arm.com (10.240.25.134) by AZ-NEU-EX04.Arm.com (10.240.25.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.2562.17; Fri, 5 Sep 2025 13:16:42 +0000 Received: from D2G2X7XGD1.arm.com (10.57.60.116) by mail.arm.com (10.240.25.134) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 5 Sep 2025 13:16:42 +0000 From: To: CC: , Ezra Sitorus Subject: [RFC PATCH 1/5] gdb/aarch64: Enable FPMR for AArch64 in gdb on Linux Date: Fri, 5 Sep 2025 14:17:03 +0100 Message-ID: <20250905131707.77027-2-Ezra.Sitorus@arm.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250905131707.77027-1-Ezra.Sitorus@arm.com> References: <20250905131707.77027-1-Ezra.Sitorus@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB1PEPF000509F5:EE_|AS8PR08MB7765:EE_|DB1PEPF0003922F:EE_|DB9PR08MB9636:EE_ X-MS-Office365-Filtering-Correlation-Id: 311e17db-3c17-43a4-a953-08ddec7e8d83 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?vV5iEsmkDfcM0oDX1hQ0vI++qUWf3BtVnh5RcQV4BJIAd0jiNP1N4uG1Z4DS?= =?us-ascii?Q?TmjixuelwMLKfK4Mlhux9z5JWLPiunjyOKQn5SWyuudR6Eb595iV99a6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8CGG/wUWk8KDe0JuGjAOb57ubHBDU?= =?us-ascii?Q?YF2iDrnOc9jdzKNHvw9qW3v6k5Lm4rbitpJwru3Vqw8X6UKrq2pNy/Ra1k/A?= =?us-ascii?Q?18WRlh/nrVB3g5e3++2YW7aDMLAlpG1LrXkz//PU7x+VxvPpAkA8gnGhHp/J?= =?us-ascii?Q?SmWzeRhx7vEL1IbxTBPwNnUg8ZljN8AGiY7TXYdZ58VHwBDdQHaYJz8TxAym?= =?us-ascii?Q?PPeZDOFEqBPl4YLMMFzr9thaMhMtxmOhoXXuSszJhQabaSOzNLY+bhvpwlPW?= =?us-ascii?Q?7G0MN5D0ZPOzuKaeixG7KbyDPCIQD6//303+jyprpUe9JZafPM8eUCyAe3eM?= =?us-ascii?Q?8LMVoiP6vjuFb7aOFdhUsH8Isc9GOPRUkqgbQdtBb2L7mcdQSMQlpjXDr+Yk?= =?us-ascii?Q?8vbVBMECin8uujcacCWTe7bz8T4jvqI5RauPMZTQSTk3pXxcMYKgVZgtgJzT?= =?us-ascii?Q?CoY30Dqn2jdct/yqBaXMgVGeaoYYJaQmbDvfen4UrRZla5trZ/pIk7aPwXjt?= =?us-ascii?Q?49ZB6MD0jyzyp/+ebZkf5aVMW8+9OW8jSwiK?= 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)(1800799024)(376014)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7765 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF0003922F.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 281baa97-4cc2-4722-69d7-08ddec7e7670 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|82310400026|35042699022|36860700013|14060799003; X-Micros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ni4xFkvHQyvKRGTZnkfwijdyoJBgUv+6ZeZ//k?= =?us-ascii?Q?wfEF7eviCwzEy+ZK47cGtwO1sh1IEfJ8BQ7iL9Ch/b4q4cmp1H15mk+0g+DC?= =?us-ascii?Q?W9TU8tv/neBTB1PFf6VNn/IYjL0A5z194dBmLB0K6poefk6X6titjlZV8C+q?= =?us-ascii?Q?5aEv4o7BCozutYNAqMMJOIvVOgeX/yAEmyov4xx2EL6x3gdI+aTi7O9IM7YP?= =?us-ascii?Q?LxWM/MEVWl2PDSvF67SwyrBIoTpvb1za7ZtUG3oPIWO4uQivYM1N4VbqZMx/?= =?us-ascii?Q?cttIJIE90KLKGyZYuoeleHEuLnbAb5O1kCvjXFKBb+TwfjZSPH1ngUfEzDUC?= =?us-ascii?Q?M53mfKsvDIpd7GU7Zh8kUSgIuAanKwc0HdHl+rLNDQcZ0Sp/eL+pFL1MiRFs?= =?us-ascii?Q?hQOfsBH+oS38UVedShwfZHCV8isrCMdL7JQj94q1dWjKffUwjz6RX8+ZVt5S?= =?us-ascii?Q?z8hmtOA+h6lk/Hii61toTQkuHUMATbXUrkbl1mTc423Ur+iJMZ0pf06Bkkis?= =?us-ascii?Q?X1sZNKy91LaJt48QHD8ahhXLPxgH5359Z5kJbwOGolJifLtbjyuCbZ9RmIM9?= =?us-ascii?Q?B3FrwwzhIlUKpYChb9kVIoMWwfBtPW1DBtR4vETNIM1uNQLccvckUZ8hT1Sk?= =?us-ascii?Q?syEmO2/I6J3gibnF0FWSvy7YyUBf2PmO79Kp?= 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)(1800799024)(376014)(82310400026)(35042699022)(36860700013)(14060799003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2025 13:17:24.0158 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 311e17db-3c17-43a4-a953-08ddec7e8d83 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: DB1PEPF0003922F.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB9636 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. Manually validated with Shrinkwrap (Arm FVP). For this patch: * Are the FPMR fields useful? What to do if the format is not valid (0x2)? What about the OSC/OSM fields with Inf/Nan, are these helpful too? --- gdb/aarch64-linux-nat.c | 58 ++++++++++++++++++++++++++++++++++- gdb/aarch64-linux-tdep.c | 2 +- gdb/aarch64-tdep.c | 18 +++++++++-- gdb/aarch64-tdep.h | 7 +++++ gdb/arch/aarch64.c | 4 +++ gdb/arch/aarch64.h | 4 ++- gdb/features/Makefile | 1 + gdb/features/aarch64-fpmr.c | 44 ++++++++++++++++++++++++++ gdb/features/aarch64-fpmr.xml | 55 +++++++++++++++++++++++++++++++++ 9 files changed, 188 insertions(+), 5 deletions(-) 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..b524aa352be 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 content from the + thread associated with REGCACHE. If there is no active FPMR register state, + make the FPMR register contents zero. */ + +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")); + 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")); +} + /* 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); + /* FP8/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,7 +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 +1022,9 @@ aarch64_linux_nat_target::read_description () if ((hwcap2 & HWCAP2_SME2) || (hwcap2 & HWCAP2_SME2P1)) features.sme2 = supports_zt_registers (tid); + /* Check for FP8/FPMR. */ + features.fpmr = hwcap2 & (1UL << 48); + return aarch64_read_description (features); } diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c index 76bde85188b..acb650db514 100644 --- a/gdb/aarch64-linux-tdep.c +++ b/gdb/aarch64-linux-tdep.c @@ -1713,7 +1713,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 & (1UL << 48); /* Handle the TLS section. */ asection *tls = bfd_get_section_by_name (abfd, ".reg-aarch-tls"); if (tls != nullptr) diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index 500ac77d75a..33bef91c44e 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -4141,6 +4141,10 @@ aarch64_features_from_target_desc (const struct target_desc *tdesc) != nullptr); return features; + + /* Check for FPMR feature. */ + features.fpmr = (tdesc_find_feature (tdesc, "org.gnu.gdb.aarch64.fpmr") + != nullptr); } /* Implement the "cannot_store_register" gdbarch method. */ @@ -4448,11 +4452,12 @@ static struct gdbarch * aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) { const struct tdesc_feature *feature_core, *feature_fpu, *feature_sve; - const struct tdesc_feature *feature_pauth; + const struct tdesc_feature *feature_pauth, *feature_fpmr; bool valid_p = true; int i, num_regs = 0, num_pseudo_regs = 0; int first_pauth_regnum = -1, ra_sign_state_offset = -1; int first_mte_regnum = -1, first_tls_regnum = -1; + int fpmr_regnum = -1; uint64_t vq = aarch64_get_tdesc_vq (info.target_desc); uint64_t svq = aarch64_get_tdesc_svq (info.target_desc); @@ -4550,6 +4555,14 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) num_pseudo_regs += 32; /* add the Bn scalar register pseudos */ } + 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; @@ -4760,7 +4773,8 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Set the SME2 register set details. */ tdep->sme2_zt0_regnum = first_sme2_regnum; - + /* Set the FPMR regnum. */ + tdep->fpmr_regnum = fpmr_regnum; set_gdbarch_push_dummy_call (gdbarch, aarch64_push_dummy_call); set_gdbarch_frame_align (gdbarch, aarch64_frame_align); diff --git a/gdb/aarch64-tdep.h b/gdb/aarch64-tdep.h index 99e7d26ce4a..403743516df 100644 --- a/gdb/aarch64-tdep.h +++ b/gdb/aarch64-tdep.h @@ -207,6 +207,13 @@ struct aarch64_gdbarch_tdep : gdbarch_tdep_base { return gcs_linux_reg_base != -1; } + /* Index of FPMR. This is -1 if FPMR/FP8 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..731d4680248 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 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..1f2f9c0d4cf --- /dev/null +++ b/gdb/features/aarch64-fpmr.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.45.2