From patchwork Fri Jul 26 16:32:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudio Bantaloukas X-Patchwork-Id: 1965358 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=nwa329X6; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=nwa329X6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WVtdH5sxRz1ybY for ; Sat, 27 Jul 2024 02:34:43 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 19BEC3858414 for ; Fri, 26 Jul 2024 16:34:42 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20600.outbound.protection.outlook.com [IPv6:2a01:111:f403:2613::600]) by sourceware.org (Postfix) with ESMTPS id 123AC3858D26 for ; Fri, 26 Jul 2024 16:33:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 123AC3858D26 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 123AC3858D26 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2613::600 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1722011600; cv=pass; b=wn7t0hNZGApsqDvScIg1sM8RXXFW+pzc1DKKEmQXOvvrzm64QMGn51F1R8sUWPxv0u7jGvKLdi80f2Q+uZ/xZ9EDCExnsekYdtdp2HpAzg75RlBM3ErTq4DdsV7xMzLEvLtFA8G7dQf/d7c03n57cvUNMq9pLqvFHIcv/KM/kdk= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1722011600; c=relaxed/simple; bh=rndiWZlUwuxvqzVUaIHJMWWzbTTzlfsM0Fqjy7GDZAw=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=XNmjeRRvOcoaRHXrLGJE9qkUB1b3SAmK6QqZK8cI6KpZufkWnd8eYtsOiLdO7rmmzVZMcFyBbuhIThyzQQsnJNJwncMJq0I3znrbdVoj8cAKAxRYx8XTECHxlj2+wOIc1HRLWzwx5rG0eM3OoEwGzVu2Yv1yR4c5jiYv1URLeuY= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=SziXeuCW/zYwgDzD9jfwXtXP1UesqvSIpytoKKb4d5ea75OD+YWyw1SZO05VlpK0Huv5r+DdjR+PuVzbYjwXpNXEdbhrKSTU1oDhBCE8UnV4r7WxKKEDb0DoWInHiG5cMOYvxatYYuDk4xNTZUB9gKeyvLQ4JKuG7a6UqqdFRnu3tYpabnU9ABzf+7446/k4bBR/KzqpySFrGNrjva/dlwvy/kKMpKqygJxyiIr9DOzbTjk92iPlRtS4gI/rvMQKWpe+pl0qdsFZ6Vp+7ZlmszmHV7GPCyTcsu7Tj/gBGMvxqtvFH80tROkGwtTluC00kuKBgCOT73pdcLU+IIKP6A== 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=Kow6t/S8g8A0iwcSltDIBbwK2Lv6rOFM5imZ5Vb6OcM=; b=Cs1rYwZxWZGpxrNbTOr+ez4TGzQ5ZDHBh9Z4F/rOrxJxz43bVc6pizSbbKWp0kAYWREXURsoYIX1hrajTfpM0LqvV/G2gwqYq5n/aiWpP27Gt5XUMFEHVWCLQec9OVOtttw09z7/8pU+yC47GPJlJKtW0nRU6jDENVpW6xwyommN51ZmYUmrOJ4425XFBtUdEseMTh0WP6XknBfJRQKym8957HpH/ZJsYA0B4aKnpvMWYyD2KpPJhglwMKAnIMA5dF4fLS3oL3/of6KqMR+xI36sBUOuk8REd55Eao+kEIy6iZnYwKh/rwJL8MO7gHdHPWVo5rY01pl05rzA2GOIJg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.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=Kow6t/S8g8A0iwcSltDIBbwK2Lv6rOFM5imZ5Vb6OcM=; b=nwa329X6J2XHala6iOL27Lq0BQirRHWH/UdlKPbDKUKkEdEn5IIXVwxUfN/oXS19LAypgq8n4V8PFd14vFibvT1cDN+G+1w5ArBxTZANaA843W/adzGBunxqzM7EWeop/mq9Hty3ESMiA8bhA7cPkh3UHopbB/pVTZYx7Z0fz+w= Received: from AS8PR04CA0198.eurprd04.prod.outlook.com (2603:10a6:20b:2f3::23) by GVXPR08MB7871.eurprd08.prod.outlook.com (2603:10a6:150:17::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20; Fri, 26 Jul 2024 16:33:12 +0000 Received: from AMS0EPF000001A9.eurprd05.prod.outlook.com (2603:10a6:20b:2f3:cafe::e1) by AS8PR04CA0198.outlook.office365.com (2603:10a6:20b:2f3::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29 via Frontend Transport; Fri, 26 Jul 2024 16:33:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) 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 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS0EPF000001A9.mail.protection.outlook.com (10.167.16.149) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7784.11 via Frontend Transport; Fri, 26 Jul 2024 16:33:10 +0000 Received: ("Tessian outbound ab09e808a502:v365"); Fri, 26 Jul 2024 16:33:10 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 093cf11ee93b300b X-CR-MTA-TID: 64aa7808 Received: from L22c1f6415742.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0366D257-02D2-4EC3-AB42-A7F65D265AE8.1; Fri, 26 Jul 2024 16:33:03 +0000 Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L22c1f6415742.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 26 Jul 2024 16:33:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BifBA7OABvOGbcVhM8ivxQP/0WyeZ5V6Xe4QimwhcvfJ+Ip9TVSN1SJrx1zCaXYVE4aeCdXBKFrSCOC31xwu84aWbtDYpI2VIC/cddIVFEbmNC1r/q2/CFIqBRzOXFZoPM8TJ/gWNvSkPJHSBJSkZqc3ReSN+++nIbSz2Cde6ZqEkS52ATVwcBuQdrKgeqBu84wE5GxgXugwPgtnf7KR99LT9sL4O/i/Ecr59nllXb0OgaQbyb8M7lnq8DGHENPYICO+di60ODMJPPJlSW1N7H3w4B4VBbAUv2h6oJAYreYEBh6s9HV7ti0kbtmDGblhGOLxACXB8yKXJyEjqxPtmg== 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=Kow6t/S8g8A0iwcSltDIBbwK2Lv6rOFM5imZ5Vb6OcM=; b=L9uTnAkfe7NMOoOT2v7zrJ1/CKdT4XTiLewO4soS8x+6xdDmBXIWzeNAVsAXH64P//azOa9xdlQQ8kAnif8uL56kk/ortoUBoQsLk8QGtLIgWWXB8CcGAm5yQae4kjstsGeg722rrTh+hWK6iN1HHrCYmbKD0tl8boJYOGeVnuUs+jCrFdtyWt2WR4/fNNEoMOfFNx7g4A01hsXWtlyIxaeiLC1fKsfxxa7pX5MOXZGuAo7l5TaCm8L7BgafiI6CPWS/Wwe5km/fgRC/iT+H2edw/uJ+Dy3sayclipSsY+HdZuMGamwZztXQgaxIdgs1OzDw7/IHcC3NJ9jltSctDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.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=Kow6t/S8g8A0iwcSltDIBbwK2Lv6rOFM5imZ5Vb6OcM=; b=nwa329X6J2XHala6iOL27Lq0BQirRHWH/UdlKPbDKUKkEdEn5IIXVwxUfN/oXS19LAypgq8n4V8PFd14vFibvT1cDN+G+1w5ArBxTZANaA843W/adzGBunxqzM7EWeop/mq9Hty3ESMiA8bhA7cPkh3UHopbB/pVTZYx7Z0fz+w= Received: from AS4P195CA0012.EURP195.PROD.OUTLOOK.COM (2603:10a6:20b:5e2::18) by AM8PR08MB5666.eurprd08.prod.outlook.com (2603:10a6:20b:1de::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29; Fri, 26 Jul 2024 16:33:01 +0000 Received: from AM4PEPF00027A67.eurprd04.prod.outlook.com (2603:10a6:20b:5e2:cafe::eb) by AS4P195CA0012.outlook.office365.com (2603:10a6:20b:5e2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.29 via Frontend Transport; Fri, 26 Jul 2024 16:33:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) 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 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM4PEPF00027A67.mail.protection.outlook.com (10.167.16.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7784.11 via Frontend Transport; Fri, 26 Jul 2024 16:33:00 +0000 Received: from AZ-NEU-EXJ01.Arm.com (10.240.25.132) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 26 Jul 2024 16:32:59 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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; Fri, 26 Jul 2024 16:32:57 +0000 Received: from 221664dbf3aa.euhpc2.arm.com (10.58.86.32) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 26 Jul 2024 16:32:57 +0000 From: Claudio Bantaloukas To: CC: Claudio Bantaloukas Subject: [PATCH v3 3/3] aarch64: Add fpm register helper functions. Date: Fri, 26 Jul 2024 16:32:54 +0000 Message-ID: <20240726163254.1174686-4-claudio.bantaloukas@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240726163254.1174686-1-claudio.bantaloukas@arm.com> References: <20240726163254.1174686-1-claudio.bantaloukas@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM4PEPF00027A67:EE_|AM8PR08MB5666:EE_|AMS0EPF000001A9:EE_|GVXPR08MB7871:EE_ X-MS-Office365-Filtering-Correlation-Id: 08e4a4bf-2ce0-48c1-4589-08dcad90a32e x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-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bwi+vCR9m+dSmwzpQq/pQUno/5r+Dzqh5wkf3pN7dfaJK6m4fm1cRf/YQ4pVePfzLbUeqn/DV2Shpj+NVqWa+uYt1s4vPP7XKT2p1RWE/7BolBYXTYfbTvYjE2lAm9iPHWtizb+Bv6Fb+7I8RvWP7tcoz/Lw6LSRY5w3B0vvY5dDXY6XdOQ2duDT6X7KZgtV76XlHTfZSPPFvzk5XRcbGuP8kMHqBOIKObUMFxclc10NlkB5qjfnFperevJVHWgZjA1hQtcvTgPbTveBtQkz23msO3i2dADLglAF1BskUjp0Ugfa5JyUl70rgp9aVYIbB/DZKsyM0MDbqGJUK/B9s3smhkrqg== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(36860700013)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5666 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:5e2::18]; domain=AS4P195CA0012.EURP195.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF000001A9.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: daec5d56-f82b-4773-02bd-08dcad909d8a X-Microsoft-Antispam: BCL:0; ARA:13230040|35042699022|82310400026|36860700013|34020700016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?bjnQ+42MX24XCshkRRKOCPa6aFqN4NJ?= =?utf-8?q?m2CAKjQRv/wutqz4o6k8DG87GP/qSGOmUAXMyC3pVmyV5Oi75qUHA9njEHn/QAlhD?= =?utf-8?q?F6ggKILgKoqWexdwrPEAZNszS0/ndCs5JvAZLe+SUcvD88VxmFHZ5P6CMTpfkAeKG?= =?utf-8?q?66dZjJYG4nndFMGsiYhg5GkK6Cz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DYn204jLcaC3fvJtvLeWy4y?= =?utf-8?q?c+VwqcSNsSFEqCjSCkUjiJee9tpBnNQrmt6DsYRpO8PfAIeEsCh6FRGGaliYDBjak?= =?utf-8?q?gb6UXGrzsIskGxQizUT8w2ZazmH8rOTACjmrl5BsjrDE8hUyL4XeZypHUeX+WrKJg?= =?utf-8?q?37wlEiG5WXhuUY67YebD2r6NY61voV1KpEYi/DGyWLdAfxQMp5urObGPM9ZjWDLxs?= =?utf-8?q?CN/FxgbkR+xYTm6IardO58EvTGhn5lTufAaX0DeRCbKXhBNxyP5D5+3wBfeGqKgnK?= =?utf-8?q?tzCGyyUj3nMqmNzjzT8OFsCQWNRNLc+kpA=3D=3D?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(35042699022)(82310400026)(36860700013)(34020700016)(376014)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2024 16:33:10.3757 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 08e4a4bf-2ce0-48c1-4589-08dcad90a32e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF000001A9.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB7871 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_SHORT, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org The ACLE declares several helper types and functions to facilitate construction of `fpm` arguments. These are available when one of the arm_neon.h, arm_sve.h, or arm_sme.h headers is included. These helpers don't map to specific FP8 instructions and there's no expectation that they will produce a given code sequence, they're just an abstraction and an aid to the programmer. Thus they are implemented in a new header file arm_private_fp8.h Users are not expected to include this file, as it is a mere implementation detail, subject to change. A check is included to guard against direct inclusion. gcc/ChangeLog: * config.gcc (extra_headers): Install arm_private_fp8.h. * config/aarch64/arm_neon.h: Include arm_private_fp8.h. * config/aarch64/arm_sve.h: Likewise. * config/aarch64/arm_private_fp8.h: New file (fpm_t): New type representing fpmr values. (enum __ARM_FPM_FORMAT): New enum representing valid fp8 formats. (enum __ARM_FPM_OVERFLOW): New enum representing how some fp8 calculations work. (__arm_fpm_init): New. (__arm_set_fpm_src1_format): Likewise. (__arm_set_fpm_src2_format): Likewise. (__arm_set_fpm_dst_format): Likewise. (__arm_set_fpm_overflow_cvt): Likewise. (__arm_set_fpm_overflow_mul): Likewise. (__arm_set_fpm_lscale): Likewise. (__arm_set_fpm_lscale2): Likewise. (__arm_set_fpm_nscale): Likewise. gcc/testsuite/ChangeLog: * gcc.target/aarch64/acle/fp8-helpers-neon.c: New test of fpmr helper functions. * gcc.target/aarch64/acle/fp8-helpers-sve.c: New test of fpmr helper functions presence. * gcc.target/aarch64/acle/fp8-helpers-sme.c: New test of fpmr helper functions presence. --- gcc/config.gcc | 2 +- gcc/config/aarch64/arm_neon.h | 1 + gcc/config/aarch64/arm_private_fp8.h | 80 +++++++++++++++++++ gcc/config/aarch64/arm_sve.h | 1 + .../aarch64/acle/fp8-helpers-neon.c | 53 ++++++++++++ .../gcc.target/aarch64/acle/fp8-helpers-sme.c | 12 +++ .../gcc.target/aarch64/acle/fp8-helpers-sve.c | 12 +++ 7 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 gcc/config/aarch64/arm_private_fp8.h create mode 100644 gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers-neon.c create mode 100644 gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers-sme.c create mode 100644 gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers-sve.c diff --git a/gcc/config.gcc b/gcc/config.gcc index 7453ade0782..a36dd1bcbc6 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -347,7 +347,7 @@ m32c*-*-*) ;; aarch64*-*-*) cpu_type=aarch64 - extra_headers="arm_fp16.h arm_neon.h arm_bf16.h arm_acle.h arm_sve.h arm_sme.h arm_neon_sve_bridge.h" + extra_headers="arm_fp16.h arm_neon.h arm_bf16.h arm_acle.h arm_sve.h arm_sme.h arm_neon_sve_bridge.h arm_private_fp8.h" c_target_objs="aarch64-c.o" cxx_target_objs="aarch64-c.o" d_target_objs="aarch64-d.o" diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h index c4a09528ffd..e376685489d 100644 --- a/gcc/config/aarch64/arm_neon.h +++ b/gcc/config/aarch64/arm_neon.h @@ -30,6 +30,7 @@ #pragma GCC push_options #pragma GCC target ("+nothing+simd") +#include #pragma GCC aarch64 "arm_neon.h" #include diff --git a/gcc/config/aarch64/arm_private_fp8.h b/gcc/config/aarch64/arm_private_fp8.h new file mode 100644 index 00000000000..ba93bc526c1 --- /dev/null +++ b/gcc/config/aarch64/arm_private_fp8.h @@ -0,0 +1,80 @@ +/* AArch64 FP8 helper functions. + Do not include this file directly. Use one of arm_neon.h + arm_sme.h arm_sve.h instead. + + Copyright (C) 2024 Free Software Foundation, Inc. + Contributed by ARM Ltd. + + This file is part of GCC. + + GCC 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, or (at your + option) any later version. + + GCC 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. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +#ifndef _GCC_ARM_PRIVATE_FP8_H +#define _GCC_ARM_PRIVATE_FP8_H + +#if !defined(_AARCH64_NEON_H_) && !defined(_ARM_SVE_H_) +#error "This file should not be used standalone. Please include arm_neon.h or arm_sve.h instead." +#endif + +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + + typedef uint64_t fpm_t; + + enum __ARM_FPM_FORMAT + { + __ARM_FPM_E5M2, + __ARM_FPM_E4M3, + }; + + enum __ARM_FPM_OVERFLOW + { + __ARM_FPM_INFNAN, + __ARM_FPM_SATURATE, + }; + +#define __arm_fpm_init() (0) + +#define __arm_set_fpm_src1_format(__fpm, __format) \ + ((__fpm & ~(uint64_t)0x7) | (__format & (uint64_t)0x7)) +#define __arm_set_fpm_src2_format(__fpm, __format) \ + ((__fpm & ~((uint64_t)0x7 << 3)) | ((__format & (uint64_t)0x7) << 3)) +#define __arm_set_fpm_dst_format(__fpm, __format) \ + ((__fpm & ~((uint64_t)0x7 << 6)) | ((__format & (uint64_t)0x7) << 6)) +#define __arm_set_fpm_overflow_cvt(__fpm, __behaviour) \ + ((__fpm & ~((uint64_t)0x1 << 15)) | ((__behaviour & (uint64_t)0x1) << 15)) +#define __arm_set_fpm_overflow_mul(__fpm, __behaviour) \ + ((__fpm & ~((uint64_t)0x1 << 14)) | ((__behaviour & (uint64_t)0x1) << 14)) +#define __arm_set_fpm_lscale(__fpm, __scale) \ + ((__fpm & ~((uint64_t)0x7f << 16)) | ((__scale & (uint64_t)0x7f) << 16)) +#define __arm_set_fpm_lscale2(__fpm, __scale) \ + ((__fpm & ~((uint64_t)0x3f << 32)) | ((__scale & (uint64_t)0x3f) << 32)) +#define __arm_set_fpm_nscale(__fpm, __scale) \ + ((__fpm & ~((uint64_t)0xff << 24)) | ((__scale & (uint64_t)0xff) << 24)) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/gcc/config/aarch64/arm_sve.h b/gcc/config/aarch64/arm_sve.h index c2db63736a1..aa0bd9909f9 100644 --- a/gcc/config/aarch64/arm_sve.h +++ b/gcc/config/aarch64/arm_sve.h @@ -26,6 +26,7 @@ #define _ARM_SVE_H_ #include +#include #include typedef __fp16 float16_t; diff --git a/gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers-neon.c b/gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers-neon.c new file mode 100644 index 00000000000..ade99557a29 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers-neon.c @@ -0,0 +1,53 @@ +/* Test the fp8 ACLE helper functions including that they are available. + unconditionally when including arm_neon.h */ +/* { dg-do compile } */ +/* { dg-options "-std=c90 -pedantic-errors -O1 -march=armv8-a" } */ + +#include + +void +test_prepare_fpmr_sysreg () +{ + +#define _S_EQ(expr, expected) \ + _Static_assert (expr == expected, #expr " == " #expected) + + _S_EQ (__arm_fpm_init (), 0); + + /* Bits [2:0] */ + _S_EQ (__arm_set_fpm_src1_format (__arm_fpm_init (), __ARM_FPM_E5M2), 0); + _S_EQ (__arm_set_fpm_src1_format (__arm_fpm_init (), __ARM_FPM_E4M3), 0x1); + + /* Bits [5:3] */ + _S_EQ (__arm_set_fpm_src2_format (__arm_fpm_init (), __ARM_FPM_E5M2), 0); + _S_EQ (__arm_set_fpm_src2_format (__arm_fpm_init (), __ARM_FPM_E4M3), 0x8); + + /* Bits [8:6] */ + _S_EQ (__arm_set_fpm_dst_format (__arm_fpm_init (), __ARM_FPM_E5M2), 0); + _S_EQ (__arm_set_fpm_dst_format (__arm_fpm_init (), __ARM_FPM_E4M3), 0x40); + + /* Bit 14 */ + _S_EQ (__arm_set_fpm_overflow_mul (__arm_fpm_init (), __ARM_FPM_INFNAN), 0); + _S_EQ (__arm_set_fpm_overflow_mul (__arm_fpm_init (), __ARM_FPM_SATURATE), + 0x4000); + + /* Bit 15 */ + _S_EQ (__arm_set_fpm_overflow_cvt (__arm_fpm_init (), __ARM_FPM_INFNAN), 0); + _S_EQ (__arm_set_fpm_overflow_cvt (__arm_fpm_init (), __ARM_FPM_SATURATE), + 0x8000); + + /* Bits [22:16] */ + _S_EQ (__arm_set_fpm_lscale (__arm_fpm_init (), 0), 0); + _S_EQ (__arm_set_fpm_lscale (__arm_fpm_init (), 127), 0x7F0000); + + /* Bits [37:32] */ + _S_EQ (__arm_set_fpm_lscale2 (__arm_fpm_init (), 0), 0); + _S_EQ (__arm_set_fpm_lscale2 (__arm_fpm_init (), 63), 0x3F00000000); + + /* Bits [31:24] */ + _S_EQ (__arm_set_fpm_nscale (__arm_fpm_init (), 0), 0); + _S_EQ (__arm_set_fpm_nscale (__arm_fpm_init (), 127), 0x7F000000); + _S_EQ (__arm_set_fpm_nscale (__arm_fpm_init (), -128), 0x80000000); + +#undef _S_EQ +} diff --git a/gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers-sme.c b/gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers-sme.c new file mode 100644 index 00000000000..5daab730fbe --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers-sme.c @@ -0,0 +1,12 @@ +/* Test availability of the fp8 ACLE helper functions when including arm_sme.h. + */ +/* { dg-do compile } */ +/* { dg-options "-std=c90 -pedantic-errors -O1 -march=armv8-a" } */ + +#include + +void +test_fpmr_helpers_present () +{ + (__arm_fpm_init ()); +} diff --git a/gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers-sve.c b/gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers-sve.c new file mode 100644 index 00000000000..99c5aa90cf4 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers-sve.c @@ -0,0 +1,12 @@ +/* Test availability of the fp8 ACLE helper functions when including arm_sve.h. + */ +/* { dg-do compile } */ +/* { dg-options "-std=c90 -pedantic-errors -O1 -march=armv8-a" } */ + +#include + +void +test_fpmr_helpers_present () +{ + (__arm_fpm_init ()); +}