From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KX2iIbLTBGlLHxUAWB0awg (envelope-from ) for ; Fri, 31 Oct 2025 11:20:18 -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=Xdbedckc; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Xdbedckc; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 829E31E0BC; Fri, 31 Oct 2025 11:20:18 -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 DB91A1E04C for ; Fri, 31 Oct 2025 11:20:16 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 59470385DC1B for ; Fri, 31 Oct 2025 15:20:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 59470385DC1B 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=Xdbedckc; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=Xdbedckc Received: from PA4PR04CU001.outbound.protection.outlook.com (mail-francecentralazon11013050.outbound.protection.outlook.com [40.107.162.50]) by sourceware.org (Postfix) with ESMTPS id 785D5385DDFC for ; Fri, 31 Oct 2025 15:17:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 785D5385DDFC 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 785D5385DDFC Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.162.50 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1761923848; cv=pass; b=GYwvwzBoES6NCVKPSNQbxJgLffsP2RaJgPQalFHgIyf1+dFjq8aadUxYnaznXNMfJtL+Kk4ec23c/bELuKJrD22P1NOhJAZ8cgcoOriCG9165FCARdwVTiknissfTPVuHxVaCFB/lkFNAdf1Kpfv5wCz8NH02mnNmMG5NOKIonE= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1761923848; c=relaxed/simple; bh=Usxdk8rl/XieWBNV4jcPGEx2sQS/L2t/bUDvgw6DjLk=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=PhtfzEqQ68DZSd5KbEqimly0NQJcbiY0RdnCVlGRvMoBhnfhOAJfoUvSN6IpbbUZKzn/0KTgIuhHezsxTKd1fP89arOnM2HQfC85IyFU5Cy9Ri6c9J/chrJeWROeqIkHFiRWE6ksZvvsEVBniBP0JwvHn8ujTUEoCSqZ03FG2rg= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 785D5385DDFC ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=jgWYYxdnLoKip0WYq8mPLoYg4sKA6unY8ezuNHpr6d0quNAOqbDetIfA5mh+VJ5dKJqjdJ+50zPHdCAMq2p8D4h8CEeHO8I6LSSXb2txrgCzNkzT6Irj32vnoaBqr+Tb3qTH9Ou6fRbACyg+lL62Pbm2V2+fgGtumI8Zfdk8J8eYd70wnvs50lfLuc1xmPMjYlLgpqTRbc8vPjJitsc7Svm+Dil1pCIA9c3K4L/atwIVNKf5kP2hJMRNoljhba6lOyEuc/FE0HWCkKd398Sd3leDbjL8zoXZn/V7cPFfyuadp7Yw4uc9Nn3T9Nio8r9bfa/RzrkAQF9d3olHqJkNzQ== 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=knUK9k23CHsYrmIlNLtXf9Msu1JYjw2Yt6DG8izH5CE=; b=oAMrvP/Sum3DnOtTw9NZDCYV1ATtCNMvUPzzLlSvOWc9EEbpUtGtGhRlxlruiHmn9XDjR9iEqnHeYb+KCePDUKy5Zkazu8iy2eg/6GoDa+vuvVzvD3ljD62dxugCIiCMXa9dLDRR+QRR732hQslm3CTos7C9x8AETCGWazaAHa9Hh97OPD7+4cOsuTTcKsPTl2iCeYlE8h0fq20PTdu6nfYj7Z72Jbfe9VyuywiND3EOeKbAlQZFfONv/geB9QujXlz3+zYUl6rXQa2/afEC+stRQA1QMhR9DJjhEEvgpqOZOwo6LsrOC77uAiI1RVILqyAmHT6+wBeHVUU/CYsQKw== 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=knUK9k23CHsYrmIlNLtXf9Msu1JYjw2Yt6DG8izH5CE=; b=Xdbedckcwyo/GqA7Ab52xjM24enQua6Aeqwd0RbfhL4Pi7G6qHYgj+/a7KfrpqOZRFLZsTkefGOkyEp9OcFdRujKwPbp+kObja618F1Rsg0v4qME+Uk5wBqsNw0qRgOmUKLlYPlJLv2nLG+q51cGJaVxDNxKRGCm58Je5v5ShXQ= Received: from AM9P192CA0007.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:21d::12) by VE1PR08MB5805.eurprd08.prod.outlook.com (2603:10a6:800:1aa::18) 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:25 +0000 Received: from AM3PEPF0000A794.eurprd04.prod.outlook.com (2603:10a6:20b:21d:cafe::a2) by AM9P192CA0007.outlook.office365.com (2603:10a6:20b:21d::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9253.19 via Frontend Transport; Fri, 31 Oct 2025 15:17:25 +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 AM3PEPF0000A794.mail.protection.outlook.com (10.167.16.123) 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:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FpO675urE9m1+psN+lN4et9H36sq/YN3byjZX/dyjsSBZoD97dy078noDDZkAg7zxyP+OGbLN+h5h08pYVQr5+8bfDzjBWzdmtB6XFa9PDdKg8MyswEJrkZ3WsNDAfEz5vt6MD6ndlu2v4yDQD48DYgBy/+/0PZZDkY/TjUAus9Rmid4V7b7LZPZjQepW+lYiYLzooRxgIBbp6vvkphDMwGFSmwlg6/3F23q8r8RgGvUfKuyCRcwrsbMr70XYK8Au2mlb6uSZtlUhciDORywbBIVS52TCCZaojmidXPDVMtQd37OJ+rhNKif+QIS2g73ZlP57lYpH5eoR3Q0Aod7vw== 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=knUK9k23CHsYrmIlNLtXf9Msu1JYjw2Yt6DG8izH5CE=; b=hjErfgxVZXnDfqO+GsGbj2KvovnhO7PQdFfKgih7dLAFncOErom+RyoT+KxHHcj3S7ENDT8jNPTizqXvSmZkJ79ExvOjYboZgB7xbxeiBptwm+USphOYxe2Cs6DfmFlqQSQ3Wjl0BopgJ5X1H0kJ6WwVvYsv5imoztxulABVzCweoz4mQI6eQI4PLx6YVgkOOYN5ykeHDxUj4V33DPm3/Di+Y58fUbClX3wvICje1Ah0btBXlAufga6cU4deFmT/szU47MX8i5MG2ElyCrAcvB8G+u+f1Jgbv3DvQaPfL0prCOfBjBT2+EiNclBOEt6YqJ/TM9kbl2PBadr9O0fI+g== 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=knUK9k23CHsYrmIlNLtXf9Msu1JYjw2Yt6DG8izH5CE=; b=Xdbedckcwyo/GqA7Ab52xjM24enQua6Aeqwd0RbfhL4Pi7G6qHYgj+/a7KfrpqOZRFLZsTkefGOkyEp9OcFdRujKwPbp+kObja618F1Rsg0v4qME+Uk5wBqsNw0qRgOmUKLlYPlJLv2nLG+q51cGJaVxDNxKRGCm58Je5v5ShXQ= Received: from AM9P250CA0023.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:21c::28) by AM9PR08MB6163.eurprd08.prod.outlook.com (2603:10a6:20b:2de::5) 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:16:52 +0000 Received: from AM3PEPF00009BA1.eurprd04.prod.outlook.com (2603:10a6:20b:21c:cafe::f8) by AM9P250CA0023.outlook.office365.com (2603:10a6:20b:21c::28) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9253.18 via Frontend Transport; Fri, 31 Oct 2025 15:16:52 +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 AM3PEPF00009BA1.mail.protection.outlook.com (10.167.16.26) 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:16:52 +0000 Received: from AZ-NEU-EX04.Arm.com (10.240.25.138) by AZ-NEU-EX03.Arm.com (10.240.25.137) 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:47 +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:47 +0000 From: To: CC: , Ezra Sitorus Subject: [PATCH v4 5/6] gdb/aarch64: Tests for fpmr Date: Fri, 31 Oct 2025 15:16:40 +0000 Message-ID: <20251031151641.83369-6-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: AM3PEPF00009BA1:EE_|AM9PR08MB6163:EE_|AM3PEPF0000A794:EE_|VE1PR08MB5805:EE_ X-MS-Office365-Filtering-Correlation-Id: db3425f7-a400-479b-bd73-08de18909848 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|82310400026|1800799024|36860700013|13003099007; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?o+9GpKBRXeAohstSH8dBzBxfsf46ptk3XSItd3DzhdYH8h8KpSbSqusDvEYe?= =?us-ascii?Q?N3T0sNZVrYzKKMKZbhtZwDIchqDn06XHyOtV6n5+0G+2QZ8eqjO/SpH+vrZp?= =?us-ascii?Q?XnzJ/x/GvDOp6jt7c28IyeBUeECXeao790ogM07Z5FgqVK2QhefrLw7AoHVo?= =?us-ascii?Q?+qQedIX9CbeWcuWyCphcXUDd7jhT7iWyRX5LnQwydZAU5mov2LR8jPxv7D6W?= =?us-ascii?Q?3IB65mpAg8BP04J5+bhaQZlGeAVNKupjJ0osd259BlKki7M7Jn387Y7YqnuY?= =?us-ascii?Q?lo4C2Jz/LXJoxwy7at6M+gncgvl4b7UTQtWdaH2hPCuokPDQ7JaTeQQAPS+v?= =?us-ascii?Q?BcKAsFl/+okWQKgIZerV1uXXyMMO2UA0h+dKfXQ9YF8h1U5wLPAIgX+UY+QG?= =?us-ascii?Q?2r94pCPYynC0EphDPqXJM2ADYKutjU5yHAo4Wg9vNRSfrMgQb7z4eY4RSD/B?= =?us-ascii?Q?5APDvv77vIgVF7jL3Vo9a0HwOFIyx3YejKwYjMYItM3EyluP1X2IdaOYeIm7?= =?us-ascii?Q?66LNYbtruIz6EXvpqQE6XseFFn8RVpz0UgO1vKqIuW7SoUomaQjRnglX5SHY?= =?us-ascii?Q?OewDvRVvyVPjgP3SkNUr5CAah3JqSah/Lz4/AyQ4AROn7ie5QrX1Y0mJhu3M?= =?us-ascii?Q?GltJP5RE9ULXcuy/qmOHP8LfXN1g+xYF11RNpITzXdJ/DM8VsSo/0j0n5nYr?= =?us-ascii?Q?3APY3GzvTkKZ6JOBP5cM7kZqjsscTP0T5EdGDxl1ddvw1dVorYrI0gdqPkKd?= =?us-ascii?Q?1FiFR6+oo/P/JbxkNGtfcLr/h+ly6gbuzqMCN6Tl3k8AiWt8r86A+cBiba8k?= =?us-ascii?Q?I0TKucsfbgX7z+f84xr/QbvUPBdvchk9pWylcPtiufuboCHBp87I6JlSW7tJ?= =?us-ascii?Q?RH39/5exZU2M6W4sUxnSUBuus66qz1JOLuL48/RIozg6qQ/+aukXcYW+M77N?= =?us-ascii?Q?rdVRmDkUX+RSXQCT1pBVk0vhlAptec+5y9jdw0n67ycMT/cy9fHweWx7Oo7H?= =?us-ascii?Q?IXvTbBuLtkigjWLyGVjmTY39BD9APKYoW1CDhISn5QGQW7jUWqZF82VtA/jc?= =?us-ascii?Q?fplV4wUKDfI6Qfm8yczrYvF8rMFk5ASkyW55M9tkVCAZmIG+lzmuwxfS5oxc?= =?us-ascii?Q?8n9KljTQYiMBze789Xp2eoPNWgMt5VJn1nImLwaxdWtE+EWLE3w+2CXv26qG?= =?us-ascii?Q?foTMJMq34yl8rbhKXnqFY79A60Ni8OO99+B/gIbTghL+38lxjBCKDsVtVLBN?= =?us-ascii?Q?9xrCKN+6bs2Bc2FXBlB5Hl/uhv5HZfT9uW/b9kqhNvSDVSxzuBYv3edxc7sQ?= =?us-ascii?Q?SleMBq5lY0zapOJo3gIAPzRSS4/WwzJdhjzFZdcj6aXkeq5P0M7Z1X/mzkYY?= =?us-ascii?Q?5VZ5iDBvCSs80A6XPmgTXyivpCx3VgeyHTRAXeKXGKDejWjyvKAYigaXaNRN?= =?us-ascii?Q?Y2JQPh1elxP+pSzQvWzZKX271aZh8n1i3sH4KAgK5vRFgQN8XMIiuN4CJkQ3?= =?us-ascii?Q?9HppBXr2MEMK9hzUZC9K2FHjNnD3Tf/5OxkebM3vEmtk+k1NNMHSky3lIzFq?= =?us-ascii?Q?2MuOoWMnEoxLmGH7Z+k=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)(82310400026)(1800799024)(36860700013)(13003099007); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6163 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF0000A794.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3f8663ff-a1e0-4390-9c5d-08de18908545 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|35042699022|36860700013|376014|14060799003|1800799024|13003099007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?AwA5ru1cwBUdOlWCWU5PBQlK9ZLPhak2Td/fa/leTiZNFnYftiEk4hV8bhub?= =?us-ascii?Q?aXNhslfd+OAKKZGEuhTIR2Jz6g6Mkg2VFn3hdtwUaLWhSlcV33/f44BoRD2b?= =?us-ascii?Q?n6d/OF1TdQxzCgkLWUGdSjvgReG7YfibiP/yIezG04U+LPnnaqo+XslMl4FG?= =?us-ascii?Q?lnfx7j/X/m4AjgcL/ozC/nLofz8NLXC1tGW1ak0UigS2Qxf+eGaPW12llTZc?= =?us-ascii?Q?VLZ7yjcmJVBlF+k7M7ahvv7um8m9E7XlSEb5xCokaan/+6F0zNbkw3h2feSi?= =?us-ascii?Q?EwimoNTeuQfwCJSQ3JYQCGLzwm4JQLtY3HTyF5m85UqXrYi0YEs4/xKIa/8e?= =?us-ascii?Q?hIjRNTUomeOZLAlz3arzeqHDW/LEeWw3sNImHzbyQVWFImTKssk2e6j0ZhPb?= =?us-ascii?Q?R5kvNctDwVUYsQK61JAJjiLNuGrt3Ca9CWXnUPc1Hjs9itzlvQkVXDxqaZQl?= =?us-ascii?Q?k2akHliy59yBmADM6T7e+P0olEzSke0MyvYYWgywy0JSDwT0qplTDPf2LMf0?= =?us-ascii?Q?w39seO0kP3Vj0tHVSDst7msbKxgG70MOEzCmmA3GPvFNN9PtLQVeKm8qnMHe?= =?us-ascii?Q?6++pZAD7MByxBs8tNZzy184vg8gYZxcv0Bq+6Ow1blm6uCjoDfvN1gc842IU?= =?us-ascii?Q?VSAcleqbCbV0ptsRIFdVuca8uM4xh0dZ7lhfvc3qFxnKBXf01uz6CCzEo0zl?= =?us-ascii?Q?iAYHpVigbM4wRuj6uZhrw4pdsDIaYgXsyKSo8INH8N2NeBDQ6az8sD0zlmXq?= =?us-ascii?Q?GpTZ5G/P1Lyofr8nwIyu7BEk8zAQgQQaKqkpQjHa+nqQYOCer4KEQQIXZ9/u?= =?us-ascii?Q?eno4GguAG901/TIdhHQcAg1GPYV/d35Cra3nwPjmw3uiPGMW3UG2+mB7t1qb?= =?us-ascii?Q?5CENm28fjfuX0VOiV6sDKQJfL+NVHglaP58xYvjf/M79xtr7PdC/3R7rq/68?= =?us-ascii?Q?CetxQ2C+JVd13fBrP6JS762yiTAX0FJFvgIHOHEOehEwd2DCK9kwWreHPyt5?= =?us-ascii?Q?vkDsKhAu4b5qfqktxa1RtasW6OYcVrchFw6+znEjsYqQjmUGiDPYsGwHAziL?= =?us-ascii?Q?Gc5JPk9kaS1Stvx8FFUzD2jS1vcgPnIU+LVwDWdXkw6No/aHROhA5pwyi9GA?= =?us-ascii?Q?VTo+EDQgRmzXIWkXxy6L68rWRoF4/K8b9CQ6vB6OQ86e9JZ8gdv3VLWredc5?= =?us-ascii?Q?5ngDezYpwumFYk1zSq6F6Z5bNVfpb0nA4K8lyyyfs2qdRz28t/8aaP8fycRu?= =?us-ascii?Q?W2Jmc9b8T30EilyWQmb8OmRMZMqijwcjpXNLHmgu+CabmeYoxtIPaShqzMgx?= =?us-ascii?Q?UevjnRmZ/5i4Iv1/rCzih4NHNLqb8xIDvRhnMVyNzCzvNhenJsLrva/MLWCs?= =?us-ascii?Q?ZbP7aVbpXAPdAoBKz5c3B8cQQFAsqhhb4RvzcRqYSBj7I8TzsTbggqGnaXyO?= =?us-ascii?Q?yObAVsxxBHX3U5Luv5tdDIe2PcYIunYNraVmn0/IG1uvwsV8hLRIrdCOV++g?= =?us-ascii?Q?UE3ywxq7SF/5GlJe9K9ShxosFggU7Jqv2RERYMoCAp/gUXiduRN+w4l0fNWU?= =?us-ascii?Q?FfXSeV/Zh+Ogk3QYpVc=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)(82310400026)(35042699022)(36860700013)(376014)(14060799003)(1800799024)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2025 15:17:24.2016 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: db3425f7-a400-479b-bd73-08de18909848 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: AM3PEPF0000A794.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5805 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 Add tests for FPMR support in gdb/gdbserver. These tests check availability of FPMR, reading/writing to FPMR, core file generation and preservation under sighandler frame unwinding. A run of the full gdb testsuite has been done on aarch64-none-linux-gnu without FPMR support. The gdb.arch tests were run on Shrinkwrap with FPMR support. --- Changes from v1->v2: * Removed fpmr modification functions to make the tests easier to follow. * Test writing to fpmr in aarch64-fpmr.exp from outside the inferior program. * Rewrite allow_aarch64_fpmr_tests to follow allow_aarch64_sve_tests. Changes from v2->v3: * tclint: only messages now is for line length for aarch64-fpmr.exp. I think this is ok as it makes the test string readable. * Addressed comments/whitespace/formatting issues. * gdb.exp:allow_aarch64_fpmr_tests reads FPMR in both cases. Changes from v3->v4: * Formatting and comments * I've tried to fix indentation issues. There's some differences in the AArch64 tests, and they also don't quite matchup with tclformat which I used in the previous patch. I've hopefully addressed them this time! Ezra gdb/testsuite/gdb.arch/aarch64-fpmr-core.c | 40 ++++++ gdb/testsuite/gdb.arch/aarch64-fpmr-core.exp | 97 ++++++++++++++ .../gdb.arch/aarch64-fpmr-sighandler.c | 55 ++++++++ .../gdb.arch/aarch64-fpmr-sighandler.exp | 74 +++++++++++ gdb/testsuite/gdb.arch/aarch64-fpmr.c | 118 ++++++++++++++++++ gdb/testsuite/gdb.arch/aarch64-fpmr.exp | 99 +++++++++++++++ gdb/testsuite/lib/gdb.exp | 66 ++++++++++ 7 files changed, 549 insertions(+) create mode 100644 gdb/testsuite/gdb.arch/aarch64-fpmr-core.c create mode 100644 gdb/testsuite/gdb.arch/aarch64-fpmr-core.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-fpmr-sighandler.c create mode 100644 gdb/testsuite/gdb.arch/aarch64-fpmr-sighandler.exp create mode 100644 gdb/testsuite/gdb.arch/aarch64-fpmr.c create mode 100644 gdb/testsuite/gdb.arch/aarch64-fpmr.exp diff --git a/gdb/testsuite/gdb.arch/aarch64-fpmr-core.c b/gdb/testsuite/gdb.arch/aarch64-fpmr-core.c new file mode 100644 index 00000000000..045f36b5351 --- /dev/null +++ b/gdb/testsuite/gdb.arch/aarch64-fpmr-core.c @@ -0,0 +1,40 @@ +/* This file is part of GDB, the GNU debugger. + + Copyright 2008-2025 Free Software Foundation, Inc. + + 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 . */ + +#include + +uint64_t crash_address = 0; + +void +set_fpmr (uint64_t value) +{ + register uint64_t x0_val asm ("x0") = value; + /* msr fpmr, x0 */ + __asm__ volatile (".inst 0xd51b4440" : : ); +} + +int +main (void) +{ + set_fpmr (0x3fff7fc049); + + /* Check FPMR. */ + + *((uint64_t *) crash_address) = 0xDEAD; /* crash point */ + + return 1; +} diff --git a/gdb/testsuite/gdb.arch/aarch64-fpmr-core.exp b/gdb/testsuite/gdb.arch/aarch64-fpmr-core.exp new file mode 100644 index 00000000000..5ab2072c30f --- /dev/null +++ b/gdb/testsuite/gdb.arch/aarch64-fpmr-core.exp @@ -0,0 +1,97 @@ +# Copyright (C) 2018-2025 Free Software Foundation, Inc. +# +# 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 . + +# This file is part of the gdb testsuite. + +# Test generating and reading a core file with FPMR. + +proc check_fpmr_core_file {core_filename} { + # Load the core file. + if { + [gdb_test "core $core_filename" \ + [multi_line \ + "Core was generated by .*" \ + "Program terminated with signal SIGSEGV, Segmentation fault\\." \ + "#0 ${::hex} in main \\(.*\\) at .*" \ + ".* \\*\\(\\(uint64_t \\*\\) crash_address\\) = 0xDEAD.*"] \ + "load core file"] + } { + untested "failed to generate core file" + return -1 + } + + # Check the value of FPMR in the core file. + gdb_test "print/x \$fpmr" " = 0x3fff7fc049" \ + "fpmr contents from core file" +} + +require is_aarch64_target +require allow_aarch64_fpmr_tests + +standard_testfile +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} { + return -1 +} + +set binfile [standard_output_file ${testfile}] + +if {![runto_main]} { + return -1 +} + +set crash_breakpoint "crash point" +gdb_breakpoint [gdb_get_line_number $crash_breakpoint] +gdb_continue_to_breakpoint $crash_breakpoint + +gdb_test "print/x \$fpmr" " = 0x3fff7fc049" "fpmr contents from core file" + +gdb_test "continue" \ + [multi_line \ + "Program received signal SIGSEGV, Segmentation fault\\." \ + "${::hex} in main \\(\\).* at .*" \ + ".* \\*\\(\\(uint64_t \\*\\) crash_address\\) = 0xDEAD.*"] \ + "run to crash" + +# Generate the gcore core file. +set gcore_filename [standard_output_file "${testfile}.gcore"] +set gcore_generated [gdb_gcore_cmd "$gcore_filename" "generate gcore file"] + +# Generate a native core file. +set core_filename [core_find ${binfile}] +set core_generated [expr {$core_filename != ""}] + +# At this point we have a couple core files, the gcore one generated by GDB +# and the native one generated by the Linux Kernel. Make sure GDB can read +# both correctly. + +if {$gcore_generated} { + clean_restart + gdb_load ${binfile} + with_test_prefix "gcore corefile" { + check_fpmr_core_file $gcore_filename + } +} else { + fail "gcore corefile not generated" +} + +if {$core_generated} { + clean_restart + gdb_load ${binfile} + with_test_prefix "native corefile" { + check_fpmr_core_file $core_filename + } +} else { + untested "native corefile not generated" +} diff --git a/gdb/testsuite/gdb.arch/aarch64-fpmr-sighandler.c b/gdb/testsuite/gdb.arch/aarch64-fpmr-sighandler.c new file mode 100644 index 00000000000..a561e7654a3 --- /dev/null +++ b/gdb/testsuite/gdb.arch/aarch64-fpmr-sighandler.c @@ -0,0 +1,55 @@ +/* This file is part of GDB, the GNU debugger. + + Copyright 2008-2025 Free Software Foundation, Inc. + + 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 . */ + +#include +#include +#include +#include + +void +set_fpmr (uint64_t value) +{ + register uint64_t x0_val asm ("x0") = value; + /* msr fpmr, x0 */ + __asm__ volatile (".inst 0xd51b4440" : : ); +} + +void +handler (int sig) +{ + set_fpmr (0xff008041); + exit (0); +} + +int +main () +{ + /* Ensure no signals are blocked. */ + sigset_t newset; + sigemptyset (&newset); + sigprocmask (SIG_SETMASK, &newset, NULL); + + signal (SIGILL, handler); + + set_fpmr (0x3fff7fc049); + + /* 0x06000000 : Causes an illegal instruction. Value undefined as per ARM + Architecture Reference Manual ARMv8, Section C4.1. */ + __asm __volatile (".inst 0x06000000"); + + return 0; +} diff --git a/gdb/testsuite/gdb.arch/aarch64-fpmr-sighandler.exp b/gdb/testsuite/gdb.arch/aarch64-fpmr-sighandler.exp new file mode 100644 index 00000000000..ca8f29ec9e4 --- /dev/null +++ b/gdb/testsuite/gdb.arch/aarch64-fpmr-sighandler.exp @@ -0,0 +1,74 @@ +# Copyright 2018-2025 Free Software Foundation, Inc. +# +# 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 . +# +# This file is part of the gdb testsuite. +# +# Test FPMR register set is properly preserved when unwinding sighandler frames. + +require is_aarch64_target +require allow_aarch64_fpmr_tests + +standard_testfile +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} { + return -1 +} + +if {![runto_main]} { + return -1 +} + +set reg_main_value "0x3fff7fc049" +set reg_handler_value "0xff008041" + +proc check_fpmr {value} { + gdb_test "print /x \$fpmr" ".* = {?$value}?" \ + "check register \$fpmr has value $value" +} + +# Run until end of signal handler. + +gdb_test "continue" "Continuing.*Program received signal SIGILL.*" \ + "continue until signal" + +gdb_breakpoint [gdb_get_line_number "exit (0)"] +gdb_continue_to_breakpoint "exit" ".*exit.*" + +set handlerframe [get_current_frame_number] +set mainframe [expr {$handlerframe + 2}] + +# Check register values. + +with_test_prefix "handler frame 1st" { + check_fpmr $reg_handler_value +} + +# Switch to the frame for main (), and check register values. + +gdb_test "frame $mainframe" "#$mainframe.*main ().*" \ + "set to main frame" + +with_test_prefix "main frame" { + check_fpmr $reg_main_value +} + +# Switch back to the signal handler frame, and check register values. + +gdb_test "frame $handlerframe" \ + "#$handlerframe.*handler \\\(sig=4\\\).*" \ + "set to signal handler frame" + +with_test_prefix "handler frame 2nd" { + check_fpmr $reg_handler_value +} diff --git a/gdb/testsuite/gdb.arch/aarch64-fpmr.c b/gdb/testsuite/gdb.arch/aarch64-fpmr.c new file mode 100644 index 00000000000..89298d1c6a8 --- /dev/null +++ b/gdb/testsuite/gdb.arch/aarch64-fpmr.c @@ -0,0 +1,118 @@ +/* This file is part of GDB, the GNU debugger. + + Copyright 2008-2025 Free Software Foundation, Inc. + + 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 . */ + +#include + +enum FPM_FORMAT +{ + E5M2, + E4M3, +}; + +enum FPM_OVERFLOW +{ + INFNAN, + SATURATE, +}; + +void +set_fpmr (uint64_t value) +{ + register uint64_t x0_val asm ("x0") = value; + __asm__ volatile (".inst 0xd51b4440" : : ); + /* msr fpmr, x0 */ +} + +uint64_t +modify_src1_fmt (uint64_t fpmr, uint64_t fmt) +{ + return (fpmr & ~(0x7)) | (fmt & 0x7); +} + +uint64_t +modify_src2_fmt (uint64_t fpmr, uint64_t fmt) +{ + return (fpmr & ~((0x7) << 3)) | ((fmt & 0x7) << 3); +} + +uint64_t +modify_dst_fmt (uint64_t fpmr, uint64_t fmt) +{ + return (fpmr & ~((0x7) << 6)) | ((fmt & 0x7) << 6); +} + +uint64_t +modify_osm (uint64_t fpmr, uint64_t overflow) +{ + return (fpmr & ~((0x1) << 14)) | ((overflow & 0x1) << 14); +} + +uint64_t +modify_osc (uint64_t fpmr, uint64_t overflow) +{ + return (fpmr & ~((0x1) << 15)) | ((overflow & 0x1) << 15); +} + +uint64_t +modify_lscale (uint64_t fpmr, uint64_t scale) +{ + return (fpmr & ~((0x7f) << 16)) | ((scale & 0x7f) << 16); +} + +uint64_t +modify_nscale (uint64_t fpmr, uint64_t scale) +{ + return (fpmr & ~((0xff) << 24)) | ((scale & 0xff) << 24); +} + +uint64_t +modify_lscale2 (uint64_t fpmr, uint64_t scale) +{ + return (fpmr & ~((uint64_t)(0x3f) << 32)) | ((uint64_t)(scale & 0x3f) << 32); +} + +int +main (void) +{ + uint64_t fpmr = 0; + + fpmr = modify_src1_fmt (fpmr, E4M3); + set_fpmr (fpmr); /* SRC1 */ + + fpmr = modify_src2_fmt (fpmr, E4M3); + set_fpmr (fpmr); /* SRC2 */ + + fpmr = modify_dst_fmt (fpmr, E4M3); + set_fpmr (fpmr); /* DST */ + + fpmr = modify_osm (fpmr, SATURATE); + set_fpmr (fpmr); /* OSM */ + + fpmr = modify_osc (fpmr, SATURATE); + set_fpmr (fpmr); /* OSC */ + + fpmr = modify_lscale (fpmr, -1); + set_fpmr (fpmr); /* LSCALE */ + + fpmr = modify_nscale (fpmr, -1); + set_fpmr (fpmr); /* NSCALE */ + + fpmr = modify_lscale2 (fpmr, -1); + set_fpmr (fpmr); /* LSCALE2 */ + + return 1; +} diff --git a/gdb/testsuite/gdb.arch/aarch64-fpmr.exp b/gdb/testsuite/gdb.arch/aarch64-fpmr.exp new file mode 100644 index 00000000000..142d8172332 --- /dev/null +++ b/gdb/testsuite/gdb.arch/aarch64-fpmr.exp @@ -0,0 +1,99 @@ +# Copyright 2023-2025 Free Software Foundation, Inc. + +# 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 . */ + +# Exercise reading/writing FPMR when it is present. + +require is_aarch64_target +require allow_aarch64_fpmr_tests + +standard_testfile +if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} { + return -1 +} + +if {![runto_main]} { + return -1 +} + +gdb_test_multiple "info register \$fpmr" "Test FPMR SRC1 E5M2" { + -re ".*\r\n.*\[ \ + F8S1=E5M2 \ + F8S2=E5M2 \ + F8D=E5M2 \ + OSM=Inf \ + OSC=Inf/NaN \ + LSCALE=0 \ + NSCALE=0 \ + LSCALE2=0 \]" { + pass "FPMR SRC1 matches E5M2" + } +} + +set breakpoints \ + [list \ + "SRC1" \ + "SRC2" \ + "DST" \ + "OSM" \ + "OSC" \ + "LSCALE" \ + "NSCALE" \ + "LSCALE2"] + +set reg_values \ + [list \ + ".*\r\n.*\[ F8S1=E4M3 F8S2=E5M2 F8D=E5M2 OSM=Inf OSC=Inf/NaN LSCALE=0 NSCALE=0 LSCALE2=0 \]" \ + ".*\r\n.*\[ F8S1=E4M3 F8S2=E4M3 F8D=E5M2 OSM=Inf OSC=Inf/NaN LSCALE=0 NSCALE=0 LSCALE2=0 \]" \ + ".*\r\n.*\[ F8S1=E4M3 F8S2=E4M3 F8D=E4M3 OSM=Inf OSC=Inf/NaN LSCALE=0 NSCALE=0 LSCALE2=0 \]" \ + ".*\r\n.*\[ F8S1=E4M3 F8S2=E4M3 F8D=E4M3 OSM=MaxNormal OSC=Inf/NaN LSCALE=0 NSCALE=0 LSCALE2=0 \]" \ + ".*\r\n.*\[ F8S1=E4M3 F8S2=E4M3 F8D=E4M3 OSM=MaxNormal OSC=MaxNormal LSCALE=0 NSCALE=0 LSCALE2=0 \]" \ + ".*\r\n.*\[ F8S1=E4M3 F8S2=E4M3 F8D=E4M3 OSM=MaxNormal OSC=MaxNormal LSCALE=127 NSCALE=0 LSCALE2=0 \]" \ + ".*\r\n.*\[ F8S1=E4M3 F8S2=E4M3 F8D=E4M3 OSM=MaxNormal OSC=MaxNormal LSCALE=127 NSCALE=255 LSCALE2=0 \]" \ + ".*\r\n.*\[ F8S1=E4M3 F8S2=E4M3 F8D=E4M3 OSM=MaxNormal OSC=MaxNormal LSCALE=127 NSCALE=255 LSCALE2=63 \]"] + +set pass_messages \ + [list \ + "FPMR SRC1 matches E4M3" \ + "FPMR SRC2 matches E4M3" \ + "FPMR DST matches E4M3" \ + "FPMR OSM matches MaxNormal" \ + "FPMR OSC matches MaxNormal" \ + "FPMR LSCALE matches" \ + "FPMR NSCALE matches" \ + "FPMR LSCALE2 matches"] + +for {set i 0} {$i < 8} {incr i} { + set bp [lindex $breakpoints $i] + gdb_breakpoint [gdb_get_line_number $bp] + gdb_continue_to_breakpoint $bp + + gdb_test_multiple "info register \$fpmr" "" { + -re [lindex $reg_values $i] { + pass [lindex $pass_messages $i] + } + } +} + +gdb_test_multiple "set \$fpmr=0x0" "" { + -re ".*\r\n.*\[ F8S1=E5M2 F8S2=E5M2 F8D=E5M2 OSM=Inf OSC=Inf/NaN LSCALE=0 NSCALE=0 LSCALE2=0 \]" { + pass "Reset FPMR to 0 from GDB" + } +} + +gdb_test_multiple "set \$fpmr=0x3f007f4008" "" { + -re ".*\r\n.*\[ F8S1=E5M2 F8S2=E4M3 F8D=E5M2 OSM=MaxNormal OSC=Inf/NaN LSCALE=127 NSCALE=0 LSCALE2=63 \]" { + pass "Write to FPMR from GDB" + } +} diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 930462f63fa..cdb6ccdfa35 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5201,6 +5201,72 @@ proc aarch64_supports_sme_svl { length } { return 1 } +# Run a test on the target to see if it supports the AArch64 FPMR feature. +# Return 1 if so, 0 if it does not. Note this causes a restart of GDB. + +gdb_caching_proc allow_aarch64_fpmr_tests {} { + global srcdir subdir gdb_prompt inferior_exited_re + + set me "allow_aarch64_fpmr_tests" + + if { ![is_aarch64_target]} { + return 0 + } + + set compile_flags "{additional_flags=-march=armv8-a}" + + # Compile a test program reading FPMR. + set src { + int main() { + asm volatile ("mrs x0, fpmr"); + return 0; + } + } + if {![gdb_simple_compile $me $src executable $compile_flags]} { + # Try again, but with a raw hex instruction so we don't rely on + # assembler support for FPMR. + + set compile_flags "{additional_flags=-march=armv8-a}" + + # Compile a test program reading FPMR. + set src { + int main() { + asm volatile (".word 0xD53B4440"); + return 0; + } + } + + if {![gdb_simple_compile $me $src executable $compile_flags]} { + return 0 + } + } + + # Compilation succeeded so now run it via gdb. + clean_restart + gdb_load $obj + gdb_run_cmd + + gdb_expect { + -re ".*Illegal instruction.*${gdb_prompt} $" { + verbose -log "\n$me fpmr support not detected" + set allow_fpmr_tests 0 + } + -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { + verbose -log "\n$me: fpmr support detected" + set allow_fpmr_tests 1 + } + default { + warning "\n$me: default case taken" + set allow_fpmr_tests 0 + } + } + gdb_exit + remote_file build delete $obj + + verbose "$me: returning $allow_fpmr_tests" 2 + return $allow_fpmr_tests +} + # Run a test on the target to see if it supports AArch64 MOPS (Memory # Operations) extensions. Return 1 if so, 0 if it does not. Note this # causes a restart of GDB. -- 2.45.2