From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Q8wBOJ9/HGmhtA8AWB0awg (envelope-from ) for ; Tue, 18 Nov 2025 09:15:59 -0500 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=UqwyL5tF; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=UqwyL5tF; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D20291E0B6; Tue, 18 Nov 2025 09:15:59 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 C78A21E048 for ; Tue, 18 Nov 2025 09:15:57 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 373203857356 for ; Tue, 18 Nov 2025 14:15:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 373203857356 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=UqwyL5tF; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=UqwyL5tF Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11012035.outbound.protection.outlook.com [52.101.66.35]) by sourceware.org (Postfix) with ESMTPS id 5271F3857BA3 for ; Tue, 18 Nov 2025 14:15:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5271F3857BA3 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 5271F3857BA3 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=52.101.66.35 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1763475319; cv=pass; b=wTi3tZDsbqoEmeXBVn7C3UjNIB59nwIjMw+2YBE3VlaNMP6yjH22ctT7QGQ6UsXjnhr86ETYr7C5qFfTGYb17jyxyFi67GF/6WM585YenGSzyTB6Y1YMYHYgcqY8jfWk3tRO6YFz0HfzUqDTK9Lv8fFziyIV8/PvzSb6v7yzcos= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1763475319; c=relaxed/simple; bh=CaiKSTYAOiCEXjTBCuyy+xa3rU+EYviiHM02p4qLU7A=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=OlowB/dljqFcV1FjFZu7HCwXmjmTqcljI0O2qOpFPfSG07EGjng98iDTyc6TbfyblJkOyt6XdCBri8YM0jm4Q2B1RTHWxzO/OURwvRBoc8JJ1J8Qlab+VNj6GheQnV9Xh45zIrbX0McFtWYTirhjX0Ix5/3CZgO9Ef6Ms7ispjA= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5271F3857BA3 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=P2PLVaunVwt5HIn0kibLfj4/3HIK0msTatqpqCJtDyNFplhOA0pwj4NYlAyuUfCXoHhXXjNRNQ2K9yrwFBQeJ58EvjYS6LAIR9oQjg03DbH4Zi/T6g8+MutCozO9G/83/eIEea8cXctNSOO5eeent72Pgpt+ro51S3giHvew7fckMbcl2+sGGy4JG3UbLOHeAbbAvLkPKsUnFGDzToHIm5B30xKJFUeENXWClAvZ5rNxjACDQsG5Brn7W4ML00CNrSV9MxzfOqJ/Jbj+n84Gix7+zpexEGoNpngAd9G5AMU+qUM4YUCUZ3AFFBhxcirvJmO5ftPYZ8Op9J9pIHjT7Q== 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=y3QTUYaUdfO1wMbezQYCXeYJ25iPHD5CN2GstUGNf4k=; b=WLdD6HB0JHZqK2mSryrUykxD8GvIXj1a3SlwMH8L4R2vtS/q8LvbFdqVYCNKKAhHubc20jLP1vn2vkqsOogJfUldEZk/eCLZzyA1chKBRfczmV+35ftMHw37FPjF//Bqa/7mFY2TGEnKMW/iasMBeDLVUfmnm9ni6DezybyM2SUyATU9TbMI4377z9DMLST2gloZSb86QcwC8E4p3Fjo5UoYKRkiK4Ng0RuLCI04VqUKW3z0i281dy+iYHorpp4csl/EHLqLgGk61ZuEliXFJ71noTjEnMNJOKZkKC9ankdx7VLwMwoTYSK91LE/WGpzQHgm6S2+DnoD0tc4fv9lJg== 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=y3QTUYaUdfO1wMbezQYCXeYJ25iPHD5CN2GstUGNf4k=; b=UqwyL5tFQIqVWceWlZ8BnL7ritERNvyUuhGnGxu42H5PHQpA/HOZcngapuMshaFHv2tRHD5+XXbT8cBHWzGRFaTU+lyggiyuw3VlmraERL3w7/Wlm+xe7Psv6v0lx9UgOHygcB2D9ATDpNPb2lol96KniZz910DUM3Zw/EQpNkM= Received: from DU2PR04CA0304.eurprd04.prod.outlook.com (2603:10a6:10:2b5::9) by PAVPR08MB9377.eurprd08.prod.outlook.com (2603:10a6:102:302::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9343.10; Tue, 18 Nov 2025 14:15:12 +0000 Received: from DB5PEPF00014B94.eurprd02.prod.outlook.com (2603:10a6:10:2b5:cafe::95) by DU2PR04CA0304.outlook.office365.com (2603:10a6:10:2b5::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9320.22 via Frontend Transport; Tue, 18 Nov 2025 14:15:09 +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 DB5PEPF00014B94.mail.protection.outlook.com (10.167.8.232) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9343.9 via Frontend Transport; Tue, 18 Nov 2025 14:15:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wga6Aq7KY5QS8i+QQPjp9TnJJWIH81oy6e1dIHg+I9su4Z8C2uDEcSWag7I3VGhp7M1BYdVzijo90bYMI1moDP+oxHkJwff6aceidgNAsrD/XPFjq4bvJ0UPHov2nQXwsJDtNVaNUI7qEdg/FAVJVXQTNjymYcbDY6vWZiWUT0Lvk0WcFcvIEbJYyeUWjYjvQpZw+aphFCzW4utNV/CdqhDzDO7TDYDbd3x3J5WHMK82OOM/Jkj0UmkMrKTqtGWQ/yOyzn6brc/t/AMSttAB0e5FvJCLI7QeS3jSyy8ipxgGig/U3J5Aizm4t2Rvmpqyai+wvcjFQkLyCagU6822JA== 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=y3QTUYaUdfO1wMbezQYCXeYJ25iPHD5CN2GstUGNf4k=; b=F3t0Q5PuAnTFJRQTg4gdOxvyzb51NEY7pOd/nBXyh2nqDTbswPLFTvVyC6uFWpmG3sznzgZ4KEOOwQ9CWDO3pKKHTkmO1GmJ8Q4P1PIiv9QqBvS/7pcCeG8CCdctbU8VNLASPPGnNscDo7h/RcrjH+z599fxzRQyQlyzKJmNOR4nQM7pKULYXTuYlB0bNE5LJEC5eJdP22InNJSF/jIuFrAeG94idFHFZ0cemQX1yeZtunVhlLDCY8kWF1PLcvQniyyGxvi0BJqe7uWGcT5aqWjnfYhdE4FkYFBunildZWwc/JR5+HKgTRrY7o8SwNEh78QVUDFA/EaUKiY9Ry3V0Q== 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=y3QTUYaUdfO1wMbezQYCXeYJ25iPHD5CN2GstUGNf4k=; b=UqwyL5tFQIqVWceWlZ8BnL7ritERNvyUuhGnGxu42H5PHQpA/HOZcngapuMshaFHv2tRHD5+XXbT8cBHWzGRFaTU+lyggiyuw3VlmraERL3w7/Wlm+xe7Psv6v0lx9UgOHygcB2D9ATDpNPb2lol96KniZz910DUM3Zw/EQpNkM= Received: from DU6P191CA0030.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:53f::9) by AS4PR08MB8191.eurprd08.prod.outlook.com (2603:10a6:20b:58e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9320.22; Tue, 18 Nov 2025 14:14:39 +0000 Received: from DB3PEPF0000885D.eurprd02.prod.outlook.com (2603:10a6:10:53f:cafe::bd) by DU6P191CA0030.outlook.office365.com (2603:10a6:10:53f::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9320.23 via Frontend Transport; Tue, 18 Nov 2025 14:14:41 +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 DB3PEPF0000885D.mail.protection.outlook.com (10.167.242.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9343.9 via Frontend Transport; Tue, 18 Nov 2025 14:14:39 +0000 Received: from AZ-NEU-EX03.Arm.com (10.240.25.137) 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; Tue, 18 Nov 2025 14:14:37 +0000 Received: from D2G2X7XGD1.arm.com (10.57.40.244) by mail.arm.com (10.240.25.137) with Microsoft SMTP Server id 15.2.2562.27 via Frontend Transport; Tue, 18 Nov 2025 14:14:37 +0000 From: To: CC: , , Ezra Sitorus Subject: [RFC PATCH] gdb/py: Add pretty printer for __mfp8 for aarch64 Date: Tue, 18 Nov 2025 14:14:57 +0000 Message-ID: <20251118141457.83739-1-Ezra.Sitorus@arm.com> X-Mailer: git-send-email 2.51.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB3PEPF0000885D:EE_|AS4PR08MB8191:EE_|DB5PEPF00014B94:EE_|PAVPR08MB9377:EE_ X-MS-Office365-Filtering-Correlation-Id: 46b2b279-b06d-4e6d-0018-08de26ace321 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|36860700013|82310400026|13003099007; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?MOdN5VTq0PyPv1BVWg29udznqXW0z1ZuLdz9AQQVP14jixocmD/bhhFxzP7v?= =?us-ascii?Q?Aj1m4qqGmdtZ/pk/H3aedKBseXq6B88CJP0IqZkZnBoLYoqJEuAyEx85POy3?= =?us-ascii?Q?/FlxE3vfVTEW1+25GA4IKhkNSP3KQUkMW/MRBdUs9DPQ2g9f3Kejs4AN9UOX?= =?us-ascii?Q?Fyk62Wk+Nbbvm9tLuyikPaOQSd/a4otjhx5Od0PIK4Nj0PL6JSg+/WK1QoAr?= =?us-ascii?Q?poGn8UkpYLBU+t/YwWhQYMO7E2XtKgqmydBjw9t4XtyX9c97DA2zXqgwlLuD?=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1aAbGkiI/13yRPD1dTNEfX?= =?us-ascii?Q?4iNz9s1bQUMkl3ioZsYEzwjxHD6fhGCU2EGBUmtgedqIC0FVHUG9n98+itxi?= =?us-ascii?Q?p1i4imqfuDBWZGppZ/xQVPfaztQUuyZBCh5m4/OljPVR5t26zpfU6iJFXXgG?= =?us-ascii?Q?jwiWU/tFygyUAui/7QbBgsWfz6c4YPi8Z3gXeW6hsmzPlZ0AypNntBShijr8?= =?us-ascii?Q?ri1n5kWhjg4W3qvZ0pBA3LjoUxKJ5vRkVUUXOp+XgQ0XPQKz7AAxmbrU0EVN?= =?us-ascii?Q?qROt1QGNRn1ObiXIRa7COHM/sWiAW/RSOitnez7Uny2ALXRtJ/RvSd6BO5sA?= =?us-ascii?Q?/k8UkqmJRZPOTIiUKWJ4EcIAZ+pFMxndm3wl88p/Us2wFPVhefJ7Ylf9W3Hu?= =?us-ascii?Q?Ldeu/59QE+EYfJhaRDc=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)(36860700013)(82310400026)(13003099007); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB8191 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5PEPF00014B94.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b03a8bf8-8cef-491a-b9b4-08de26accfa1 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|35042699022|82310400026|376014|36860700013|14060799003|13003099007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?HvuwkipsQDHSM/eV+OmJzOtrKcVFyUYTjBEeCjM3SS/oprwokmvlkvefUAZe?= =?us-ascii?Q?0E43giLaWW/OfTgSonv6mtOI5jeU2RDjK0ObynS8fXUbY/mUq1TvoDLd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WZm/1mDFxyzfsu0cNuZPqIQHB5LOBuGero?= =?us-ascii?Q?dgMO7rCFdS8GyXYk8NTDqFxqhQzaxHZMqs6hQhyZhvS6MkzTwVszN3VBYuSI?= =?us-ascii?Q?gIZmx4rj+oHCD5DqZKIaK3kF8v/0vPn9YCYxEijwdAmrhiXWd+Q9o2xmVgLS?= =?us-ascii?Q?uu1gy4zwvg9PYZYhQw4p4KnHDWfPF1Eltpto0JzovunjkcldAVcjEXYSjJPr?= =?us-ascii?Q?zKn4xFb4dv4oqrkm4eLULrR7K+l/xvwOEUqOoKK52gmSM5bxNan6pwG0+poJ?= =?us-ascii?Q?W7b4h28c8w9wtCxEVScD3VOPBdX1GB4awuJ8aLx99t3zxSpVvkezwSyRNuMu?= =?us-ascii?Q?9tL/xmYqJYsbR3t//n5UdYELUskZeVkY5ARMN83F7HZvr8SSL+ckThunLmjH?= =?us-ascii?Q?V2dyTVQG/AdgJ+vi+2zdNXchxM4M1PHGatdfFlLMuMEVPqh/iL09UhBZFezC?= =?us-ascii?Q?bDeOxh9gFu+dc+/x5KmVP+CkvF+Y/Grl9ORmLqLRMvGupq5BplsGEEGONTPI?= =?us-ascii?Q?gXLyhTF9a6AU+97NTtxdbYAQm+FlwxhR6rawwFM80qpKA/izk5tRcaCgwxTT?= =?us-ascii?Q?1DyDAoJe7qSen6APt9Q=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)(1800799024)(35042699022)(82310400026)(376014)(36860700013)(14060799003)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2025 14:15:11.8860 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46b2b279-b06d-4e6d-0018-08de26ace321 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: DB5PEPF00014B94.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9377 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 __mfp8/mfloat8_t is encoded as unsigned int in DWARF so we are unable to print out variables of this type properly. As a result, this patch adds a python pretty printer to display these values. To use: import gdb.printer gdb.printer.register_aarch64_fp8_printer(gdb.current_objfile()) To view which pretty printers are registered, you can check by doing: info pretty-printer As for precision, I've followed ceil(1 + p * log10(b)) from gdb/target-float.c, which gives 2 figures for E5M2 and 3 for E4M3. The pretty printer's calculation is tested for correctness in the new test cases by matching the output string with expected values. The values come from running a program that converts the FP8 values to FP16 and displaying them with the number of figures from above on Arm FVP (Shrinkwrap) with FP8 support. The only exception to this are the special cases (inf, nan, and extra figures for E4M3). In general, I've tried to follow the same style for displaying floats in gdb. NaNs display their payload so I've kept that for E5M2, but in the case of E4M3 I only use nan as there's only one. Ezra --- gdb/data-directory/Makefile.in | 1 + gdb/python/lib/gdb/printer/__init__.py | 6 + gdb/python/lib/gdb/printer/aarch64.py | 83 ++++++++++++++ gdb/testsuite/gdb.python/aarch64-fp8.c | 48 ++++++++ gdb/testsuite/gdb.python/aarch64-fp8.exp | 137 +++++++++++++++++++++++ gdb/testsuite/gdb.python/aarch64-fp8.py | 18 +++ gdb/testsuite/lib/gdb.exp | 48 ++++++++ 7 files changed, 341 insertions(+) create mode 100644 gdb/python/lib/gdb/printer/aarch64.py create mode 100644 gdb/testsuite/gdb.python/aarch64-fp8.c create mode 100644 gdb/testsuite/gdb.python/aarch64-fp8.exp create mode 100644 gdb/testsuite/gdb.python/aarch64-fp8.py diff --git a/gdb/data-directory/Makefile.in b/gdb/data-directory/Makefile.in index 2ca2b8e7e5f..097b3de670b 100644 --- a/gdb/data-directory/Makefile.in +++ b/gdb/data-directory/Makefile.in @@ -123,6 +123,7 @@ PYTHON_FILE_LIST = \ gdb/function/as_string.py \ gdb/function/caller_is.py \ gdb/function/strfns.py \ + gdb/printer/aarch64.py \ gdb/printer/__init__.py @HAVE_PYTHON_TRUE@PYTHON_FILES = $(PYTHON_FILE_LIST) diff --git a/gdb/python/lib/gdb/printer/__init__.py b/gdb/python/lib/gdb/printer/__init__.py index 854ff3acee0..77720674e42 100644 --- a/gdb/python/lib/gdb/printer/__init__.py +++ b/gdb/python/lib/gdb/printer/__init__.py @@ -12,3 +12,9 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . + + +def register_aarch64_fp8_printers(obj): + from .aarch64 import internal_register_aarch64_fp8_printers + + internal_register_aarch64_fp8_printers(obj) diff --git a/gdb/python/lib/gdb/printer/aarch64.py b/gdb/python/lib/gdb/printer/aarch64.py new file mode 100644 index 00000000000..c7d9334598b --- /dev/null +++ b/gdb/python/lib/gdb/printer/aarch64.py @@ -0,0 +1,83 @@ +# Copyright (C) 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 . + + +import gdb +import gdb.printing + + +# ceil(1 + p * log10(b)) +# This means that the number of significant figures for e5m2 = 2 +# and for e4m3 = 3 + + +class aarch64_mfp8_printer(gdb.ValuePrinter): + # Print aarch64 mfp8 formats + + def __init__(self, val): + self.__val = val + + def convert_to_float(self, s, e, m, m_bits, bias): + sign = -1.0 if s == 1 else 1.0 + if e == 0 and m == 0: + return sign * 0.0 + + m_new = float(m) / (2**m_bits) + if e == 0 and m != 0: + e_new = float(1 - bias) + else: + e_new = float(e - bias) + m_new = 1 + m_new + + return sign * m_new * (2.0**e_new) + + def print_e4m3(self): + bias = 7 + s = self.__val >> 7 + e = (self.__val >> 3) & 0b1111 + m = self.__val & 0b111 + + if e == 0b1111 and m == 0b111: + sign_str = "-" if s == 1 else "" + return sign_str + "nan" + return "{0:.3g}".format(self.convert_to_float(s, e, m, 3, bias)) + + def print_e5m2(self): + bias = 15 + s = self.__val >> 7 + e = (self.__val >> 2) & 0b11111 + m = self.__val & 0b11 + + if e == 0b11111: + sign_str = "-" if s == 1 else "" + if m == 0: + return sign_str + "inf" + return sign_str + "nan(" + str(m) + ")" + + return "{0:.2g}".format(self.convert_to_float(s, e, m, 2, bias)) + + def to_string(self): + return "{ e4m3: " + self.print_e4m3() + ", e5m2: " + self.print_e5m2() + " }" + + +def build_pretty_printer(): + pp = gdb.printing.RegexpCollectionPrettyPrinter("aarch64-fp8") + pp.add_printer("mfp8", "^__mfp8.*$", aarch64_mfp8_printer) + pp.add_printer("mfloat8_t", "^mfloat8_t.*$", aarch64_mfp8_printer) + return pp + + +def internal_register_aarch64_fp8_printers(obj): + gdb.printing.register_pretty_printer(obj, build_pretty_printer()) diff --git a/gdb/testsuite/gdb.python/aarch64-fp8.c b/gdb/testsuite/gdb.python/aarch64-fp8.c new file mode 100644 index 00000000000..efc5374682a --- /dev/null +++ b/gdb/testsuite/gdb.python/aarch64-fp8.c @@ -0,0 +1,48 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2024-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 + +#define MFLOAT8(X) (((union { uint8_t x; mfloat8_t y; }){ X }).y) + +int +main (void) +{ + for (int i = 0; i < 256; i++) + { + mfloat8_t foo = MFLOAT8 (i); + int junk = 0; /* break1 */ + } + + struct bar + { + mfloat8_t x; + mfloat8_t y; + mfloat8_t a; + mfloat8_t b; + } bar = { MFLOAT8 (1), MFLOAT8 (2), MFLOAT8 (3), MFLOAT8 (4) }; + + mfloat8x16_t baz + = { MFLOAT8 (0), MFLOAT8 (1), MFLOAT8 (2), MFLOAT8 (3), + MFLOAT8 (4), MFLOAT8 (5), MFLOAT8 (6), MFLOAT8 (7), + MFLOAT8 (8), MFLOAT8 (9), MFLOAT8 (10), MFLOAT8 (11), + MFLOAT8 (12), MFLOAT8 (13), MFLOAT8 (14), MFLOAT8 (15) }; + + /* break2 */ + + return 0; +} diff --git a/gdb/testsuite/gdb.python/aarch64-fp8.exp b/gdb/testsuite/gdb.python/aarch64-fp8.exp new file mode 100644 index 00000000000..1f1a172f68e --- /dev/null +++ b/gdb/testsuite/gdb.python/aarch64-fp8.exp @@ -0,0 +1,137 @@ +# Copyright 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 . + +# Test pretty printing of fixed-width fp8 types for AArch64. + +load_lib gdb-python.exp +require allow_python_tests is_aarch64_target + +standard_testfile +if { + [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ + [list debug additional_flags=-march=armv9.2-a+fp8]]} { + return -1 +} + +if ![runto_main] { + return -1 +} + +set e5m2_expected_vals { + 0 1.5e-05 3.1e-05 4.6e-05 6.1e-05 7.6e-05 9.2e-05 0.00011 \ + 0.00012 0.00015 0.00018 0.00021 0.00024 0.00031 0.00037 0.00043 \ + 0.00049 0.00061 0.00073 0.00085 0.00098 0.0012 0.0015 0.0017 \ + 0.002 0.0024 0.0029 0.0034 0.0039 0.0049 0.0059 0.0068 \ + 0.0078 0.0098 0.012 0.014 0.016 0.02 0.023 0.027 \ + 0.031 0.039 0.047 0.055 0.062 0.078 0.094 0.11 \ + 0.12 0.16 0.19 0.22 0.25 0.31 0.38 0.44 \ + 0.5 0.62 0.75 0.88 1 1.2 1.5 1.8 \ + 2 2.5 3 3.5 4 5 6 7 \ + 8 10 12 14 16 20 24 28 \ + 32 40 48 56 64 80 96 1.1e\\+02 \ + 1.3e\\+02 1.6e\\+02 1.9e\\+02 2.2e\\+02 2.6e\\+02 3.2e\\+02 3.8e\\+02 4.5e\\+02 \ + 5.1e\\+02 6.4e\\+02 7.7e\\+02 9e\\+02 1e\\+03 1.3e\\+03 1.5e\\+03 1.8e\\+03 \ + 2e\\+03 2.6e\\+03 3.1e\\+03 3.6e\\+03 4.1e\\+03 5.1e\\+03 6.1e\\+03 7.2e\\+03 \ + 8.2e\\+03 1e\\+04 1.2e\\+04 1.4e\\+04 1.6e\\+04 2e\\+04 2.5e\\+04 2.9e\\+04 \ + 3.3e\\+04 4.1e\\+04 4.9e\\+04 5.7e\\+04 inf nan\\(1\\) nan\\(2\\) nan\\(3\\) \ + -0 -1.5e-05 -3.1e-05 -4.6e-05 -6.1e-05 -7.6e-05 -9.2e-05 -0.00011 \ + -0.00012 -0.00015 -0.00018 -0.00021 -0.00024 -0.00031 -0.00037 -0.00043 \ + -0.00049 -0.00061 -0.00073 -0.00085 -0.00098 -0.0012 -0.0015 -0.0017 \ + -0.002 -0.0024 -0.0029 -0.0034 -0.0039 -0.0049 -0.0059 -0.0068 \ + -0.0078 -0.0098 -0.012 -0.014 -0.016 -0.02 -0.023 -0.027 \ + -0.031 -0.039 -0.047 -0.055 -0.062 -0.078 -0.094 -0.11 \ + -0.12 -0.16 -0.19 -0.22 -0.25 -0.31 -0.38 -0.44 \ + -0.5 -0.62 -0.75 -0.88 -1 -1.2 -1.5 -1.8 \ + -2 -2.5 -3 -3.5 -4 -5 -6 -7 \ + -8 -10 -12 -14 -16 -20 -24 -28 \ + -32 -40 -48 -56 -64 -80 -96 -1.1e\\+02 \ + -1.3e\\+02 -1.6e\\+02 -1.9e\\+02 -2.2e\\+02 -2.6e\\+02 -3.2e\\+02 -3.8e\\+02 -4.5e\\+02 \ + -5.1e\\+02 -6.4e\\+02 -7.7e\\+02 -9e\\+02 -1e\\+03 -1.3e\\+03 -1.5e\\+03 -1.8e\\+03 \ + -2e\\+03 -2.6e\\+03 -3.1e\\+03 -3.6e\\+03 -4.1e\\+03 -5.1e\\+03 -6.1e\\+03 -7.2e\\+03 \ + -8.2e\\+03 -1e\\+04 -1.2e\\+04 -1.4e\\+04 -1.6e\\+04 -2e\\+04 -2.5e\\+04 -2.9e\\+04 \ + -3.3e\\+04 -4.1e\\+04 -4.9e\\+04 -5.7e\\+04 -inf -nan\\(1\\) -nan\\(2\\) -nan\\(3\\) \ +} + +set e4m3_expected_vals { + 0 0.00195 0.00391 0.00586 0.00781 0.00977 0.0117 0.0137 \ + 0.0156 0.0176 0.0195 0.0215 0.0234 0.0254 0.0273 0.0293 \ + 0.0312 0.0352 0.0391 0.043 0.0469 0.0508 0.0547 0.0586 \ + 0.0625 0.0703 0.0781 0.0859 0.0938 0.102 0.109 0.117 \ + 0.125 0.141 0.156 0.172 0.188 0.203 0.219 0.234 \ + 0.25 0.281 0.312 0.344 0.375 0.406 0.438 0.469 \ + 0.5 0.562 0.625 0.688 0.75 0.812 0.875 0.938 \ + 1 1.12 1.25 1.38 1.5 1.62 1.75 1.88 \ + 2 2.25 2.5 2.75 3 3.25 3.5 3.75 \ + 4 4.5 5 5.5 6 6.5 7 7.5 \ + 8 9 10 11 12 13 14 15 \ + 16 18 20 22 24 26 28 30 \ + 32 36 40 44 48 52 56 60 \ + 64 72 80 88 96 104 112 120 \ + 128 144 160 176 192 208 224 240 \ + 256 288 320 352 384 416 448 nan \ + -0 -0.00195 -0.00391 -0.00586 -0.00781 -0.00977 -0.0117 -0.0137 \ + -0.0156 -0.0176 -0.0195 -0.0215 -0.0234 -0.0254 -0.0273 -0.0293 \ + -0.0312 -0.0352 -0.0391 -0.043 -0.0469 -0.0508 -0.0547 -0.0586 \ + -0.0625 -0.0703 -0.0781 -0.0859 -0.0938 -0.102 -0.109 -0.117 \ + -0.125 -0.141 -0.156 -0.172 -0.188 -0.203 -0.219 -0.234 \ + -0.25 -0.281 -0.312 -0.344 -0.375 -0.406 -0.438 -0.469 \ + -0.5 -0.562 -0.625 -0.688 -0.75 -0.812 -0.875 -0.938 \ + -1 -1.12 -1.25 -1.38 -1.5 -1.62 -1.75 -1.88 \ + -2 -2.25 -2.5 -2.75 -3 -3.25 -3.5 -3.75 \ + -4 -4.5 -5 -5.5 -6 -6.5 -7 -7.5 \ + -8 -9 -10 -11 -12 -13 -14 -15 \ + -16 -18 -20 -22 -24 -26 -28 -30 \ + -32 -36 -40 -44 -48 -52 -56 -60 \ + -64 -72 -80 -88 -96 -104 -112 -120 \ + -128 -144 -160 -176 -192 -208 -224 -240 \ + -256 -288 -320 -352 -384 -416 -448 -nan \ +} + +set remote_python_file [gdb_remote_download host \ + ${srcdir}/${subdir}/${testfile}.py] + +gdb_test_no_output "source ${remote_python_file}" "load python file" + +set breakpoint2 "break1" +gdb_breakpoint [gdb_get_line_number $breakpoint2] +for { set i 0 } { $i < 256 } { incr i } { + gdb_continue_to_breakpoint "Continue until breakpoint $i" + set e4m3_expected_val [lindex $e4m3_expected_vals $i] + set e5m2_expected_val [lindex $e5m2_expected_vals $i] + gdb_test "print foo" " = { e4m3: $e4m3_expected_val, e5m2: $e5m2_expected_val }" "fp8 check for $i" +} + +set breakpoint "break2" +gdb_breakpoint [gdb_get_line_number $breakpoint] +gdb_continue_to_breakpoint "Continue until end" + +gdb_test "print bar" " = {x = { e4m3: 0.00195, e5m2: 1.5e-05 }, y = { e4m3: 0.00391, e5m2: 3.1e-05 }, a = { e4m3: 0.00586, e5m2: 4.6e-05 }, b = { e4m3: 0.00781, e5m2: 6.1e-05 }}" + +gdb_test "print baz" " = {{ e4m3: 0, e5m2: 0 },\ + { e4m3: 0.00195, e5m2: 1.5e-05 },\ + { e4m3: 0.00391, e5m2: 3.1e-05 },\ + { e4m3: 0.00586, e5m2: 4.6e-05 },\ + { e4m3: 0.00781, e5m2: 6.1e-05 },\ + { e4m3: 0.00977, e5m2: 7.6e-05 },\ + { e4m3: 0.0117, e5m2: 9.2e-05 },\ + { e4m3: 0.0137, e5m2: 0.00011 },\ + { e4m3: 0.0156, e5m2: 0.00012 },\ + { e4m3: 0.0176, e5m2: 0.00015 },\ + { e4m3: 0.0195, e5m2: 0.00018 },\ + { e4m3: 0.0215, e5m2: 0.00021 },\ + { e4m3: 0.0234, e5m2: 0.00024 },\ + { e4m3: 0.0254, e5m2: 0.00031 },\ + { e4m3: 0.0273, e5m2: 0.00037 },\ + { e4m3: 0.0293, e5m2: 0.00043 }}" diff --git a/gdb/testsuite/gdb.python/aarch64-fp8.py b/gdb/testsuite/gdb.python/aarch64-fp8.py new file mode 100644 index 00000000000..3ba2916de5b --- /dev/null +++ b/gdb/testsuite/gdb.python/aarch64-fp8.py @@ -0,0 +1,18 @@ +# Copyright (C) 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 . + +import gdb.printer + +gdb.printer.register_aarch64_fp8_printers(gdb.current_objfile()) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 930462f63fa..6996926236a 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4897,6 +4897,54 @@ gdb_caching_proc allow_btrace_pt_event_trace_tests {} { return $allow_event_trace_tests } +# Run a test on the target to see if it supports AArch64 FP8 hardware. +# Return 1 if so, 0 if it does not. Note this causes a restart of GDB. + +gdb_caching_proc allow_aarch64_fp8_tests {} { + global srcdir subdir gdb_prompt inferior_exited_re + + set me "allow_aarch64_fp8_tests" + + if { ![is_aarch64_target]} { + return 0 + } + + set compile_flags "{additional_flags=-march=armv9.2-a+fp8}" + + # Compile a test program containing FP8 instructions. + set src { + int main() { + asm volatile ("fscale v0.4h, v1.4h, v2.4h"); + 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 fp8 hardware not detected" + set allow_fp8_tests 0 + } + -re ".*$inferior_exited_re normally.*${gdb_prompt} $" { + verbose -log "\n$me: fp8 hardware detected" + set allow_fp8_tests 1 + } + default { + warning "\n$me: default case taken" + set allow_fp8_tests 0 + } + } + gdb_exit + remote_file build delete $obj + + return $allow_fp8_tests +} # Run a test on the target to see if it supports Aarch64 SVE hardware. # Return 1 if so, 0 if it does not. Note this causes a restart of GDB. -- 2.45.2