From patchwork Mon Jul 22 09:30:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudio Bantaloukas X-Patchwork-Id: 1963151 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=bIw9/wrL; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=bIw9/wrL; 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 4WSFS75x0Jz1yZ7 for ; Mon, 22 Jul 2024 19:32:39 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 18758385DC1E for ; Mon, 22 Jul 2024 09:32:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on20601.outbound.protection.outlook.com [IPv6:2a01:111:f403:2608::601]) by sourceware.org (Postfix) with ESMTPS id 264D5385DC1E for ; Mon, 22 Jul 2024 09:30:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 264D5385DC1E 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 264D5385DC1E Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2608::601 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1721640632; cv=pass; b=OZ7vaRF619PIsnWp6gcs9XciF/vlkOGpDRZ7JJrpB5PGk1CYBi2igmdDpUX7Vt//pijQIvbuZsRvP0thAJ+T1IvDjutTxsMEPGI17nn18+B9oUDFJM5mpFd39X+wLev+m8GlBzFvz1hCGbg92Qe8apBhlCURkaZz9HtQhjoDRsA= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1721640632; c=relaxed/simple; bh=P3PvjiqhxRhllyciW0FoqM/TpLY86CXMr55qjoT/vSo=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=TGmyiXy2Wy1Mz23ijq4tp43dRS9U4aFYAKBSobvxABGtPEKkXQ7y04NT85iTKTgfKLfvy+Vwl4fGF//UKVY0g6ndgXpfdw5T1KpzgJkeI5kbObw4SCSbqdnBKmcl5WG4HZoWK6n8hieNnvHLyMx8BO6n+3SuKKwJW9PtFFhS9M4= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=t9ZxwqDIwC9SI87xq8ickCQFGTe37SQuMvUPvYVACG2ob8H83P64iRb249i+QgV9RpQZURgqeWO6gx+Vj4HxKdoXmIgm+J2Bwqokah3F8A2/2injtEVfViSWDoGs2JNYBGacDXZlAmkNhxUj74WgepOUNu+Lga0avzgkH/kJmLrm6wdgJqoHINU7KRlOtxJWySBHbAdu4VG/A/+ab+rxJkTTWxfxx8lf870KFhgvLwjdBTqMACa26izCrxS5jilHVUgUqFXi/SrJFWUzAFBZAch61qkh1NknV+5AgdIA3V3eQwXJfYi2dOJmCzk1I6q4Qbsk+yocy1BfhfTtui4bqA== 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=RHGiG/qiFHtQOnXNmRAoBiwMX4JIoHuL78asLGjDWog=; b=HYSeMywv01Mn/XjLljSNKGNkdrrpFE8tnTTEIHAOpD+Z8zDC613Qse3CUVXOsxz+DsNAWFH1QTJQRCcS4FDhPSTPJOL2+hNkghCym8nP3/C7aeU4/XYQoL7yS2WtEsZFEchWnLgVKCx4dDC7lDdJM90ckgG3DLFecCoA+1HZM9x15fXBQF8zhw4hIzk+xzwXJXl66OuA6VzTScsJc/c/0I5HtMyzKh1+/SRua+PxJsZSeR1llRP7R3kUpToBs7Vb3xTKUwhIDKDIqQ7F0h5lsvVCxSS/fKd6DW/R5ziBRisT+2jVZDBzpXOOOEuXM7n1fadchTGB+MWA8DhTAp22Kg== 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=RHGiG/qiFHtQOnXNmRAoBiwMX4JIoHuL78asLGjDWog=; b=bIw9/wrLnCk7WYr3HVQk9kPOasy2wuxpWSfCIPv/i1dgWvCJiI/oXoIViiXT95e9f8dqHxEf5qE8lV8q1ZHHALjFSO+WTTWmHNtnNVam9HdD2Htlf/9LqOoyD2vnx05be0/B7lh0DvPU5Lbn1VMkVeWfbJkDXKUY6qX4+qiLKXY= Received: from AS4P189CA0043.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:5dd::19) by AS1PR08MB7514.eurprd08.prod.outlook.com (2603:10a6:20b:481::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.28; Mon, 22 Jul 2024 09:30:25 +0000 Received: from AM3PEPF00009BA1.eurprd04.prod.outlook.com (2603:10a6:20b:5dd:cafe::71) by AS4P189CA0043.outlook.office365.com (2603:10a6:20b:5dd::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.19 via Frontend Transport; Mon, 22 Jul 2024 09:30:25 +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 AM3PEPF00009BA1.mail.protection.outlook.com (10.167.16.26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7784.11 via Frontend Transport; Mon, 22 Jul 2024 09:30:25 +0000 Received: ("Tessian outbound 0808e8e76ea3:v365"); Mon, 22 Jul 2024 09:30:24 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: de833b864d755bd5 X-CR-MTA-TID: 64aa7808 Received: from L250beec1d2da.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D21F481C-67B5-4479-BAFF-026F03221651.1; Mon, 22 Jul 2024 09:30:17 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L250beec1d2da.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 22 Jul 2024 09:30:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NHFraOUmAhKrZpH5pw648q+i25KYozsRUyg0/chUns/QI26e6YrXIwsv5Ee+vT7iB/WTsagsFja1KR6q9s3DBmi4zYjqtPJclV7MJ9sWkKFF6jLMfmkl6srqMtZ8R+0HvzZwZ/kXuEgAX946iUWmf5GlyLl4PvEkFQCWWc/o8hDVvLGwhgsZD5d4tVcvohPd22Cd9JIhL+xa86zG/KBmaq76K8GmL/kIvpgWy45s0kZie1Xh/0ad+gjPE0cqPKbg3QGeuhz6jWnKL1PUoU9kUTbgprqaTbIOgJJ7NKx11i/Zxde1Hmpac2w0t9oFwWXMLb0qGJpHscBCG8/PTSOItw== 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=RHGiG/qiFHtQOnXNmRAoBiwMX4JIoHuL78asLGjDWog=; b=xb94v6o+r8+5lU5uCaN+65XiTWkrpj5i/ou5noT2YwuXv4hcmr8l8ef2Xb2h9Kd7/rJ8CnDkkGEFGtfFdTeLjLs6ffu6U9kcwSX2XllWJiS2aqx4l/c0RjqCpKCtFCpXKU8p5btfXY/tIXZ2IUzcLnrkMM+sIOFSrmGCCFl/y7FDsZyik+2MzI0TrEGWjzZB3mZaFlK9ft4064n2r1eEZGvBno/zyya8gbd/dlf0KC+Xl7GkkaETv2Raj4vx5nhCe/G9DcioAGU1f8qO+Cu0UbpklqGdORUo5LV1L+P5U/ScionxJUzoLZ/2TLoKsYRXebCh5FpPxLZZMRgE7PUqaA== 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=RHGiG/qiFHtQOnXNmRAoBiwMX4JIoHuL78asLGjDWog=; b=bIw9/wrLnCk7WYr3HVQk9kPOasy2wuxpWSfCIPv/i1dgWvCJiI/oXoIViiXT95e9f8dqHxEf5qE8lV8q1ZHHALjFSO+WTTWmHNtnNVam9HdD2Htlf/9LqOoyD2vnx05be0/B7lh0DvPU5Lbn1VMkVeWfbJkDXKUY6qX4+qiLKXY= Received: from PR3P195CA0018.EURP195.PROD.OUTLOOK.COM (2603:10a6:102:b6::23) by DBBPR08MB10433.eurprd08.prod.outlook.com (2603:10a6:10:52f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20; Mon, 22 Jul 2024 09:30:14 +0000 Received: from AM4PEPF00025F98.EURPRD83.prod.outlook.com (2603:10a6:102:b6:cafe::1c) by PR3P195CA0018.outlook.office365.com (2603:10a6:102:b6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.18 via Frontend Transport; Mon, 22 Jul 2024 09:30:14 +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 AM4PEPF00025F98.mail.protection.outlook.com (10.167.16.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7784.5 via Frontend Transport; Mon, 22 Jul 2024 09:30:14 +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; Mon, 22 Jul 2024 09:30:14 +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; Mon, 22 Jul 2024 09:30:14 +0000 Received: from 294832bd688a.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; Mon, 22 Jul 2024 09:30:14 +0000 From: Claudio Bantaloukas To: CC: Claudio Bantaloukas Subject: [PATCH 3/3] aarch64: add fpm register helper functions. Date: Mon, 22 Jul 2024 09:30:11 +0000 Message-ID: <20240722093011.3115878-4-claudio.bantaloukas@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240722093011.3115878-1-claudio.bantaloukas@arm.com> References: <20240722093011.3115878-1-claudio.bantaloukas@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM4PEPF00025F98:EE_|DBBPR08MB10433:EE_|AM3PEPF00009BA1:EE_|AS1PR08MB7514:EE_ X-MS-Office365-Filtering-Correlation-Id: 92f3e2bc-ff68-4d75-a8cf-08dcaa30eab2 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|36860700013|376014|1800799024|82310400026; X-Microsoft-Antispam-Message-Info-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EUqDaDtg/Moy0puUtd/ZeDmQrcyxb7yx/3IEU1sfBV6PPjJRKvjO0MhYJn7+HTB3qtFZjE91r8DtasWuy0Xu+g/pnEJVA4zR7TTZDfVegCRqBzaE722CuVdsrcx6sWGtMMTnH0hDtuNZ+Y+7+6T2KpBmhFxxhFgrKMydi6LCYFlY787pG2wxcZ6R3XettwTcBvVGVjF2y67XZQnigKcoLGYS+GDr8M8A1auZ8BbtXDBaGX1ZicjtNBZ8omrx57muFjhPrXntzN97bkUXIIMKzWwjEi+O8TsomA3MoiIsBXCXmOZwbPCkC7mwgCOJ0ugzEEBH 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)(36860700013)(376014)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB10433 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:102:b6::23]; domain=PR3P195CA0018.EURP195.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF00009BA1.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 1d61d488-1ae8-4acb-f3d6-08dcaa30e46e X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|35042699022|36860700013|34020700016|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?DpsuD+a1ZQS/s7lCPBhc/3SXa6XZe9n?= =?utf-8?q?Zvohnij6jSpnSKSa4Y8LTWoLhMiVuDn/gxXXwrhOdC2s6Iz7uBweGG36L86QTi4pF?= =?utf-8?q?uAOimU7zwL0qOjeKxPe9qqYMoaAq2Zg14kTo+faIL5GtcZcoECX68f4c0PbNJ9M78?= =?utf-8?q?uWhS5pxrH96hbb5a57prqURL9ZHyBvK5YR+ZFqi/4fKZxRk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goasOj0Mk29+Ai7MtgFAKM6?= =?utf-8?q?m7ygFJJknTWtYoJ9cTv4sA57mCfy5lEPXFQQitafgYAJkP7d4NUnrcw1JkwQ9/xKN?= =?utf-8?q?I6Xim0Kua6JgNUGGjoz8/xqIqBE1JJsF2ecxfyShFlb5IN0Q61suWUjV4HYfxgxj4?= =?utf-8?q?7RdfGnhp6Fokn5gYL2cYDkqex9YvRD9Vo1rZqpmuZvbj9XlQSxqBZKaMjBocAXY5B?= =?utf-8?q?r7rIJLE0EboHXDjZzUTADm+4H8KIHUXvt+N7j7FhVguQU3s5vYBcNs5+VKNjU3VWk?= =?utf-8?q?0/KBPri3FUCG?= 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)(82310400026)(376014)(35042699022)(36860700013)(34020700016)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 09:30:25.1872 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 92f3e2bc-ff68-4d75-a8cf-08dcaa30eab2 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: AM3PEPF00009BA1.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR08MB7514 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, 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. gcc/ChangeLog: * config/aarch64/arm_acle.h (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.c: New test of fpmr helper functions. --- gcc/config/aarch64/arm_acle.h | 37 +++++++++++++ .../gcc.target/aarch64/acle/fp8-helpers.c | 52 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers.c diff --git a/gcc/config/aarch64/arm_acle.h b/gcc/config/aarch64/arm_acle.h index 2aa681090fa..4f0c600582a 100644 --- a/gcc/config/aarch64/arm_acle.h +++ b/gcc/config/aarch64/arm_acle.h @@ -385,6 +385,43 @@ __rndrrs (uint64_t *__res) #pragma GCC pop_options +#ifdef __ARM_FEATURE_FP8 + +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)) + +#endif + #ifdef __cplusplus } #endif diff --git a/gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers.c b/gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers.c new file mode 100644 index 00000000000..e654326c387 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/acle/fp8-helpers.c @@ -0,0 +1,52 @@ +/* Test the fp8 ACLE helper functions. */ +/* { dg-do compile } */ +/* { dg-options "-std=c90 -pedantic-errors -O1 -march=armv9.4-a+fp8" } */ + +#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 +}