From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4krSH+2z1WgUbxMAWB0awg (envelope-from ) for ; Thu, 25 Sep 2025 17:28:13 -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=pEV1p+ru; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=pEV1p+ru; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 6F5D81E04C; Thu, 25 Sep 2025 17:28:13 -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=unavailable 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 E5F251E04C for ; Thu, 25 Sep 2025 17:28:11 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 983263858291 for ; Thu, 25 Sep 2025 21:22:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 983263858291 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=pEV1p+ru; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=pEV1p+ru Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c201::1]) by sourceware.org (Postfix) with ESMTPS id EF4CB3858401 for ; Thu, 25 Sep 2025 21:18:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EF4CB3858401 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 EF4CB3858401 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c201::1 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1758835127; cv=pass; b=dtjW7slAsGBL9vGcmqnig6j/4bX/q/+0aizovw/Y+KL2/TenjzixTfupGW5MK3QZun19yeTDK3f3Zz1ic/wpdSYkwjzT91XhImQAC/UOKGNYnAZrTDXdRiek7OM07Ba6DO19K3gsAWczTbq1X98qHDGqjd9jR2GAdHAY8W4snbw= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1758835127; c=relaxed/simple; bh=6rLtq/Cam3DMuK8TnilekuAe0Z72QnheRoW6Yl4837k=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=P34WRCzoN2WFNa25U6aUZnfyMxBBpEg+76OPBLS2PFQXmr9rIWs+hTZiYqQyQTJ/jERAmsM8/R7Bg7k6xupUjv89F1t1dqS3qcb5wH8NKyDkiEg9h7n643awLOHSYUXl/U7FJrNRxNUMZQRsq6K13/RpwtsLLktSuwfgQA4UC4A= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF4CB3858401 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=NNnykZD8KXO33hGMwqng1//9S5+lDJ3n50RjRQGa1y+yasnS94XEVv9uibfh84L0235CDCd2xK76jmV4J3fqgpdG5HJMeZ1zxtwm8af5rDQmsNZlo2F5VDeRIqVFrJhkMzS4df4v5bb6JcRIbNgt88ATmsGhFjAAP5GwNeZKxmKccxtpWmcWIfPBxe1bKn6MtgMg12jdXWBYvd97lGcAM0vFXNxYm5cqa4NYBZSy+kx4iR594KJix3zZx6LRsuceJAjfqKhm4HGp7FG1/PlqQy0XDxAzwBmmZ4bUoy8SEPrdnUFcTLi+PZH4ExOb4j59LgbSwaaqgkrRev2rRpGbSQ== 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=FH0xZ4M2RiF+EudBr2cXWj1fl/vYyhqrJxRyeG0f0LY=; b=sfFJYeNuvokhiBF/QnEGo8RSJPga8azlim3cKNFmFpyzoxWR1/+rQktub2hCUTqOevsYhPyKFPUxojQcqiJKUKN0kREqEKz1udaxNSDW9cMlFCfMGsYroVwjQHNwDny551G903btVIX5iS7zYw4E6qw2MDbUmtBz2H9hqUh0v/abGJnLEozhp6r17IeYe7AdcBykIop5R0SzhIAyvudmER6t1RTQAPRAh0IJi9YRtEqBv+hgdhKrqJKcR/zDrL2gRkoBPLWSQ694h6YyRxWwxpZju6Iv6cDQSLWQBpslIR4oQWmEsXIFLFYaen4yZbejHpw+8UR+8pPBtoQAk9CqVg== 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=FH0xZ4M2RiF+EudBr2cXWj1fl/vYyhqrJxRyeG0f0LY=; b=pEV1p+ruIiCMSJSl6mimSF9HEK+keX1qd3b39udvtRuuqAAfFSvtThUNPbGVXuclMe/zvNEBWK/4WRtlW6MN1PDDPIF0KopIz1Q10uf/2gLrvlT0d5/V3HKtg/RCjGHHlOvHlBAjmMEzGZO7xnmPge7hJbah6Z/tmwZ4qPRff0Q= Received: from DUZPR01CA0112.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bb::11) by DBBPR08MB10463.eurprd08.prod.outlook.com (2603:10a6:10:532::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9160.10; Thu, 25 Sep 2025 21:18:42 +0000 Received: from DU2PEPF00028CFE.eurprd03.prod.outlook.com (2603:10a6:10:4bb:cafe::1e) by DUZPR01CA0112.outlook.office365.com (2603:10a6:10:4bb::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9160.10 via Frontend Transport; Thu, 25 Sep 2025 21:18:46 +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 DU2PEPF00028CFE.mail.protection.outlook.com (10.167.242.182) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9160.9 via Frontend Transport; Thu, 25 Sep 2025 21:18:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=m9+eGR+kUvBtdAOVDY1b3yZTPp/O7v5TJqwBkdioCdAwW/Bv9oa0+CtXf52EE2+VQAMlOohFWgjYjZIznMea/JTpOF3F8jf16V4O6gQ9zMCEZH2b2AUc+ZwPqYbJzfOkK1ey7Nn6QyTZ6cT0Yl+v0UIKXVThhl/oHZVIU3CWvGoHrikzyD8YJ2B2wtl7vUrJYtmejBGF8kYb6ZkjnZfPpb7A+mToifViVfI/5pivPqBgVtIbOybnYVTn/SnF08cFzIQFuzZgjDmTJ3urfrcMa4vkUK8kQqn9uCh4YVKyqmaxrRRlGNFccY8I99Qj1NbnL+jJtFUxqSU27aLbvTckRw== 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=FH0xZ4M2RiF+EudBr2cXWj1fl/vYyhqrJxRyeG0f0LY=; b=LXmwz1Fw6VStul2c/4NEOYS7eTcmDs7FlfGvyDig0MRXAR5/TNX0kLIRfxkCTTx18J0xZT/oQFrGbQVa6n/t+rSTTAzit5JhbsmRkluIKl4Pu/Ow5CjcdES4FmuCK42aauoAZYXQ3CK/O/v+hlp2PQdFKM77w+xFkHqvjElkByT4CFBW4pK1t1nz5Gb3rLnztdG9zSRU6bt49eEcJ2uqq29+l0pXnhwQjqCCeelIYS8ZVSVtWTFsVLnaYvkNkaBNBHUltnlNbYZrYOft2tQQ5KhUf/7HOtUeDABnop6lgykNC9OfjZo0T54f/wOtT2ApMDh2b6lYoCf1j3Y18/qsEQ== 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=FH0xZ4M2RiF+EudBr2cXWj1fl/vYyhqrJxRyeG0f0LY=; b=pEV1p+ruIiCMSJSl6mimSF9HEK+keX1qd3b39udvtRuuqAAfFSvtThUNPbGVXuclMe/zvNEBWK/4WRtlW6MN1PDDPIF0KopIz1Q10uf/2gLrvlT0d5/V3HKtg/RCjGHHlOvHlBAjmMEzGZO7xnmPge7hJbah6Z/tmwZ4qPRff0Q= Received: from AM0PR05CA0090.eurprd05.prod.outlook.com (2603:10a6:208:136::30) by GVXPR08MB11352.eurprd08.prod.outlook.com (2603:10a6:150:2c4::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9160.9; Thu, 25 Sep 2025 21:18:08 +0000 Received: from AM3PEPF0000A798.eurprd04.prod.outlook.com (2603:10a6:208:136:cafe::8e) by AM0PR05CA0090.outlook.office365.com (2603:10a6:208:136::30) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9160.11 via Frontend Transport; Thu, 25 Sep 2025 21:18:08 +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 AM3PEPF0000A798.mail.protection.outlook.com (10.167.16.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9160.9 via Frontend Transport; Thu, 25 Sep 2025 21:18:08 +0000 Received: from AZ-NEU-EXJ01.Arm.com (10.240.25.132) 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.27; Thu, 25 Sep 2025 21:18:07 +0000 Received: from AZ-NEU-EX03.Arm.com (10.240.25.137) by AZ-NEU-EXJ01.Arm.com (10.240.25.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 25 Sep 2025 21:18:07 +0000 Received: from D2G2X7XGD1.arm.com (10.57.65.168) by mail.arm.com (10.240.25.137) with Microsoft SMTP Server id 15.2.2562.27 via Frontend Transport; Thu, 25 Sep 2025 21:18:06 +0000 From: To: CC: , , Ezra Sitorus Subject: [PATCH] gdb: Add support for fp8 formats Date: Thu, 25 Sep 2025 22:18:02 +0100 Message-ID: <20250925211804.21967-3-Ezra.Sitorus@arm.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250925211804.21967-1-Ezra.Sitorus@arm.com> References: <20250925211804.21967-1-Ezra.Sitorus@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM3PEPF0000A798:EE_|GVXPR08MB11352:EE_|DU2PEPF00028CFE:EE_|DBBPR08MB10463:EE_ X-MS-Office365-Filtering-Correlation-Id: fbd3c760-4baa-421f-6438-08ddfc791a3d x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|34020700016|1800799024|376014|36860700013|82310400026|13003099007|12100799066; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?B/0LXBhvRX/Dan27xtgYB7aGkFCt4ya62Zg2NIv4GbY/HPz++CaxPxQlyVkJ?= =?us-ascii?Q?UtZXczmMpu/NCOmvT6q6HtPhoX1sIGUcyVjf2wOlYv3YpW5YVEkbR6O+KfHr?= =?us-ascii?Q?QvlDr8InBVPySHrmC7nFsBUB+Lnlp6vMbthpR72gPwfmHsH88cOUY53Nnt6m?= =?us-ascii?Q?y+LyRz87TAvhC3KNtpD5nnmHKga2MWH2jCJ2h1pBq+wimXvm0/NjmRc4+GRk?= =?us-ascii?Q?7T56qBS+tdo+4MF1Dntt3oyFOGbw+LX9PXzr11xCVkAa6AfCquUIrWQAq7H2?= =?us-ascii?Q?tqDAXw3+QWGaPqb4wDosLprmGVgvY6rSLY5JqqLIejI2xUDA4kwVM5nDBLsY?= =?us-ascii?Q?GeZuRWYk91PiIve8hFjf/J4cBG66YKhYQX3yuqwX5B3RC6OF8adCUp/+3hl0?= =?us-ascii?Q?9nVausGHxrSEzn/JKBsbrqLB2WGZBNvrYAtnLYUziS+FW7NdgPQHudfMzcjY?= =?us-ascii?Q?loFwVSmUEhREIYYO4tT2sF+TI3znDo8lm5zU0FbfP3ERW58bDACWVcsLL2Xo?= =?us-ascii?Q?yjtpY+fxfu6dGcBk0/VLqVIAs+4NDvPvT5zAgeg/I8khxqLTMNg53vg86DZD?= =?us-ascii?Q?osY6llKl8Gtr6n8uENN3MYv3ePBKWgzA/vUObaYYWiKJqJ5VXGYS4uQZjR2H?= =?us-ascii?Q?pGRRCms/lLLeQZKkBKA8vLmKhS7Sn74Rmqlmp2UCR7Sklprz+5htsjhZ08Af?= =?us-ascii?Q?+l0O+ReqsNzf1VmScyWyyy1X1y+WUVBKRlv2nT87SHpHJYjcxvBIHehzz3qP?= =?us-ascii?Q?fFEt5pvM69pD8DSYv+ZiAHnZeW4MokAJoWvBUXQ6vVXRFpgIWcYlYAZmoLj9?= =?us-ascii?Q?xOdAYwqiK1kmzQWAXVCd8yy+3Y8HD89QWJNd6Blb/kYD2AW8zuMHytiWiNpg?= =?us-ascii?Q?wBIA5LToXMD16O/+0reORItBXh4YAT+4l7DtgfsiXUicjrICH8fkwYGM5irF?= =?us-ascii?Q?81XXNYNgdkdkXI2zNJNfKYyGWK8jDwM6O1aTb3bdKEAlPwC98d8PJ71KFklv?= =?us-ascii?Q?LsgzOMLD3ENSGrEctb9KpxBukI5y4hIHMFcs6b8u0KFUbZ0BhRXlyot2b9wN?= =?us-ascii?Q?DLE/bn2dinRY7XOX1HApJ7tWc6CBbvSOOs/wRYbds1q3idq++GQfSVXRt5te?= =?us-ascii?Q?ppzn0Yn/YDmoAsW5BmN1YDWgpJmR34lPy++2g1xRZwrDXuE7r33Ec/b7RZzJ?= =?us-ascii?Q?IC4NtLo/2rtPSoURAEn2j8/CIVr46P0NnfiltxOYFNe/7U17aTVlmgjsA7R2?= =?us-ascii?Q?QKATyHpqgB41udPhNXWeZ+U+U1+Cj9BYnv+kGwLUKB0OXZgQrymmbXF1CVBH?= =?us-ascii?Q?ErjznDt4ZrcniD3eCAwb0vxBPkoLvPpRUjhUWVNpPY2faFV88aaM4lI/V5z5?= =?us-ascii?Q?RxezrXWa3Yj8MPW2m/lsjAmeLYypJSNzT42zlsfLJQ7xsAwJ5E/fA1XKycns?= =?us-ascii?Q?id5SszwSuEIRdlmYPixwgyu77M4DCR8yc+AQOcvIkzNSwHrLpoBwIuozLIpp?= =?us-ascii?Q?rQsZRq3bfgMMjfUnO92zXnAc1bxdZ/znNC740aN3O1rGzUg4WLJMIeCxCA?= =?us-ascii?Q?=3D=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)(34020700016)(1800799024)(376014)(36860700013)(82310400026)(13003099007)(12100799066); DIR:OUT; SFP:1501; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB11352 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF00028CFE.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: dee0348d-6df2-41a8-325d-08ddfc790630 X-Microsoft-Antispam: BCL:0; ARA:13230040|14060799003|12022799006|1800799024|376014|82310400026|36860700013|35042699022|13003099007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?F265eNd5tqO1O+MMxrcteFw0MnFAqq8iiRDhbtoF9EKwj1Ur1ZkmTRCXpRD2?= =?us-ascii?Q?scNqUF03I6ef8ngFYmBA7++VcN/IoCa7s++a0geT48+dn/Lc2OngcbPFxEIk?= =?us-ascii?Q?papp9+WUsqe6YuVI0zphxLvhkhkAJ/AUuzVX6x97v2kPXHgUbPp6tV6NZ1/B?= =?us-ascii?Q?hk+a7KUVElFqJDtnYE9MlSOdpCLbLiPfHx3JzQfzQy/2ErVNrMjAf4ayN2s7?= =?us-ascii?Q?woJaDa0nRUV39yEKp+qAvyktNyUs/8ExDB2JbPJvTteDdqznxkgBHIrPHc6R?= =?us-ascii?Q?yP83Olo3IZ/oU9/Z2kOnZzyl5xbTiAwUsKk1vw6IB2LM5DoMT9Cy4UQmmVPC?= =?us-ascii?Q?VBLoIp8zG/J9zooyNA3Hp1BKW4LAAHxPwxfRGkQrM27G50biEXeNZYkmAi+C?= =?us-ascii?Q?Yt9Fid+dRiTWDUUha+mLuJcOdc1NM/igUbaHe80QL1a4JtHKooQbVYiTW8Is?= =?us-ascii?Q?wH2j+C9yLbACdqRG/Pm4DuJaFyUJDDMhbY6FJN+cQFEPMWgtE7LxobGbxacP?= =?us-ascii?Q?aHI9BStYW22xQ9AAE2KlCwidUxzJzxPr5xDvLPX88tzU7c2Uxw+e4lpsIUCN?= =?us-ascii?Q?G8fp5N6IoRKCbmFjfs8XrIyfzJ6JfqdPcinN0ur3Fmbw+jYJrUYZk7b+lEVN?= =?us-ascii?Q?gm1Pq9hVw9sHfHbT4ItyP++hEyGle7SL7/YdlaKqd5qKXU5vKwA17tp0IiN6?= =?us-ascii?Q?4vLg6wEKnyycgPUaVA0Bp6/3A+HHwyakrgrQXIT8viatIY0bu62wILyvXaf9?= =?us-ascii?Q?TN4hClvPAOXVoZ7xAOYq9c8sYejQTCFn4NkX0cYAUMyxDMHC5gov+g0OW2Dp?= =?us-ascii?Q?7PmX4pQeDznJ+cPQZPuIhxsEDJoo9V44TVA2SIDiuX3tmD56EqdPEZRkBhtQ?= =?us-ascii?Q?eGgiCpEqE6XO71cin7n00bY/bXWyPE6Q1iebLB8zs12W+L4n2sq7MKVqR5et?= =?us-ascii?Q?QlQH07+bJ+DzBU6XJNKpWYLnSpSSz9gL1IsCxxiSWTARppFsY9/a3fQC7AcV?= =?us-ascii?Q?+DBdmnBgRrilFP894Se3wO/ATkiR8bkEaCWJ3+NaY5XlbBwqZSCQHSDjUMUe?= =?us-ascii?Q?kORXC3q2Upd7KN1frNr17WtX6YUJd83ac/ceM/2dsuhQk0OLM7WzfeXTlTG7?= =?us-ascii?Q?K79b3pv3sX3l4oHdfSQnjTJU4OfR0EZ76VrqI+Bqw32jdJYqMxiQ9c/k1Kes?= =?us-ascii?Q?yl6zzxstBewOCfqVwnXO6IzNDEVxQY1noM1POzhAAUTdrWkKQYo7DOQvs6Ly?= =?us-ascii?Q?f1IXtabbE22seGFr1sy1PZDhr4mM1BnfwZrl1buR4CMg7176cq38k/5kDzQK?= =?us-ascii?Q?4jKOGRCKhznWkK35EyrSAEJHpy8y3SlPoXmzw8pEnfcb+A4KuUDrwweeHw3e?= =?us-ascii?Q?hx7ZP4gHBGY/7eZ6ng/w6vCghFWRDAtn/Iqu1+nplZmUdjYsIoxKzc1wCY8L?= =?us-ascii?Q?FVv77OihFzQNVrLbRbVFSoUcUKN14rSKGtdCumt6kA1chbBKBCyax45bjoGB?= =?us-ascii?Q?ty4yfKwOX8JuWM2XJSFXirJY9ulFjUH1sQ0JPnK43qXx59B/smDoieQ4Cg?= =?us-ascii?Q?=3D=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)(12022799006)(1800799024)(376014)(82310400026)(36860700013)(35042699022)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2025 21:18:41.6870 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fbd3c760-4baa-421f-6438-08ddfc791a3d 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: DU2PEPF00028CFE.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB10463 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 FP8 introduces 2 new formats: E5M2 and E4M3. E5M2 follows IEEE conventions for exponents and special values. On the other hand, E4M3 increases the dynamic range by having fewer special values - there is no infinity, and only one encoding for NaN. This has been accounted for in gdb/target-float.c: floatformat_classify and from_target. One particular thing I would like to highlight is that since e4m3 has only 1 NaN encoding - all ones - this will be printed as nan(0x7). You can see this in the test cases later. I would like to ask if there is a better way of handling this? More information about FP8 can be found in the technical paper here: https://arxiv.org/abs/2209.05433 --- gdb/gdbtypes.c | 8 ++++++++ gdb/gdbtypes.h | 2 ++ gdb/target-descriptions.c | 10 ++++++++++ gdb/target-float.c | 12 +++++++++++- gdbsupport/tdesc.cc | 4 +++- gdbsupport/tdesc.h | 2 ++ include/floatformat.h | 5 +++++ 7 files changed, 41 insertions(+), 2 deletions(-) diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 24e6d0bf8f5..f07c259e25b 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -79,6 +79,14 @@ const struct rank NS_INTEGER_POINTER_CONVERSION_BADNESS = {3,0}; const struct rank VARARG_BADNESS = {4, 0}; /* Floatformat pairs. */ +const struct floatformat *floatformats_fp8_e5m2[BFD_ENDIAN_UNKNOWN] = { + &floatformat_fp8_e5m2_big, + &floatformat_fp8_e5m2_little +}; +const struct floatformat *floatformats_fp8_e4m3[BFD_ENDIAN_UNKNOWN] = { + &floatformat_fp8_e4m3_big, + &floatformat_fp8_e4m3_little +}; const struct floatformat *floatformats_ieee_half[BFD_ENDIAN_UNKNOWN] = { &floatformat_ieee_half_big, &floatformat_ieee_half_little diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 75c77b3a90c..6faffb4217d 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -2209,6 +2209,8 @@ extern const struct floatformat *floatformats_ieee_double_littlebyte_bigword[BFD extern const struct floatformat *floatformats_i387_ext[BFD_ENDIAN_UNKNOWN]; extern const struct floatformat *floatformats_m68881_ext[BFD_ENDIAN_UNKNOWN]; extern const struct floatformat *floatformats_arm_ext[BFD_ENDIAN_UNKNOWN]; +extern const struct floatformat *floatformats_fp8_e5m2[BFD_ENDIAN_UNKNOWN]; +extern const struct floatformat *floatformats_fp8_e4m3[BFD_ENDIAN_UNKNOWN]; extern const struct floatformat *floatformats_ia64_spill[BFD_ENDIAN_UNKNOWN]; extern const struct floatformat *floatformats_vax_f[BFD_ENDIAN_UNKNOWN]; extern const struct floatformat *floatformats_vax_d[BFD_ENDIAN_UNKNOWN]; diff --git a/gdb/target-descriptions.c b/gdb/target-descriptions.c index dc5fbacfebd..9f9cc9ad95f 100644 --- a/gdb/target-descriptions.c +++ b/gdb/target-descriptions.c @@ -147,6 +147,16 @@ make_gdb_type (struct gdbarch *gdbarch, struct tdesc_type *ttype) m_type = init_float_type (alloc, -1, "builtin_type_bfloat16", floatformats_bfloat16); return; + + case TDESC_TYPE_FP8_E5M2: + m_type = init_float_type (alloc, -1, "builtin_type_fp8_e5m2", + floatformats_fp8_e5m2); + return; + + case TDESC_TYPE_FP8_E4M3: + m_type = init_float_type (alloc, -1, "builtin_type_fp8_e4m3", + floatformats_fp8_e4m3); + return; } internal_error ("Type \"%s\" has an unknown kind %d", diff --git a/gdb/target-float.c b/gdb/target-float.c index 9b0376f2909..d0068e9f453 100644 --- a/gdb/target-float.c +++ b/gdb/target-float.c @@ -396,6 +396,12 @@ floatformat_classify (const struct floatformat *fmt, if (exponent == fmt->exp_nan) { + if (fmt->totalsize == 8 && fmt->exp_len == 4) + { + if ((mant & 0b111) == 0b111) + return float_nan; + return float_normal; + } if (mant_zero) return float_infinite; else @@ -1287,7 +1293,11 @@ mpfr_float_ops::from_target (const struct floatformat *fmt, mant_off = fmt->man_start; mpfr_set_zero (to.val, 0); - special_exponent = exponent == 0 || exponent == fmt->exp_nan; + /* If format is FP8 E4M3, then we handle the case of NaN above, and there is + no inf. */ + special_exponent = (exponent == 0) + || (!(fmt->totalsize == 8 && fmt->exp_len == 4) + && (exponent == fmt->exp_nan)); /* Don't bias NaNs. Use minimum exponent for denorms. For simplicity, we don't check for zero as the exponent doesn't matter. diff --git a/gdbsupport/tdesc.cc b/gdbsupport/tdesc.cc index ed92c864732..2b029484e51 100644 --- a/gdbsupport/tdesc.cc +++ b/gdbsupport/tdesc.cc @@ -54,7 +54,9 @@ static tdesc_type_builtin tdesc_predefined_types[] = { "ieee_double", TDESC_TYPE_IEEE_DOUBLE }, { "arm_fpa_ext", TDESC_TYPE_ARM_FPA_EXT }, { "i387_ext", TDESC_TYPE_I387_EXT }, - { "bfloat16", TDESC_TYPE_BFLOAT16 } + { "bfloat16", TDESC_TYPE_BFLOAT16 }, + { "fp8_e5m2", TDESC_TYPE_FP8_E5M2 }, + { "fp8_e4m3", TDESC_TYPE_FP8_E4M3 } }; void tdesc_feature::accept (tdesc_element_visitor &v) const diff --git a/gdbsupport/tdesc.h b/gdbsupport/tdesc.h index 6bf66ad3dcd..f898f49647e 100644 --- a/gdbsupport/tdesc.h +++ b/gdbsupport/tdesc.h @@ -176,6 +176,8 @@ enum tdesc_type_kind TDESC_TYPE_ARM_FPA_EXT, TDESC_TYPE_I387_EXT, TDESC_TYPE_BFLOAT16, + TDESC_TYPE_FP8_E5M2, + TDESC_TYPE_FP8_E4M3, /* Types defined by a target feature. */ TDESC_TYPE_VECTOR, diff --git a/include/floatformat.h b/include/floatformat.h index b65968a8755..dadb5a217aa 100644 --- a/include/floatformat.h +++ b/include/floatformat.h @@ -136,6 +136,11 @@ extern const struct floatformat floatformat_ibm_long_double_little; /* bfloat16. */ extern const struct floatformat floatformat_bfloat16_big; extern const struct floatformat floatformat_bfloat16_little; +/* fp8. */ +extern const struct floatformat floatformat_fp8_e5m2_big; +extern const struct floatformat floatformat_fp8_e5m2_little; +extern const struct floatformat floatformat_fp8_e4m3_big; +extern const struct floatformat floatformat_fp8_e4m3_little; /* Convert from FMT to a double. FROM is the address of the extended float. -- 2.45.2