From patchwork Wed Jul 31 06:29:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudio Bantaloukas X-Patchwork-Id: 1966883 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=fWCzBT6S; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=fWCzBT6S; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4WYhzs2P0kz1yfG for ; Wed, 31 Jul 2024 16:30:33 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 627363860778 for ; Wed, 31 Jul 2024 06:30:31 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on20600.outbound.protection.outlook.com [IPv6:2a01:111:f403:2607::600]) by sourceware.org (Postfix) with ESMTPS id 6091B385B82F for ; Wed, 31 Jul 2024 06:29:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6091B385B82F 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 6091B385B82F Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2607::600 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1722407400; cv=pass; b=ogUQmvVHV9a71zu6+S6NcdNxpcKKHGgH2r1EZmji2Dn2w7yWNdQa2lMCodwRZ8xKXC8LT7AqPKLr8I1/ajL8Q63hlgEjtOG+fEFKTS4DrXmVfsc8VgbrCxVdgMaPfKYCjHXqbu9licA3k7u1YS+xxePogu60/pFBweokSbQq8CI= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1722407400; c=relaxed/simple; bh=2fMrlBJF3C7Y923HUkkADwE6u/Kkomf0G8m5hQFra5U=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=qiAUDnQwNZ32a2DUf1qLNHienfYzkUpvNxYsHX+OmlNEZ+ecGQa0AePHtnGEojdJs1ZW+fzLLWO9Pc1TtOd3C9QItZuyQb9/mF4aSWDfEzcyB5y8YMYIWKXQvIx+BaC+fXIAW4t5SwhAj33jrPeIpnoK3x4DBQ1c6fPqOPy1xNM= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=ON1Y0HVjFdfrDRb5ye+ytXI1WHCfDHrbULZIm/vLRqnrz/Ib/DpGKWeXXYluZOoTndL5O5E+nXLxsu1bdMTt7GgJ98HTw1lZPYne7u05YXFpedmOeU5N+hYAvbsYEZqH/UIY3NLxhFLBpsvTe4ALksr5AkzRpt//d+PAv68aE+uvmKCzVs0oYN+bjHRcwG4whNT4vWo63EGt5dU1eL0+yrA8HEfvF1+B9QNWMO1mDmzhqyaL15y0i4epOo7phDQRU5WKiNpJVZMyURHA2qyMQlA/ieKUJMHGuXAE7sdokz3OHbGJzSxe/l1n/a2+WfPX+H6EUnQkfmqeQVfodZ3PTw== 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=vLsoC7FOo4cW5/Sp+LPSUMhqxIkeC6HQ0XDYcvSqqL8=; b=d9nck67ZbADiq3kfqokVDnGFTMQZF39YsRWX3jjWw9Zu+P/Ax6hghieX6DM6MeXSJQ4fi5ynDkEztiSowIX6YUsYINjgaQBgzj07w3/FIu+f7Eh2JDtgc9JtwOJ0KFB+03QATrXfPTE0ljThb8/J4+TVFXS1sqjA9mQr8LKY0Q0OuJbjQ0oSqcW90yzFXy/ZEFy5BYUNoas/4aMM/ZX0ZZvT75gcPhWTebECbM9tHqH/AaNn6bUPBAP/v4OPTkL5N89nK7oVTGrdhCuN69oYFF+AXSf4TwtLA9LaOUMqTJAKmhEnRyU/nwZXgrU2opgVY9cZ6KHRshCvYVuD4nlsnA== 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=vLsoC7FOo4cW5/Sp+LPSUMhqxIkeC6HQ0XDYcvSqqL8=; b=fWCzBT6SDtFGIV/j04c8V0DFK1Sh7DbKMUetdSP2rojPthiZ99/CL7yYwANcwavdB0AG7X83OfwufQ2jBznov/MhP6O55u+faTL+dkvNaggQ8Rm5ZTZMRO/VlRqppD8jNpLiV45R52NLOKQ4DzMBBSV3/MwhcOppjptEtQT2YPU= Received: from AM0PR04CA0047.eurprd04.prod.outlook.com (2603:10a6:208:1::24) by VI1PR08MB5469.eurprd08.prod.outlook.com (2603:10a6:803:132::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.21; Wed, 31 Jul 2024 06:29:51 +0000 Received: from AM3PEPF0000A79B.eurprd04.prod.outlook.com (2603:10a6:208:1:cafe::a1) by AM0PR04CA0047.outlook.office365.com (2603:10a6:208:1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.34 via Frontend Transport; Wed, 31 Jul 2024 06:29:51 +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 AM3PEPF0000A79B.mail.protection.outlook.com (10.167.16.106) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7828.19 via Frontend Transport; Wed, 31 Jul 2024 06:29:50 +0000 Received: ("Tessian outbound a1d019a80d57:v365"); Wed, 31 Jul 2024 06:29:50 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9ec25b82b75dc45c X-CR-MTA-TID: 64aa7808 Received: from L427f262a5583.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4E71258A-3607-4744-B8B4-1EF7914788B0.1; Wed, 31 Jul 2024 06:29:39 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L427f262a5583.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 31 Jul 2024 06:29:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=C3ILTpNY6FUW7UcAbfqO9jx9vwpk2FPr4hNj9PBgOHSARw0yo3cfmtdWhJaLdaTU/Zan26RixF8D7wQtBSSmNZ34pb48sEFEXTY/bq5wA7krn7KWK35X3PPBXs48NN1rQqoFvTIwpKD4uAb2CYvta1N6FruXo3FYaZBu+qHGaaUSnhCIIhgzvtXviSHB5WmKr6azxUGm6LbIPNYwleNL72TuE9gs3Z+W59o/ESh2olLSb6YZMKzmsGjhZWrmGgvpRau9ZTVkIfz5yPCe3KL8nCzDsAaiBRL7DTEmJIWD6omYxep6NhejYQxI5ngOp5ND/6fTN9oCrCnBXAED+pS2+w== 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=vLsoC7FOo4cW5/Sp+LPSUMhqxIkeC6HQ0XDYcvSqqL8=; b=XinVBOxWn56EAvnGWf9IkK4R6lih3ST/Z1H6S0WcGet4/7w/IRHp43cD9rcVQssHnBHJhk1mZmSFrQy47N7Q304R2K0DXw/qWFqG7t7GFJKN36bSTeHJDU0i3K/oQiRFTWKAUBH3oRM0247HKI1QuDof4GcEFsgQhokUVFmwUYuU0u7Sbh2/sURZ2Mg1rz69c9q9TpQYoONpqhx/uxUcgJj2O1skL5LhhgPI+an5KCZQXwPnsp61Mj/7ylyFjTuNNV3IvgIarVKFKTfHKJbgnp0YChZeA4x8iZUubsOWUN6r8Z+zIsWLigxkmRv6wAsGYZuYAbi9Iy5XiYjavuCjSA== 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=vLsoC7FOo4cW5/Sp+LPSUMhqxIkeC6HQ0XDYcvSqqL8=; b=fWCzBT6SDtFGIV/j04c8V0DFK1Sh7DbKMUetdSP2rojPthiZ99/CL7yYwANcwavdB0AG7X83OfwufQ2jBznov/MhP6O55u+faTL+dkvNaggQ8Rm5ZTZMRO/VlRqppD8jNpLiV45R52NLOKQ4DzMBBSV3/MwhcOppjptEtQT2YPU= Received: from AS9PR05CA0014.eurprd05.prod.outlook.com (2603:10a6:20b:488::33) by AS2PR08MB9073.eurprd08.prod.outlook.com (2603:10a6:20b:5fd::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19; Wed, 31 Jul 2024 06:29:36 +0000 Received: from AMS1EPF00000047.eurprd04.prod.outlook.com (2603:10a6:20b:488:cafe::d5) by AS9PR05CA0014.outlook.office365.com (2603:10a6:20b:488::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.34 via Frontend Transport; Wed, 31 Jul 2024 06:29:36 +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 AMS1EPF00000047.mail.protection.outlook.com (10.167.16.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7828.19 via Frontend Transport; Wed, 31 Jul 2024 06:29:36 +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; Wed, 31 Jul 2024 06:29:35 +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; Wed, 31 Jul 2024 06:29:34 +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; Wed, 31 Jul 2024 06:29:34 +0000 From: Claudio Bantaloukas To: CC: Claudio Bantaloukas Subject: [PATCH v4 1/3] aarch64: Add march flags for +fp8 arch extensions Date: Wed, 31 Jul 2024 06:29:30 +0000 Message-ID: <20240731062932.1819010-2-claudio.bantaloukas@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240731062932.1819010-1-claudio.bantaloukas@arm.com> References: <20240731062932.1819010-1-claudio.bantaloukas@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS1EPF00000047:EE_|AS2PR08MB9073:EE_|AM3PEPF0000A79B:EE_|VI1PR08MB5469:EE_ X-MS-Office365-Filtering-Correlation-Id: 9b80e85d-734d-4369-4a70-08dcb12a2e94 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|376014|36860700013|1800799024; X-Microsoft-Antispam-Message-Info-Original: sSuIMtB0MRREhjoRf1cm8p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IIpgpGwafHkO3Zhgh4UUkAvRXe0GJnjKG5ecwYsta6NClVo/SqzHaW7TerpFqg4YBMhkdn6SdiwJ8pYp/twr5NED+PcfAr+2Rh/dBFyOEOiA2Lyo2tVayA9/dS70tr+wmAMA8kMLY3a7409+Ak3PX3/zGI7BEL4HU+kvxM7UTXDVK4Bsi0FFFRqkkxrRQTDRh7B8cMY8BIzlqlSMoKTaLoDR9yrZUEcvWdHB2fqWdBYmzBFWAfA2b26CK0HCvBaY/egxs5vGtDWkkd2uxFH3vDNdXH6PfAVCnXJGMWHXsJO1r1x+hgoh/72LYJIgcIzMenxeyJxHWYJkugNnSehdRhsbDtw== 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)(376014)(36860700013)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9073 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:488::33]; domain=AS9PR05CA0014.eurprd05.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF0000A79B.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 94ec4a1f-3284-499f-b94c-08dcb12a262b X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|36860700013|35042699022|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Ci/wYG9gKIR3zjYmKFFES8mv/n4/TWg?= =?utf-8?q?y2Dm+/nbVjGy62hCit45zGva0HFkMElpun4VvjC7Rn4i8p07gGgdTaumLpBLjidHW?= =?utf-8?q?I7fCX3xD23UNW42TG6fQCPcZFSJF3kXvM5GTucQFPAjoCruQ7V3TIHN6OCwK/+EL0?= =?utf-8?q?bCZSXVCvbUBdIw3kMzoZMZUKOa0Jvzjx1N9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RKWUBnOf5azUong1kx5/?= =?utf-8?q?EwlyGALvBv0PWiulMYJ8SNGpUCjazQBf85LUE2Tf5dAgN7jRKPjcuBp+5OdVTYyeB?= =?utf-8?q?MIGijqAW3RC9+kKcCb0ZqX5JbcxuzQo6j7wk+r4vyXkf6kkF+DRUE1UnV4clx3RfI?= =?utf-8?q?g+i9DV/nwZwhwRR3ihnz+37qS38GxJe9PWJUpPw8Th2hg8Uwy1YyVR3Xz8PXXGisH?= =?utf-8?q?DfOnJWJJdSMIfAfEs8qw/vMYDGEbrIeG53yjtE1TTI+ZK6NQah9px3t2LW7u2UbZq?= =?utf-8?q?triHeG9CilEmkk+1MWr1YppNton/zZN3PQ=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)(376014)(82310400026)(36860700013)(35042699022)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 06:29:50.7512 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9b80e85d-734d-4369-4a70-08dcb12a2e94 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: AM3PEPF0000A79B.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5469 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 This introduces the relevant flags to enable access to the fpmr register and fp8 intrinsics, which will be added subsequently. gcc/ChangeLog: * config/aarch64/aarch64-option-extensions.def (fp8): New. * config/aarch64/aarch64.h (TARGET_FP8): Likewise. * doc/invoke.texi (AArch64 Options): Document new -march flags and extensions. gcc/testsuite/ChangeLog: * gcc.target/aarch64/acle/fp8.c: New test. --- .../aarch64/aarch64-option-extensions.def | 2 ++ gcc/config/aarch64/aarch64.h | 3 +++ gcc/doc/invoke.texi | 2 ++ gcc/testsuite/gcc.target/aarch64/acle/fp8.c | 20 +++++++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/acle/fp8.c diff --git a/gcc/config/aarch64/aarch64-option-extensions.def b/gcc/config/aarch64/aarch64-option-extensions.def index 42ec0eec31e..6998627f377 100644 --- a/gcc/config/aarch64/aarch64-option-extensions.def +++ b/gcc/config/aarch64/aarch64-option-extensions.def @@ -232,6 +232,8 @@ AARCH64_OPT_EXTENSION("the", THE, (), (), (), "the") AARCH64_OPT_EXTENSION("gcs", GCS, (), (), (), "gcs") +AARCH64_OPT_EXTENSION("fp8", FP8, (SIMD), (), (), "fp8") + #undef AARCH64_OPT_FMV_EXTENSION #undef AARCH64_OPT_EXTENSION #undef AARCH64_FMV_FEATURE diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index b7e330438d9..2e75c6b81e2 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -463,6 +463,9 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE ATTRIBUTE_UNUSED && (aarch64_tune_params.extra_tuning_flags \ & AARCH64_EXTRA_TUNE_AVOID_PRED_RMW)) +/* fp8 instructions are enabled through +fp8. */ +#define TARGET_FP8 AARCH64_HAVE_ISA (FP8) + /* Standard register usage. */ /* 31 64-bit general purpose registers R0-R30: diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 86f9b5d1fe5..ef2213b4e84 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -21849,6 +21849,8 @@ Enable support for Armv9.4-a Guarded Control Stack extension. Enable support for Armv8.9-a/9.4-a translation hardening extension. @item rcpc3 Enable the RCpc3 (Release Consistency) extension. +@item fp8 +Enable the fp8 (8-bit floating point) extension. @end table diff --git a/gcc/testsuite/gcc.target/aarch64/acle/fp8.c b/gcc/testsuite/gcc.target/aarch64/acle/fp8.c new file mode 100644 index 00000000000..459442be155 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/acle/fp8.c @@ -0,0 +1,20 @@ +/* Test the fp8 ACLE intrinsics family. */ +/* { dg-do compile } */ +/* { dg-options "-O1 -march=armv8-a" } */ + +#include + +#ifdef __ARM_FEATURE_FP8 +#error "__ARM_FEATURE_FP8 feature macro defined." +#endif + +#pragma GCC push_options +#pragma GCC target("arch=armv9.4-a+fp8") + +/* We do not define __ARM_FEATURE_FP8 until all + relevant features have been added. */ +#ifdef __ARM_FEATURE_FP8 +#error "__ARM_FEATURE_FP8 feature macro defined." +#endif + +#pragma GCC pop_options From patchwork Wed Jul 31 06:29:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudio Bantaloukas X-Patchwork-Id: 1966886 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=PVlyd0v/; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=PVlyd0v/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4WYj1571zHz1yYq for ; Wed, 31 Jul 2024 16:31:37 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 46E65385B82F for ; Wed, 31 Jul 2024 06:31:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20608.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::608]) by sourceware.org (Postfix) with ESMTPS id 38B203858420 for ; Wed, 31 Jul 2024 06:29:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 38B203858420 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 38B203858420 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f400:7e1a::608 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1722407403; cv=pass; b=WfFlWDRX0HX1kGQMVM8BHFAurR2nTHH3fOdANj7BY61XXLHCqUFkHQ+r8xA+UfyXeUJz5dY2jV90QeNO9tTB4jCxxJnpn6K9L15comQ1GPqwf9m07+jGHQd1X5D8w2SLFPEyBqKJAdlynx5WXumZiulycrMy2YcOTVdwj86SQDs= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1722407403; c=relaxed/simple; bh=7WKMjgAhDYQdK8KzV/Ux0uoB7NQGSMivhwbxKqBBaJk=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=N+85yxWGtOQTmXjXMFo3QA8LJtOe+stAHi1RxJ2AkFsgmrPIFK2E9I9Uj85pQthPKVHlP7RqInuGfLIWPTYTymn++s2bryILo3aNjx2COBxVF5cHGo0rmu3t5EeQblBnCIDVcWe8IpkM+qKkLGUxIxRm408lZWBM4YOFRO+hPck= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=C6ruwZxk3l6WE2njaTXHCIj3dlWkJd2xSJ6jKGDFccWj3McHC5Ihb+ce6bFZJlEZpSj3aY3/MXfCoVXQzlVEDZdeuRiJ/8FS6RhQTM3jGiC09N3rdVznWIZpyxYkesPaWRM/KAYxs2njyTAMJbpYv+n2EmSH/51m5JP0+2OIb0TceW24SNQBxu3czRDtaZJarpMLT4E4zzXhzFdS24KJ2pgea7Y6pGmpUGOJEzqaEtTb3WivCzHArrKQAQxdyqaQovHraG959iIK/JeOMP37lE76y4Zo8XtXT1PsnN1Wj5fIhK/lYQTZ6pmHcXIOiVpNZloyiIWJGeQK5EjxQcNN+A== 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=XKxmCa7Pyr/+mFlypWveFuYvLBArpdeJ6VXKFz5bduQ=; b=lmTOk+vsQO8LIDix/dgSKK3wAP+dk2YcxlOD0BS41OBMt0EKwzZBOqGWjnIC+wMvVYs2oCeGSGCUgTRf5p9TJf9Z7uGtX5NT+hoDxJxNZzZt4yoZgB/nnE7LQu7/eXf/xz77c9HTGPu7c2tB+i0pUv/U7xEI9EvXpzkLImsMJkZII4hpJ2AVk9Yp8b8byOCIDkTRxxn04ck6IAt7sDKz76l2CM418Y0x8Wt+hD02YP/7zE4lJIsIhP7jOH36X9TFMgskqsIka1BnAsZcTJv1aVlTi+Vp0CIuib6RFX8zPa6luu2WilOhpgdKN5hHcyLr53EqtbxNWg1rxxKFIuXSlw== 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=XKxmCa7Pyr/+mFlypWveFuYvLBArpdeJ6VXKFz5bduQ=; b=PVlyd0v/VMIwbRvY6JmxI1tdmRjc5nt+O88yeYLaGmvXOaUH3DG6I1MXKuokC5BZufS8ydSLWVP89IgrptqBj4povOeg/h8okAfcHcqRBIYHiK3exF2L8BsiOmYSl/d5aG2X67njq663adAY9nbQXaGxDahQ8wpeMnGLXR7EvU4= Received: from DU7PR01CA0046.eurprd01.prod.exchangelabs.com (2603:10a6:10:50e::29) by PAWPR08MB11016.eurprd08.prod.outlook.com (2603:10a6:102:46d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.31; Wed, 31 Jul 2024 06:29:53 +0000 Received: from DU6PEPF0000A7E4.eurprd02.prod.outlook.com (2603:10a6:10:50e:cafe::18) by DU7PR01CA0046.outlook.office365.com (2603:10a6:10:50e::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.35 via Frontend Transport; Wed, 31 Jul 2024 06:29:53 +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 DU6PEPF0000A7E4.mail.protection.outlook.com (10.167.8.43) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7828.19 via Frontend Transport; Wed, 31 Jul 2024 06:29:53 +0000 Received: ("Tessian outbound 08e724e9fb70:v365"); Wed, 31 Jul 2024 06:29:53 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2ddabaf02050756b X-CR-MTA-TID: 64aa7808 Received: from Lc3a8e774046b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2985FF29-F59A-4C31-A345-D014390362B3.1; Wed, 31 Jul 2024 06:29:46 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lc3a8e774046b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 31 Jul 2024 06:29:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KZSnvIiEO2zNj2zrgDIrFsVtKw8r6bajLyRiYLNup69Aov8Hj1wEWe7rNYTrU0fik1s3XBWdpcqY/6dEQ/JOj9fjNpHdQDXBE4bLhnclincbU4CA5lkAHG6fablMSQfsZ/F9pM5+zfCoNXBBE31I/p5x28WqrgnOTrDegogpvL2IhydObVMYhqrmI8ARa2UyZOJtYJCgF5k/0jiijby2U655v7p0aPdXSEpAnxSjcIt9nwwlui3ceb79PfsD3j6ZDPQZ4ihY9FLq6J/1pP8iX3K/lkw0wb1IURRvR+wHVaYJdYUvkXlzNbG2OlYlfEXkm5Qh/i6gd9yzE2vbYLaYWQ== 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=XKxmCa7Pyr/+mFlypWveFuYvLBArpdeJ6VXKFz5bduQ=; b=YAsbMbzi6cNTc2muzz8ztByG2wjLXC1basA39NMWB5laNpfMDuoMh4cWz+wBg4NyJuEer2TvES8MADWy5fMugLlfRj0f4olL8akUy1In0oWIbabaaoeBuM7lZmH7X+gwOsKVvot4J6vMd2OdowCYZmPHdgugyeqBjtkfhBadUAS1VZYHVHZeS/qmcazvEf5DXWbnm45jqt3Xm6xbK1nbRCaT7Xza6Rt7q0Zg/+g4k2YVZdKUhMp4tkXp8++TFMUwSXjoHfK+9rilAkW2hGar59woMnNggWI2WxcFfFgp9u2BZbAA8Wp/eIF8QcaDdaZ7E4UXrZ2psItInMaoDJNRng== 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=XKxmCa7Pyr/+mFlypWveFuYvLBArpdeJ6VXKFz5bduQ=; b=PVlyd0v/VMIwbRvY6JmxI1tdmRjc5nt+O88yeYLaGmvXOaUH3DG6I1MXKuokC5BZufS8ydSLWVP89IgrptqBj4povOeg/h8okAfcHcqRBIYHiK3exF2L8BsiOmYSl/d5aG2X67njq663adAY9nbQXaGxDahQ8wpeMnGLXR7EvU4= Received: from DU7P194CA0001.EURP194.PROD.OUTLOOK.COM (2603:10a6:10:553::16) by PAWPR08MB10120.eurprd08.prod.outlook.com (2603:10a6:102:365::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.27; Wed, 31 Jul 2024 06:29:35 +0000 Received: from DB1PEPF000509E6.eurprd03.prod.outlook.com (2603:10a6:10:553:cafe::8e) by DU7P194CA0001.outlook.office365.com (2603:10a6:10:553::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.21 via Frontend Transport; Wed, 31 Jul 2024 06:29:35 +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 DB1PEPF000509E6.mail.protection.outlook.com (10.167.242.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7828.19 via Frontend Transport; Wed, 31 Jul 2024 06:29:35 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 31 Jul 2024 06:29:35 +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; Wed, 31 Jul 2024 06:29:34 +0000 From: Claudio Bantaloukas To: CC: Claudio Bantaloukas Subject: [PATCH v4 2/3] aarch64: Add support for moving fpm system register Date: Wed, 31 Jul 2024 06:29:31 +0000 Message-ID: <20240731062932.1819010-3-claudio.bantaloukas@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240731062932.1819010-1-claudio.bantaloukas@arm.com> References: <20240731062932.1819010-1-claudio.bantaloukas@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB1PEPF000509E6:EE_|PAWPR08MB10120:EE_|DU6PEPF0000A7E4:EE_|PAWPR08MB11016:EE_ X-MS-Office365-Filtering-Correlation-Id: 83f393f8-4fcc-474a-8cb9-08dcb12a303e 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|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info-Original: E5s6Mtjpo10ukjAlHfDFH7IRBP715xtZ1bR/yewW9gxgG2BDJMFbLDdy6EGnoQFh6LGnICP23Fn0zcIAxFoumOqLah8BvZcqQ9V1r7PXf7Hi6EZP2bo3gwasHrm3sYWk3fMRBxnqApWfGSC6M6ZYIiDd8u+zkyDlLN4cuVCPKE4G2BVYxJ6g0ZQtnqJGU9h73g1hv8ztsk/5wtAaIQW2LcIT0f1Abg33NFie0zxSq7IIO34ypGJEYcuygapu/u+wL8v5W7Y/uAQISUIWcn8Ds9AYgLvMaCNaAIqDwcce81qv2HP0K6kyTLWWDF75tIHwMI/cS6D4RyUiigPid0r9KqF5McWsaA8LBiYV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R7g== 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)(1800799024)(376014)(82310400026); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB10120 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:553::16]; domain=DU7P194CA0001.EURP194.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU6PEPF0000A7E4.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 576eb35d-da69-4377-7fd8-08dcb12a254f X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|376014|35042699022|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?q?UggPogFycrr94q45X1NJNKDLrMZFzYo?= =?utf-8?q?Lm5oK3AVQQiUUqvnH9q9PhLM968Nf1PErA9T5b8qJkFykWatVqNFBnYW2cogoNF5P?= =?utf-8?q?9JgzUjbOuzkruqZFB1WVPDQb4DnM0kBlRe7E7ScvmfGX+CGOrGIgO069CHlAaWTFY?= =?utf-8?q?DGBRjPgiILRDK1OcwRfHZQfHYGay5LIqyaxn8IJRTnZ0iT5YBEWoXUUiuAJu8Xuo6?= =?utf-8?q?jfdgFWkifQIzM/86X8FH5URy1ZSyId853t7PfaLtCkkxWQyn8Z2LN+Qvhs4LfX+Ub?= =?utf-8?q?pP1sRofnAqhUSu4i23gAbm5Pa5DSDBFJ5jPSOOlmPLWIap2UcSHpNzpi+Pcp80aJa?= =?utf-8?q?/jqOap+reQ72SdaseBczmZNSQP0dGYKv+Y6OHK7sySu7NsQnv8Tzp/Ii+dhriCi5o?= =?utf-8?q?iT/vDS75rrT7OLtac/2Vgh+evabgTeFaLpwqAdfl/MdyFSixP1t/iCHPylZTzL8J+?= =?utf-8?q?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f-8?q?xjOEYBtwdtP9tK1iYsa/0omZDKjIxs3YxA=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)(82310400026)(1800799024)(376014)(35042699022)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 06:29:53.5759 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83f393f8-4fcc-474a-8cb9-08dcb12a303e 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: DU6PEPF0000A7E4.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR08MB11016 X-Spam-Status: No, score=-12.0 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 Unlike most system registers, fpmr can be heavily written to in code that exercises the fp8 functionality. That is because every fp8 instrinsic call can potentially change the value of fpmr. Rather than just use an unspec, we treat the fpmr system register like all other registers and use a move operation to read and write to it. We introduce a new class of moveable system registers that, currently, only accepts fpmr and a new constraint, Umv, that allows us to selectively use mrs and msr instructions when expanding rtl for them. Given that there is code that depends on "real" registers coming before "fake" ones, we introduce a new constant FPM_REGNUM that uses an existing value and renumber registers below that. This requires us to update the bitmaps that describe which registers belong to each register class. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_hard_regno_nregs): Add support for MOVEABLE_SYSREGS class. (aarch64_hard_regno_mode_ok): Allow reads and writes to fpmr. (aarch64_regno_regclass): Support MOVEABLE_SYSREGS class. (aarch64_class_max_nregs): Likewise. * config/aarch64/aarch64.h (FIXED_REGISTERS): add fpmr. (CALL_REALLY_USED_REGISTERS): Likewise. (REGISTER_NAMES): Likewise. (enum reg_class): Add MOVEABLE_SYSREGS class. (REG_CLASS_NAMES): Likewise. (REG_CLASS_CONTENTS): Update class bitmaps to deal with fpmr, the new MOVEABLE_REGS class and renumbering of registers. * config/aarch64/aarch64.md: (FPM_REGNUM): added new register number, reusing old value. (FFR_REGNUM): Renumber. (FFRT_REGNUM): Likewise. (LOWERING_REGNUM): Likewise. (TPIDR2_BLOCK_REGNUM): Likewise. (SME_STATE_REGNUM): Likewise. (TPIDR2_SETUP_REGNUM): Likewise. (ZA_FREE_REGNUM): Likewise. (ZA_SAVED_REGNUM): Likewise. (ZA_REGNUM): Likewise. (ZT0_REGNUM): Likewise. (*mov_aarch64): Add support for moveable sysregs. (*movsi_aarch64): Likewise. (*movdi_aarch64): Likewise. * config/aarch64/constraints.md (MOVEABLE_SYSREGS): New constraint. gcc/testsuite/ChangeLog: * gcc.target/aarch64/acle/fp8.c: New tests. --- gcc/config/aarch64/aarch64.cc | 8 ++ gcc/config/aarch64/aarch64.h | 14 ++- gcc/config/aarch64/aarch64.md | 30 ++++-- gcc/config/aarch64/constraints.md | 3 + gcc/testsuite/gcc.target/aarch64/acle/fp8.c | 101 ++++++++++++++++++++ 5 files changed, 142 insertions(+), 14 deletions(-) diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index e0cf382998c..9810f2c0390 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -2018,6 +2018,7 @@ aarch64_hard_regno_nregs (unsigned regno, machine_mode mode) case PR_HI_REGS: return mode == VNx32BImode ? 2 : 1; + case MOVEABLE_SYSREGS: case FFR_REGS: case PR_AND_FFR_REGS: case FAKE_REGS: @@ -2045,6 +2046,9 @@ aarch64_hard_regno_mode_ok (unsigned regno, machine_mode mode) /* This must have the same size as _Unwind_Word. */ return mode == DImode; + if (regno == FPM_REGNUM) + return mode == QImode || mode == HImode || mode == SImode || mode == DImode; + unsigned int vec_flags = aarch64_classify_vector_mode (mode); if (vec_flags == VEC_SVE_PRED) return pr_or_ffr_regnum_p (regno); @@ -12680,6 +12684,9 @@ aarch64_regno_regclass (unsigned regno) if (PR_REGNUM_P (regno)) return PR_LO_REGNUM_P (regno) ? PR_LO_REGS : PR_HI_REGS; + if (regno == FPM_REGNUM) + return MOVEABLE_SYSREGS; + if (regno == FFR_REGNUM || regno == FFRT_REGNUM) return FFR_REGS; @@ -13068,6 +13075,7 @@ aarch64_class_max_nregs (reg_class_t regclass, machine_mode mode) case PR_HI_REGS: return mode == VNx32BImode ? 2 : 1; + case MOVEABLE_SYSREGS: case STACK_REG: case FFR_REGS: case PR_AND_FFR_REGS: diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 2e75c6b81e2..2dfb999bea5 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -523,6 +523,7 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE ATTRIBUTE_UNUSED 1, 1, 1, 1, /* SFP, AP, CC, VG */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* P0 - P7 */ \ 0, 0, 0, 0, 0, 0, 0, 0, /* P8 - P15 */ \ + 1, /* FPMR */ \ 1, 1, /* FFR and FFRT */ \ 1, 1, 1, 1, 1, 1, 1, 1 /* Fake registers */ \ } @@ -547,6 +548,7 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE ATTRIBUTE_UNUSED 1, 1, 1, 0, /* SFP, AP, CC, VG */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* P0 - P7 */ \ 1, 1, 1, 1, 1, 1, 1, 1, /* P8 - P15 */ \ + 1, /* FPMR */ \ 1, 1, /* FFR and FFRT */ \ 0, 0, 0, 0, 0, 0, 0, 0 /* Fake registers */ \ } @@ -564,6 +566,7 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE ATTRIBUTE_UNUSED "sfp", "ap", "cc", "vg", \ "p0", "p1", "p2", "p3", "p4", "p5", "p6", "p7", \ "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", \ + "fpmr", \ "ffr", "ffrt", \ "lowering", "tpidr2_block", "sme_state", "tpidr2_setup", \ "za_free", "za_saved", "za", "zt0" \ @@ -775,6 +778,7 @@ enum reg_class PR_REGS, FFR_REGS, PR_AND_FFR_REGS, + MOVEABLE_SYSREGS, FAKE_REGS, ALL_REGS, LIM_REG_CLASSES /* Last */ @@ -801,6 +805,7 @@ enum reg_class "PR_REGS", \ "FFR_REGS", \ "PR_AND_FFR_REGS", \ + "MOVEABLE_SYSREGS", \ "FAKE_REGS", \ "ALL_REGS" \ } @@ -822,10 +827,11 @@ enum reg_class { 0x00000000, 0x00000000, 0x00000ff0 }, /* PR_LO_REGS */ \ { 0x00000000, 0x00000000, 0x000ff000 }, /* PR_HI_REGS */ \ { 0x00000000, 0x00000000, 0x000ffff0 }, /* PR_REGS */ \ - { 0x00000000, 0x00000000, 0x00300000 }, /* FFR_REGS */ \ - { 0x00000000, 0x00000000, 0x003ffff0 }, /* PR_AND_FFR_REGS */ \ - { 0x00000000, 0x00000000, 0x3fc00000 }, /* FAKE_REGS */ \ - { 0xffffffff, 0xffffffff, 0x000fffff } /* ALL_REGS */ \ + { 0x00000000, 0x00000000, 0x00600000 }, /* FFR_REGS */ \ + { 0x00000000, 0x00000000, 0x006ffff0 }, /* PR_AND_FFR_REGS */ \ + { 0x00000000, 0x00000000, 0x00100000 }, /* MOVEABLE_SYSREGS */ \ + { 0x00000000, 0x00000000, 0x7f800000 }, /* FAKE_REGS */ \ + { 0xffffffff, 0xffffffff, 0x001fffff } /* ALL_REGS */ \ } #define REGNO_REG_CLASS(REGNO) aarch64_regno_regclass (REGNO) diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index ed29127dafb..ed1bd2ede7d 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -107,10 +107,14 @@ (define_constants (P14_REGNUM 82) (P15_REGNUM 83) (LAST_SAVED_REGNUM 83) - (FFR_REGNUM 84) + + ;; Floating Point Mode Register, used in FP8 insns. + (FPM_REGNUM 84) + + (FFR_REGNUM 85) ;; "FFR token": a fake register used for representing the scheduling ;; restrictions on FFR-related operations. - (FFRT_REGNUM 85) + (FFRT_REGNUM 86) ;; ---------------------------------------------------------------- ;; Fake registers @@ -122,17 +126,17 @@ (define_constants ;; ABI-related lowering is needed. These placeholders read and ;; write this register. Instructions that depend on the lowering ;; read the register. - (LOWERING_REGNUM 86) + (LOWERING_REGNUM 87) ;; Represents the contents of the current function's TPIDR2 block, ;; in abstract form. - (TPIDR2_BLOCK_REGNUM 87) + (TPIDR2_BLOCK_REGNUM 88) ;; Holds the value that the current function wants PSTATE.ZA to be. ;; The actual value can sometimes vary, because it does not track ;; changes to PSTATE.ZA that happen during a lazy save and restore. ;; Those effects are instead tracked by ZA_SAVED_REGNUM. - (SME_STATE_REGNUM 88) + (SME_STATE_REGNUM 89) ;; Instructions write to this register if they set TPIDR2_EL0 to a ;; well-defined value. Instructions read from the register if they @@ -140,14 +144,14 @@ (define_constants ;; ;; The register does not model the architected TPIDR2_ELO, just the ;; current function's management of it. - (TPIDR2_SETUP_REGNUM 89) + (TPIDR2_SETUP_REGNUM 90) ;; Represents the property "has an incoming lazy save been committed?". - (ZA_FREE_REGNUM 90) + (ZA_FREE_REGNUM 91) ;; Represents the property "are the current function's ZA contents ;; stored in the lazy save buffer, rather than in ZA itself?". - (ZA_SAVED_REGNUM 91) + (ZA_SAVED_REGNUM 92) ;; Represents the contents of the current function's ZA state in ;; abstract form. At various times in the function, these contents @@ -155,10 +159,10 @@ (define_constants ;; ;; The contents persist even when the architected ZA is off. Private-ZA ;; functions have no effect on its contents. - (ZA_REGNUM 92) + (ZA_REGNUM 93) ;; Similarly represents the contents of the current function's ZT0 state. - (ZT0_REGNUM 93) + (ZT0_REGNUM 94) (FIRST_FAKE_REGNUM LOWERING_REGNUM) (LAST_FAKE_REGNUM ZT0_REGNUM) @@ -1405,6 +1409,8 @@ (define_insn "*mov_aarch64" [w, r Z ; neon_from_gp, nosimd ] fmov\t%s0, %w1 [w, w ; neon_dup , simd ] dup\t%0, %1.[0] [w, w ; neon_dup , nosimd ] fmov\t%s0, %s1 + [Umv, r ; mrs , * ] msr\t%0, %x1 + [r, Umv ; mrs , * ] mrs\t%x0, %1 } ) @@ -1467,6 +1473,8 @@ (define_insn_and_split "*movsi_aarch64" [r , w ; f_mrc , fp , 4] fmov\t%w0, %s1 [w , w ; fmov , fp , 4] fmov\t%s0, %s1 [w , Ds ; neon_move, simd, 4] << aarch64_output_scalar_simd_mov_immediate (operands[1], SImode); + [Umv, r ; mrs , * , 4] msr\t%0, %x1 + [r, Umv ; mrs , * , 4] mrs\t%x0, %1 } "CONST_INT_P (operands[1]) && !aarch64_move_imm (INTVAL (operands[1]), SImode) && REG_P (operands[0]) && GP_REGNUM_P (REGNO (operands[0]))" @@ -1505,6 +1513,8 @@ (define_insn_and_split "*movdi_aarch64" [w, w ; fmov , fp , 4] fmov\t%d0, %d1 [w, Dd ; neon_move, simd, 4] << aarch64_output_scalar_simd_mov_immediate (operands[1], DImode); [w, Dx ; neon_move, simd, 8] # + [Umv, r; mrs , * , 4] msr\t%0, %1 + [r, Umv; mrs , * , 4] mrs\t%0, %1 } "CONST_INT_P (operands[1]) && REG_P (operands[0]) diff --git a/gcc/config/aarch64/constraints.md b/gcc/config/aarch64/constraints.md index a2569cea510..0c81fb28f7e 100644 --- a/gcc/config/aarch64/constraints.md +++ b/gcc/config/aarch64/constraints.md @@ -77,6 +77,9 @@ (define_register_constraint "Upl" "PR_LO_REGS" (define_register_constraint "Uph" "PR_HI_REGS" "SVE predicate registers p8 - p15.") +(define_register_constraint "Umv" "MOVEABLE_SYSREGS" + "@internal System Registers suitable for moving rather than requiring an unspec msr") + (define_constraint "c" "@internal The condition code register." (match_operand 0 "cc_register")) diff --git a/gcc/testsuite/gcc.target/aarch64/acle/fp8.c b/gcc/testsuite/gcc.target/aarch64/acle/fp8.c index 459442be155..afb44f83f60 100644 --- a/gcc/testsuite/gcc.target/aarch64/acle/fp8.c +++ b/gcc/testsuite/gcc.target/aarch64/acle/fp8.c @@ -1,6 +1,7 @@ /* Test the fp8 ACLE intrinsics family. */ /* { dg-do compile } */ /* { dg-options "-O1 -march=armv8-a" } */ +/* { dg-final { check-function-bodies "**" "" "" } } */ #include @@ -17,4 +18,104 @@ #error "__ARM_FEATURE_FP8 feature macro defined." #endif +/* +**test_write_fpmr_sysreg_asm_64: +** msr fpmr, x0 +** ret +*/ +void +test_write_fpmr_sysreg_asm_64 (uint64_t val) +{ + register uint64_t fpmr asm ("fpmr") = val; + asm volatile ("" ::"Umv"(fpmr)); +} + +/* +**test_write_fpmr_sysreg_asm_32: +** msr fpmr, x0 +** ret +*/ +void +test_write_fpmr_sysreg_asm_32 (uint32_t val) +{ + register uint32_t fpmr asm ("fpmr") = val; + asm volatile ("" ::"Umv"(fpmr)); +} + +/* +**test_write_fpmr_sysreg_asm_16: +** msr fpmr, x0 +** ret +*/ +void +test_write_fpmr_sysreg_asm_16 (uint16_t val) +{ + register uint16_t fpmr asm ("fpmr") = val; + asm volatile ("" ::"Umv"(fpmr)); +} + +/* +**test_write_fpmr_sysreg_asm_8: +** msr fpmr, x0 +** ret +*/ +void +test_write_fpmr_sysreg_asm_8 (uint8_t val) +{ + register uint8_t fpmr asm ("fpmr") = val; + asm volatile ("" ::"Umv"(fpmr)); +} + +/* +**test_read_fpmr_sysreg_asm_64: +** mrs x0, fpmr +** ret +*/ +uint64_t +test_read_fpmr_sysreg_asm_64 () +{ + register uint64_t fpmr asm ("fpmr"); + asm volatile ("" : "=Umv"(fpmr) :); + return fpmr; +} + +/* +**test_read_fpmr_sysreg_asm_32: +** mrs x0, fpmr +** ret +*/ +uint32_t +test_read_fpmr_sysreg_asm_32 () +{ + register uint32_t fpmr asm ("fpmr"); + asm volatile ("" : "=Umv"(fpmr) :); + return fpmr; +} + +/* +**test_read_fpmr_sysreg_asm_16: +** mrs x0, fpmr +** ret +*/ +uint16_t +test_read_fpmr_sysreg_asm_16 () +{ + register uint16_t fpmr asm ("fpmr"); + asm volatile ("" : "=Umv"(fpmr) :); + return fpmr; +} + +/* +**test_read_fpmr_sysreg_asm_8: +** mrs x0, fpmr +** ret +*/ +uint8_t +test_read_fpmr_sysreg_asm_8 () +{ + register uint8_t fpmr asm ("fpmr"); + asm volatile ("" : "=Umv"(fpmr) :); + return fpmr; +} + #pragma GCC pop_options From patchwork Wed Jul 31 06:29:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudio Bantaloukas X-Patchwork-Id: 1966884 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=OPkK5xhE; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=OPkK5xhE; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4WYhzs2KKhz1yYq for ; Wed, 31 Jul 2024 16:30:33 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 97F3D385DDCD for ; Wed, 31 Jul 2024 06:30:31 +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 3B0A7385840F for ; Wed, 31 Jul 2024 06:29:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3B0A7385840F 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 3B0A7385840F 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=1722407399; cv=pass; b=mEdfj2f7dVBYJ0NXQfgEBrnPLDyI8mx53gDIAX+GxTIJ6ZQqy/0C1VU828Lj0KvqBprb+uAmKx7rw036OU9nmAibobBORUqOuvOo4XcE76zda/c8qUOItCL+UR0BQFsz00vjOX0AlU7bEa35t96RWcR4ftO8abaDtfLY46QQSVQ= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1722407399; c=relaxed/simple; bh=7d4DV4IjVGX4m2vmQ2/orLpC6frJ/RjCl2h66/Qfvqk=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=bnV2mhh6oPBCK0Al5d8sqEMm8yNP38eM9QCSxhBEU0bEzo5oZ27Tl2/5O0/x7nfH0YIzG4Bz96NOAmlan+swxnoU3ugzXpszLdayZ+TidIgbw9Kq9+473wSVEuG7IA77yODDjuIBQD1oNspj1aWE4X3xjyHC7s6h1QBjIYtK4YU= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=kbwvcRSbMcG0nNiVUTUyIJ7NWdViixS+dodF3n/mZezqNvfMdrs+lD/yL5QWZf4Zs+YFoWYhouicGZlTxkziXYYEDXtQk0K6t9Up+bb8K+HSnBgHPVFPI0PT/0E59d/cZXybHIKpvSWJmTmJRR1SF2Q6MfkdxTPjwecuaHAit5MwAj4/OZA8CpGTMy5Tf+x9BNVfJ3ggyZG1E5Q1/cReSvItllwPMIgWZQqQd8OHmWW/MotWl2tuc7Aqs7EXoFe69CaJB6CHsNVqpJZXohNQsdhG1aXTF1b2DZ1gwEywRENjppi66Z7gwxYyRSPNIbsVmQM2fCaowRqIPJmQyC9Y9g== 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=sS7nihKd7AT54vOIO3wKDWwCTeUqSRUl3y25QMgkFHA=; b=eh9bMqRM3hCKLj6VtfooEGSACbLf87rx6ShSC79uMF9jMx+nkcCzsoVALDUL8DTcuKRYXIS/Gd1I68LV6prYhRWrtHuFKojD3A48J+Kl8rI1AF8hzm73C5Sl3cJI6e/gBnlSVy0DnTrDp1sJohdM93uwjQIq9ZvkOJfg7GIncU69si6bFeBNQXgZoOGLN23fu9vwgvB9OHRwQJB3fVMF5BB+YGC6bgEsgG7zhUZRsp3kPGsN3yUJz7JDWl7HTibvvAu3s5UboCV29UpmLAKQUw7LHmlRwDmE/hn07G8PCwrJvCpLH1Lo+GKBxNKGsGffF8B5YDW+oVyFbyItwCO13A== 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=sS7nihKd7AT54vOIO3wKDWwCTeUqSRUl3y25QMgkFHA=; b=OPkK5xhEhH0eK0rSfYerimtxlBou4BSuRW+4fCkuq3EFWDdR+lYXk3OsyhL8sLgRB03irHUbCl/7XD/ed+36o6E+2Ffhr6fVDXu98dC78BNfs8ZfYMwsPGoOWlwLpeu+nHY6DJQMuuH88KL/m4YdlmBphHOIPjbuXtTOxz2Nxuc= Received: from DU7PR01CA0030.eurprd01.prod.exchangelabs.com (2603:10a6:10:50e::19) by AS4PR08MB7577.eurprd08.prod.outlook.com (2603:10a6:20b:4fc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19; Wed, 31 Jul 2024 06:29:48 +0000 Received: from DU6PEPF0000A7E4.eurprd02.prod.outlook.com (2603:10a6:10:50e:cafe::4f) by DU7PR01CA0030.outlook.office365.com (2603:10a6:10:50e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.35 via Frontend Transport; Wed, 31 Jul 2024 06:29:48 +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 DU6PEPF0000A7E4.mail.protection.outlook.com (10.167.8.43) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7828.19 via Frontend Transport; Wed, 31 Jul 2024 06:29:47 +0000 Received: ("Tessian outbound 08e724e9fb70:v365"); Wed, 31 Jul 2024 06:29:47 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1521955ab9283a09 X-CR-MTA-TID: 64aa7808 Received: from L18b68e38d42c.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id DCDD9036-5F02-4F6D-BDA6-FC33AE60011E.1; Wed, 31 Jul 2024 06:29:40 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L18b68e38d42c.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 31 Jul 2024 06:29:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JYvUJLrQXgQD1WRZDflhZlD+9mgWgKD8QT6AJExgpd2n+r0H2KWC450p9yE1yo1SlctLYQ/3Vq8TD4AM2o+hl7L6/TupGAykLRAJa5nx/gknFHZoM/H7OHHQO5SkrUtPP456AO21m7CUvT2Sy65fhTGAl2JuUPLgy9S+SRAVHOOqD/+6RhJiOSQTyPZ8aJu0+1fjvvka9gVldh7+WL2v1WAxyCkHK7+aVFiC5H6/glSDXRDI/gikaakByVB5+nwk8ze/ozMg87iYVcrpKBCbC1ZVnD3UVwSXLyh4aOnKNYYt3cahxp5a0oCuP7ESqnT6rCMHPfQEQuILTzmM32f6Nw== 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=sS7nihKd7AT54vOIO3wKDWwCTeUqSRUl3y25QMgkFHA=; b=QjE3BcJrcy3XikbLUwLxCmyaf7B5RTlYQZgSF2kb2/nWCzAwxwykZ5Y1zvcSX+4M3ldgeEt+si9l2YVr1fOsaOJpwTizbToQKcK6PCFhJCy7uxOXoSEELqxIQXG6hekAlrEIMKGuRKvePovGfIb5bof1QuEjW3sAYKt7NVfawQGZoz/FyjhBT0EGTcbthhNJ78cz6oLKCHnbhemDoVLjYOjM8ndpYSDZgmswqJgVrlkKQfv6Dil/omzRL15vfH7SDTYpybHWpdHZUWJXUXby2aK1DPWUsVxh3u1/WyD5n7GQvL6MY05PO8bcrWyStiK+N8V4DM7YgY1/N062704PmA== 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=sS7nihKd7AT54vOIO3wKDWwCTeUqSRUl3y25QMgkFHA=; b=OPkK5xhEhH0eK0rSfYerimtxlBou4BSuRW+4fCkuq3EFWDdR+lYXk3OsyhL8sLgRB03irHUbCl/7XD/ed+36o6E+2Ffhr6fVDXu98dC78BNfs8ZfYMwsPGoOWlwLpeu+nHY6DJQMuuH88KL/m4YdlmBphHOIPjbuXtTOxz2Nxuc= Received: from DU7P194CA0010.EURP194.PROD.OUTLOOK.COM (2603:10a6:10:553::13) by PAVPR08MB9627.eurprd08.prod.outlook.com (2603:10a6:102:31b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.21; Wed, 31 Jul 2024 06:29:36 +0000 Received: from DB1PEPF000509E6.eurprd03.prod.outlook.com (2603:10a6:10:553:cafe::20) by DU7P194CA0010.outlook.office365.com (2603:10a6:10:553::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19 via Frontend Transport; Wed, 31 Jul 2024 06:29:36 +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 DB1PEPF000509E6.mail.protection.outlook.com (10.167.242.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7828.19 via Frontend Transport; Wed, 31 Jul 2024 06:29:36 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 31 Jul 2024 06:29:35 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 31 Jul 2024 06:29:35 +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; Wed, 31 Jul 2024 06:29:34 +0000 From: Claudio Bantaloukas To: CC: Claudio Bantaloukas Subject: [PATCH v4 3/3] aarch64: Add fpm register helper functions. Date: Wed, 31 Jul 2024 06:29:32 +0000 Message-ID: <20240731062932.1819010-4-claudio.bantaloukas@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240731062932.1819010-1-claudio.bantaloukas@arm.com> References: <20240731062932.1819010-1-claudio.bantaloukas@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB1PEPF000509E6:EE_|PAVPR08MB9627:EE_|DU6PEPF0000A7E4:EE_|AS4PR08MB7577:EE_ X-MS-Office365-Filtering-Correlation-Id: 55710833-b01f-46b8-f3e7-08dcb12a2c78 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info-Original: HHNWQyRXFqPLvoIZ4sSqoVxIDj3FotD/l+KF1lBlLRDkgcwTyeBloyonzqnqR7K6clVbDW7FsaMuZPmYNCjGly7Q0szeQn7oX8ydk22elgDtX4wnyJvblUpgpZizFEXeZhub4eU51PnYs4+oiMShlGv6vC6/jTOzNpbcnOoRGH2uQX3fop2Um9ynBdZOSQtfphbIJBuhQz73hXmcdmiTpIZbzPXFZri5eJbdnhv7lmamk2OWek3CK4H8FIxoGmw+BKF74hEpGG283MIDlqMf9luSjzyfGRBerW2Lugvyp6XinpLox4Ngd6TrXXs7dcj57Eu4D6urWGKH96EHdE/lTgz2YMEhKNMz4Xp3si1F27g7A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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)(1800799024)(36860700013)(82310400026)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9627 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:553::13]; domain=DU7P194CA0010.EURP194.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU6PEPF0000A7E4.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: bd3a7008-9d4e-4f22-38b4-08dcb12a264c X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|35042699022|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?xbGVcW6GRkWgJwcL98hKUwNoM1rVlVI?= =?utf-8?q?WxrX+mB9E9HhK+GpAYynPKFJ3bHDpYIiLeFvvPvWup6rs9dIJmT+hEfKUBPO375CZ?= =?utf-8?q?Es4BUwTAJz0M4s/go1bILGFJ7QQuxoSo0wP9h021tapvQkSzBgmYgJS9XywkG7/rQ?= =?utf-8?q?HSTAuIyck450fRNig5gOYo/3q4fmJybsDS9q8jcK5Am7eDkvXWkJawjaGcW8hG9xf?= =?utf-8?q?1aJDEtLCtiIRqcLprsf9L4C/Va7sJHDk34t/SM8klUmL9WVaTHsNYGSt7BanAAmDQ?= =?utf-8?q?MohnIWmfMPWFxW2L5+4XTyAioGeo18YEKZCPSvKp0mZu4pTDMnNZOCKazdUvdKTLF?= =?utf-8?q?Ib0QRq0MaOKdwe9boQyqbVJp2+5MHXA1VxcBNXiujWSiYYlTCUP0OAvkxl774U2aq?= =?utf-8?q?QaQ/hWNadt7mGVXCFFXOVtLgnBN363ta2qnwH+rYV5LAIWrEhU4YbO/CiFGjFpYjk?= =?utf-8?q?PewaeIt+CJEdKIVlH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+UDEpu4h3er0JqJu+fjFg=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)(82310400026)(35042699022)(36860700013)(376014)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 06:29:47.2478 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55710833-b01f-46b8-f3e7-08dcb12a2c78 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: DU6PEPF0000A7E4.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB7577 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..5668cc24c99 --- /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 one of arm_neon.h arm_sve.h arm_sme.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 ()); +}