From patchwork Wed Nov 6 11:46:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejas Belagod X-Patchwork-Id: 2007449 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=XFkyxneE; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=XFkyxneE; 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 4Xk3Pr1Rqxz1xxf for ; Wed, 6 Nov 2024 22:48:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 65F343858C51 for ; Wed, 6 Nov 2024 11:48:46 +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-db8eur05on2062b.outbound.protection.outlook.com [IPv6:2a01:111:f403:2614::62b]) by sourceware.org (Postfix) with ESMTPS id 0AE0D3858C52 for ; Wed, 6 Nov 2024 11:46:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0AE0D3858C52 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 0AE0D3858C52 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2614::62b ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730893625; cv=pass; b=h/tK4zDgC4tqXWKa5CoNcvxfmBuhFmNQ3o0cHhDC804VA4ztezSQsEINZ3YYQXK0O8j72QCpi2+9KAGeXK5WWAix3QUV7yo3JRRSGNnnyW88Q83qPlwPHRtGfB4VxxofkUumiu9a9vrm59P5RoRLRJDH4PbGQaDUFBqOn8qb54I= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1730893625; c=relaxed/simple; bh=ARaI8x7mIdLiXH9AsjSCkM8yX/1lT0DkUxFRfzHxLdw=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=i/JlFDeQBJmu0Bf4s3dyTWXpUHC1S0ewNQzFDkch1MF+VjSSzPMJcGa63ZeaYUBYZMBJNgtWIlANMpj54PQbVUF1ES1J2fTmWvk+nDkWHubfBlUavCaWkl493sQE17ponx7b8JnUy7NvA91vOo/8vrtFzIMH/4zwIpM4nqrAQAk= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=PTCVsVQVutvA2fdRpNTAUHaL0tFuH0soHBwJPTLvmRfk4XQMjoVipbVuI/qGwNQtGwdhUccwrDViB1SWvvuWLCZxuSABbAiNZvb7FDVZaVTVJy1Pvq70yQ+BJErqIFHgDnGWz8XyJTrDh9FfQLNGsKfoYeEgbIJjigECuZME84zaxKDD3zhcD2kFLkwsHpxGeAbkSpVCwiYxGJXdvWVWnpe4xCAEhffZ0bAeoN9DoQCy1zpQwKWk9GaF8kcPI0uoBLlaX3V5siXCvSnDZGDVlVKN/Bw5ETWOCBvhLQ3bhkGwAqoS/ydoxPPguEIdlPgQEyWFfl9GqgflbovyGCsyLA== 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=gOeYWdjJNYbtFy/CQD0NTp3o9DlcxDpIj1sB3yLyPXU=; b=dcmWjZwzB1TjDOuBd0Tp1axvZ/L0XR45FQ9v1JTpr/bMFpGp+he1vmAya8EVvXB9yu+HUsKxhEgSCxoL28IE2CQgqZLD0cd9PSBG9OP2BdMCYOKzUMA4rl8AYaTDtTATLoK4LfBpUqMVhMzZa1PSiy5S9OeDXhfKhDDoxEry4LPi2oWeRQ6I4tLj4UnJojxq6jee0z1Q0GVTBy7sW1Nah7hwHSTqK2eiwVwwO69NrTeer3ulb9/B+tMjK13HGECo8Kiy91mGjLmVTw4PTcR1RIiekRQ/w4KkNH6aY4w2S0fDpZ48SzDHcu4Tjkuha6u5uTS4d7Gp/ARBrx2Urnr3kQ== 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=gOeYWdjJNYbtFy/CQD0NTp3o9DlcxDpIj1sB3yLyPXU=; b=XFkyxneE904R6ZDjak22tl+Qzr4FUgqZFNoLprxpcEzHRHe+2AOAwtnotewKAHkGYV330zbbYQPNxKzIB/pAgav/dxoZOapyOp8ums7yqIolF+626Sp7x8Ul01xwJVxl69aoCBw/EwSqDJEGhpS9+3ckBJb7Gv5wZTpFdYxvZtY= Received: from AS9PR05CA0119.eurprd05.prod.outlook.com (2603:10a6:20b:498::11) by DB9PR08MB6377.eurprd08.prod.outlook.com (2603:10a6:10:259::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.31; Wed, 6 Nov 2024 11:46:51 +0000 Received: from AM2PEPF0001C712.eurprd05.prod.outlook.com (2603:10a6:20b:498:cafe::22) by AS9PR05CA0119.outlook.office365.com (2603:10a6:20b:498::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.18 via Frontend Transport; Wed, 6 Nov 2024 11:46: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 AM2PEPF0001C712.mail.protection.outlook.com (10.167.16.182) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8137.17 via Frontend Transport; Wed, 6 Nov 2024 11:46:50 +0000 Received: ("Tessian outbound 4a86a9c66651:v490"); Wed, 06 Nov 2024 11:46:50 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2bb071a97161e8f5 X-TessianGatewayMetadata: 3TWHUrZTBNyfRIV4tGCYXAd5yip6EVhG663I55dG9UFRJT7bj7iIla2AWdQThmJAyFkzjSyhsZ29ZzMn/IgwPWg7sMU2KYStj/uf3ybfa0RDHZurK5IjHwpOdAJVMNopf4D2J8HYAgDjs3uQY/VXV1V/0G7F6SIMUIa1pRj620Q= X-CR-MTA-TID: 64aa7808 Received: from L202e9e92c0ee.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BB80DEC4-8641-48CC-86F1-F9953CF7B9AD.1; Wed, 06 Nov 2024 11:46:44 +0000 Received: from EUR03-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L202e9e92c0ee.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 06 Nov 2024 11:46:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kOMBn+iRIPU44ox+aAZ8+/50LfEGs3wO2Ccq5ZZ13B44ifitSgEoUcz/gGnwlxTGgLkNyS24Qq2UtzVHULjfhy0zP2zp4GhzRlldbcJFK+Dz+ifMdZfpyY8K7BE1ILZEz+qr04MqHSLoY+qaaflF+k0XJposWMSVmrDUpNmRAbi6QBWVs5bMVU8hKbnpkdABiKT83NGaIT8Nxx6YBnlpOfpSfbzgQNoNRa3H1awIZaO3tLV8M2VRWgbemSoNfeN6vVZS6sgDAHSzF6coBlFPmZVt9tO6//nizo/WR45s4JTOwXjpV/d/HTdS9qc0gdQ0uHdiBBLN8D8EiyVWQxF2XA== 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=gOeYWdjJNYbtFy/CQD0NTp3o9DlcxDpIj1sB3yLyPXU=; b=vcz9QxZ7S6vkMLKhp7OeReZEA/y0fdmiKUs9Wna7EsAyYjvxlXyfwfliDzJMMubVsgJgzajkudZ4ATyA/RGxlhJU44IywnxUMjPGfTMcsvAAy7DtIXcGu9JtIhLlp1JRVBmbBov2567zgkGwoXr6VpFpShkk/CHL4yDWH43Ko7ead0kpbG/BONL6g/7hZTGitBQWLa0jkWx+JuAwHbXjbB0rQa+dkKVPR4o1W9LlHX5LlCWfHbwzKLVSXKDYYkOn6sRnk7UTWsE/8lMh46thxU+UPe/yyB44dhGhnWBU2k13jCdOSlBIGco1MMxclaH8hFnu5iA7vV/JDPvwUQqb8A== 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=gOeYWdjJNYbtFy/CQD0NTp3o9DlcxDpIj1sB3yLyPXU=; b=XFkyxneE904R6ZDjak22tl+Qzr4FUgqZFNoLprxpcEzHRHe+2AOAwtnotewKAHkGYV330zbbYQPNxKzIB/pAgav/dxoZOapyOp8ums7yqIolF+626Sp7x8Ul01xwJVxl69aoCBw/EwSqDJEGhpS9+3ckBJb7Gv5wZTpFdYxvZtY= Received: from AS9PR06CA0419.eurprd06.prod.outlook.com (2603:10a6:20b:461::15) by PAVPR08MB9882.eurprd08.prod.outlook.com (2603:10a6:102:32a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.37; Wed, 6 Nov 2024 11:46:36 +0000 Received: from AMS0EPF00000190.eurprd05.prod.outlook.com (2603:10a6:20b:461:cafe::1a) by AS9PR06CA0419.outlook.office365.com (2603:10a6:20b:461::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.18 via Frontend Transport; Wed, 6 Nov 2024 11:46: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 AMS0EPF00000190.mail.protection.outlook.com (10.167.16.213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8137.17 via Frontend Transport; Wed, 6 Nov 2024 11:46:35 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) 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, 6 Nov 2024 11:46:30 +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, 6 Nov 2024 11:46:29 +0000 Received: from a078660.blr.arm.com (10.162.46.14) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Wed, 6 Nov 2024 11:46:28 +0000 From: Tejas Belagod To: CC: Tejas Belagod , , , , Subject: [PATCH 07/10] aarch64: Add testcase for C/C++ ops on SVE ACLE types. Date: Wed, 6 Nov 2024 17:16:10 +0530 Message-ID: <20241106114613.2972987-8-tejas.belagod@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241106114613.2972987-1-tejas.belagod@arm.com> References: <20241106114613.2972987-1-tejas.belagod@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS0EPF00000190:EE_|PAVPR08MB9882:EE_|AM2PEPF0001C712:EE_|DB9PR08MB6377:EE_ X-MS-Office365-Filtering-Correlation-Id: db06f778-1dc7-449b-85b3-08dcfe58b406 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|82310400026|376014|36860700013; X-Microsoft-Antispam-Message-Info-Original: 8kzyD1VzXBL35XnLDCObLJ236dw/IVERlI2w3dnAXcAauBVy76i9omTWSULS3XWN4lFTapPURe0Qy7K/Y0VypZtCtZOPusPFNbqWUw9ngq/7n9QahsPr8OpPXmtOrt434RSUVOWendyqVlAusFwBwy+5neeQ2PpaBEj4mhJ4AYvNIvyfzcsIY27MVo9Nr2CEzVzV5RUxcridsudggkiw6tQ3w9Lsu+TCvvDgSu6/D+XUQp5oMYA9UqySl8f7wIjxEqVeztol0LANMN0BO+LhjV4MiFYd5MaLPW3CODRuoDCmv8NiJzYYEhNIYiv7/elZ/6s0WBVpJGjECGXhX1ejVf0h1ITDSrSf+suk9/oP/jIlENm5vLj5XuOQjR7cTOpWm2nROAdxlQ8sFu4a2VTpJ6Qe6Z+Vwlk3WPoNK/8hYVQ0aR/YJF4rFRVFk+GDivGv4v7WmgX1hIIi0EioMnStywfgDrulcwfoLeFEG9A1K2Jqbsfuf+Lt/JOanOp4UXoUn07u5VduKeWTNmsotbeSsaF8iuozbJjvEOamvXCDRcjeW+7m4qicN/b6vEuQDGboa/X35kCMbJvNi/6CDjZBknAyjIsQ++IgKWzcWJPj54GvL1M2RAFg+22DDllw7/ECJ987yB4oca9NWgx39MwLQbw+2jSTdmgwJqz1R0hdzA2iOftdJrEMjq8N4cEdxflC4HxPff57x4oJunf/yPedyeklIudLKvM7XNCRLWiM59nU+nVpKWG4rHWnRaINK/BZgOxavhqQel02n+4T83Ci7DMyWn301U3JEo+/wQFE/uQri62aMhT0GqxXhXBKd33hCZMJQlB75RIl9GBpU0jtnfOAeJZ1QdBPvO8frgKrgQglhGcHNe1B+lv3N0IRL/YjLfCXu7W5xFgHcjbPCsvpBpImrLScewr4T9y5NOV8YMJCwLZRkkJeI7179jjOaNlu1YMk2KHoyVS1FeGQeePuALkBc4tORaWWjXjXNLXWFpofMaxjysIQbBFp4e9bGTAj4ojqKK9Rx3hrZ1g6BILd9PpwvLmELHh/b/lkSnMq7w6VTyPnUpiSC2Hkr1axXqU2c2cW2/FLM0Eg3NHeUUSv6aHvPSIlekLa9t6UXrGpUZYbuaRrjkO1bqCF+FnZ8plzFxVDR+kvfiSSVJ7SOJ2A/gtsvaxRINaI/TfmYB1QFTzAFtAWL1Ih0DlMzDOTWQllHfELCNIOkygxNucUV6prEswvSMtl83zzM8jNh1eJqSZFKVFNhP9sZRuF0a5xP83ZvY9JMtvEA9L9Diom5pG1fHFlTnn+n9UNcGv1K0VPPhwoxchebDxhPZYN8Hx9gRFa7x5VJVeRMXOCLbsgZTeM6l/3OPu+sCVCsmxb8p+JDVI= 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)(1800799024)(82310400026)(376014)(36860700013); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9882 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:461::15]; domain=AS9PR06CA0419.eurprd06.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM2PEPF0001C712.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 138a9800-5ba4-482f-5dd4-08dcfe58ab08 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|14060799003|1800799024|35042699022; X-Microsoft-Antispam-Message-Info: wTsLWBeO+MOCHCAEPGvnpEGRIPKNsKPAXPYU1OchP4lad+t+eEFMg8cz5gmhWunYTzqjbmV4NNrKLhey1UBDDTqOFE8qrbnJy+ms+/M2DqMmjGJY7MRUIe3X8zUaABqC8QHcxAFwAMQLZxMhxFLsozgbXZ3e1P1YoMrlQXBECGE7wzwBKazH5ePmA79q3v2sJCUrt3/tM6xDfzqzdNzgnBg0l1lproT5TH5VyCntR6sqTUFc/ecOj45jNQSNKeFx28msLqr6Nsw3KLCSZFlZcu3EnaG1ur1zYA7g16otLWoL2nma7P/XHdJXKf/+ho4ORWCDMnEEkecUf3UAsjsvhdDPAdUUVlEWjidbJgz+eUceHB4V/cPIMACy9zLzZXutNe2z+J8/EOmiv5GFE6UdYhnbK7d8RQfWNrxuG8+333y6A2M0FvMZU2T/8MMgjTpeHemm2tbPiEJGAxFGiDwDbxhou8vxvcJqaIhyN6Rk5mXm6c+btlmwvvBLspyUEdAaeelzFzy4nVoyF4WPG0UMUoFDiDTt7/sMjwzXcWx9WO4SsDTYU0wuTVjuDCRidjCb4iTHE7/mt1O8RqlaAIdu1c4GJ60ph8AMf93Xy1jIcw/6ixb7+XeXp4EnhTt3uzN2ZFuQVx06iW0kKaCvArZlXvzYjaWReRsLP16Qq/T0bUtlZsK4VXejw5Vgn23zHjw2YHcZaNeuGGFaePsOkKt4NF/SPdpS7o22QVL5VHyL+74PAlQXHQ5686DPnQjW0MrT8d0WIwgeELxf5eqatpu++CX8anDfUhEdIVe5bO+ykxG2pBhDT7rxyne5drBaEbn+zpqGX/c2fpWIBCeN/npb3EO7nz7fOV/3Rb/IZsdfzgWw51M3CoEH8U4R18s3M+RO5tEuM88dk5w0IQ0M6ozDOR4hw/kN9XOX++pkSIEuWgoPtG6Hp4XyUK0A5blmfcrOYG90e3+/hdhOEP3wOukKuwlVtUEpR5bYx6VbVXBY/2L+pXZjGhkbZ1P5prMtQMB+iSIc8XvqGeTj14of5sRJJMpPItvK75U/4kicpabdNBSimfnWCDGHRlfhgHHgTYaxZa8Psrqlq3lVmluVVhR8q0lsiQJxTW13cGN+3kw6jmeNk+vEW0HIGeTmvB80eg2SqYDQEholREiunR3w++wdt2VQyKkSq0totuk13kD1YcluR3f7OFhnAXQXcYkaw2qMui162eYbJuRwzTbzYYdnM8XiCMmDr32eAUPdQDTJeegnLn0cNr3XCI6ckA6x3Q2LqNDByNDpWF6xxiAFVZQi5+mEF4DbMhO5g1X+I1XsHISGd0EHsV+xs/CO9sSV0sObFb9P+sgV24FKadqF78eh2VIlg1cfCqPazDa5clBd1ms= 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)(36860700013)(376014)(82310400026)(14060799003)(1800799024)(35042699022); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2024 11:46:50.9890 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: db06f778-1dc7-449b-85b3-08dcfe58b406 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: AM2PEPF0001C712.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6377 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 patch adds a test case to cover C/C++ operators on SVE ACLE types. This does not cover all types, but covers most representative types. gcc/testsuite: * gcc.target/aarch64/sve/acle/general/cops.c: New test. --- .../aarch64/sve/acle/general/cops.c | 570 ++++++++++++++++++ 1 file changed, 570 insertions(+) create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c new file mode 100644 index 00000000000..28da602301e --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general/cops.c @@ -0,0 +1,570 @@ +/* { dg-do run { target aarch64_sve_hw } } */ +/* { dg-options "-O2" } */ + +#include +#include + +#define DECL_FUNC_UNARY(type, name, op, intr, su, sz, id) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _unary (type a) { \ + return op (a); \ + } \ + void checkfunc_ ## name ## type ## _unary () { \ + type data = svindex_ ## su ## sz (0, 1); \ + type zr = svindex_ ## su ## sz (0, 0); \ + type one = svindex_ ## su ## sz (1, 0); \ + type mone = svindex_ ## su ## sz (-1, 0); \ + svbool_t pg = svptrue_b ## sz (); \ + type exp = intr ## su ## sz ## _z (pg, id, data); \ + type actual = func_ ## name ## type ## _unary (data); \ + svbool_t res = svcmpeq_ ## su ## sz (pg, exp, actual); \ + if (svptest_any (pg, svnot_b_z (pg, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_UNARY_FLOAT(type, name, op, intr, su, sz, id) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _unary (type a) { \ + return op (a); \ + } \ + void checkfunc_ ## name ## type ## _unary () { \ + type data = svdup_n_ ## su ## sz (2.0); \ + type zr = svdup_n_ ## su ## sz (0.0); \ + type one = svdup_n_ ## su ## sz (1.0); \ + type mone = svdup_n_ ## su ## sz (-1.0); \ + svbool_t pg = svptrue_b ## sz (); \ + type exp = intr ## su ## sz ## _z (pg, id, data); \ + type actual = func_ ## name ## type ## _unary (data); \ + svbool_t res = svcmpeq_ ## su ## sz (pg, exp, actual); \ + if (svptest_any (pg, svnot_b_z (pg, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_INDEX(rtype, type, intr, su, sz) \ + __attribute__ ((noipa)) \ + rtype func_ ## rtype ## type ## _vindex (type a, int n) { \ + return (a[n]); \ + } \ + __attribute__ ((noipa)) \ + rtype func_ ## rtype ## type ## _cindex (type a) { \ + return (a[0]); \ + } \ + void checkfunc_ ## rtype ## type ## _vindex () { \ + type a = svindex_ ## su ## sz (0, 1); \ + int n = 2; \ + if (2 != func_ ## rtype ## type ## _vindex (a, n)) \ + __builtin_abort (); \ + } \ + void checkfunc_ ## rtype ## type ## _cindex () { \ + type a = svindex_ ## su ## sz (1, 0); \ + if (1 != func_ ## rtype ## type ## _cindex (a)) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_INDEX_FLOAT(rtype, type, intr, su, sz) \ + __attribute__ ((noipa)) \ + rtype func_ ## rtype ## type ## _vindex (type a, int n) { \ + return (a[n]); \ + } \ + __attribute__ ((noipa)) \ + rtype func_ ## rtype ## type ## _cindex (type a) { \ + return (a[0]); \ + } \ + void checkfunc_ ## rtype ## type ## _vindex () { \ + type a = svdup_n_ ## su ## sz (2.0); \ + int n = 2; \ + if (2.0 != func_ ## rtype ## type ## _vindex (a, n)) \ + __builtin_abort (); \ + } \ + void checkfunc_ ## rtype ## type ## _cindex () { \ + type a = svdup_n_ ## su ## sz (4.0); \ + if (4.0 != func_ ## rtype ## type ## _cindex (a)) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY(type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _binary(type a, type b) { \ + return (a) op (b); \ + } \ + void checkfunc_ ## name ## type ## _binary () { \ + type a = svindex_ ## su ## sz (0, 1); \ + type b = svindex_ ## su ## sz (0, 2); \ + svbool_t all_true = svptrue_b ## sz (); \ + type exp = intr ## su ## sz ## _z (all_true, a, b); \ + type actual = func_ ## name ## type ## _binary (a, b); \ + svbool_t res = svcmpeq_ ## su ## sz (all_true, exp, actual); \ + if (svptest_any (all_true, svnot_b_z (all_true, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY_SHIFT(type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _binary(type a, type b) { \ + return (a) op (b); \ + } \ + void checkfunc_ ## name ## type ## _binary () { \ + type a = svindex_ ## su ## sz (0, 1); \ + svuint ## sz ## _t b = svindex_u ## sz (0, 2); \ + type c = svindex_ ## su ## sz (0, 2); \ + svbool_t all_true = svptrue_b ## sz (); \ + type exp = intr ## su ## sz ## _z (all_true, a, b); \ + type actual = func_ ## name ## type ## _binary (a, c); \ + svbool_t res = svcmpeq_ ## su ## sz (all_true, exp, actual); \ + if (svptest_any (all_true, svnot_b_z (all_true, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY_FLOAT(type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _binary(type a, type b) { \ + return (a) op (b); \ + } \ + void checkfunc_ ## name ## type ## _binary () { \ + type a = svdup_n_ ## su ## sz (1.0); \ + type b = svdup_n_ ## su ## sz (2.0); \ + svbool_t all_true = svptrue_b ## sz (); \ + type exp = intr ## su ## sz ## _z (all_true, a, b); \ + type actual = func_ ## name ## type ## _binary (a, b); \ + svbool_t res = svcmpeq_ ## su ## sz (all_true, exp, actual); \ + if (svptest_any (all_true, svnot_b_z (all_true, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY_CMP(type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _binary_cmp(type a, type b) { \ + return (a) op (b); \ + } \ + void checkfunc_ ## name ## type ## _binary_cmp () { \ + type a = svindex_ ## su ## sz (0, 1); \ + type b = svindex_ ## su ## sz (0, 2); \ + type c = func_ ## name ## type ## _binary_cmp (a, b); \ + svbool_t all_true = svptrue_b ## sz (); \ + svbool_t pgc = svcmpne_n_ ## su ## sz (all_true, c, 0); \ + svbool_t pg = intr ## su ## sz (all_true, a, b); \ + svbool_t res = sveor_b_z (all_true, pgc, pg); \ + if (svptest_any (all_true, res)) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_TERNARY(type, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## type ## _ternary(type p, type q, type a, type b) { \ + return (p >= q) ? a : b; \ + } \ + void checkfunc_ ## type ## _ternary() { \ + type p = svindex_ ## su ## sz (0, 1); \ + type q = svindex_ ## su ## sz (1, 1); \ + type a = svindex_ ## su ## sz (2, 1); \ + type b = svindex_ ## su ## sz (3, 1); \ + svbool_t all_true = svptrue_b ## sz (); \ + svbool_t cmp = svcmpge_ ## su ## sz (all_true, p, q); \ + type res = svsel_ ## su ## sz (cmp, a, b); \ + type actual = func_ ## type ## _ternary(p, q, a, b); \ + svbool_t pgc = svcmpeq_ ## su ## sz (all_true, res, actual); \ + if (svptest_any (all_true, svnot_b_z (all_true, pgc))) \ + __builtin_abort (); \ + } + +#define VECT_CST_s8 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } +#define VECT_CST_s16 { 0, 1, 2, 3, 4, 5, 6, 7 } +#define VECT_CST_s32 { 0, 1, 2, 3 } +#define VECT_CST_s64 { 0, 1 } + +#define DECL_FUNC_INIT(type, su, sz, nelem) \ + __attribute__ ((noipa)) \ + type func_ ## type ## _init1() { \ + type temp = VECT_CST_ ## su ## sz; \ + return temp; \ + } \ + __attribute__ ((noipa)) \ + type func_ ## type ## _init2() { \ + type temp = { 0 }; \ + return temp; \ + } \ + __attribute__ ((noipa)) \ + type func_ ## type ## _init3() { \ + type temp = { }; \ + return temp; \ + } \ + __attribute__ ((noipa)) \ + type func_ ## type ## _init4() { \ + type temp = VECT_CST_ ## su ## sz; \ + return temp; \ + } \ + void checkfunc_ ## type ## _init() { \ + svbool_t all_true = svptrue_b ## sz (); \ + int ## sz ## _t mem[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; \ + svbool_t cmp ## sz = svptrue_pat_b ## sz (SV_VL ## nelem); \ + type init1 = svld1_ ## su ## sz (cmp ## sz, mem); \ + type init2 = svindex_ ## su ## sz (0, 0); \ + type init3 = svindex_ ## su ## sz (0, 0); \ + type init4 = svld1_ ## su ## sz (cmp ## sz, mem); \ + \ + type res_init1 = func_ ## type ## _init1 (); \ + svbool_t cmp = svcmpne_ ## su ## sz (all_true, init1, res_init1); \ + if (svptest_any (all_true, cmp)) \ + __builtin_abort (); \ + \ + type res_init2 = func_ ## type ## _init2 (); \ + cmp = svcmpne_ ## su ## sz (all_true, init2, res_init2); \ + if (svptest_any (all_true, cmp)) \ + __builtin_abort (); \ + \ + type res_init3 = func_ ## type ## _init3 (); \ + cmp = svcmpne_ ## su ## sz (all_true, init3, res_init3); \ + if (svptest_any (all_true, cmp)) \ + __builtin_abort (); \ + \ + type res_init4 = func_ ## type ## _init4 (); \ + cmp = svcmpne_ ## su ## sz (all_true, init4, res_init4); \ + if (svptest_any (all_true, cmp)) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_TERNARY_FLOAT(type, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## type ## _ternary(type p, type q, type a, type b) { \ + return (p >= q) ? a : b; \ + } \ + void checkfunc_ ## type ## _ternary() { \ + type p = svdup_n_ ## su ## sz (2.0); \ + type q = svdup_n_ ## su ## sz (1.0); \ + type a = svdup_n_ ## su ## sz (3.0); \ + type b = svdup_n_ ## su ## sz (4.0); \ + svbool_t all_true = svptrue_b ## sz (); \ + svbool_t cmp = svcmpge_ ## su ## sz (all_true, p, q); \ + type res = svsel_ ## su ## sz (cmp, a, b); \ + type actual = func_ ## type ## _ternary(p, q, a, b); \ + svbool_t pgc = svcmpeq_ ## su ## sz (all_true, res, actual); \ + if (svptest_any (all_true, svnot_b_z (all_true, pgc))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY_SCALAR(scalar, type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _binary_cscalar(type a) { \ + return (a) op scalar; \ + } \ + __attribute__ ((noipa)) \ + type func_ ## name ## type ## _binary_vscalar(type a, int b) { \ + return (a) op b; \ + } \ + void checkfunc_ ## name ## type ## _binary_cscalar () { \ + type a = svindex_ ## su ## sz (0, 1); \ + svbool_t pg = svptrue_b ## sz (); \ + type exp = intr ## su ## sz ## _z (pg, a, scalar); \ + type actual = func_ ## name ## type ## _binary_cscalar (a); \ + svbool_t res = svcmpeq_ ## su ## sz (pg, exp, actual); \ + if (svptest_any (pg, svnot_b_z (pg, res))) \ + __builtin_abort (); \ + } \ + void checkfunc_ ## name ## type ## _binary_vscalar () { \ + type a = svindex_ ## su ## sz (0, 1); \ + svbool_t pg = svptrue_b ## sz (); \ + uint ## sz ## _t b = scalar; \ + type exp = intr ## su ## sz ## _z (pg, a, b); \ + type actual = func_ ## name ## type ## _binary_vscalar (a, b); \ + svbool_t res = svcmpeq_ ## su ## sz (pg, exp, actual); \ + if (svptest_any (pg, svnot_b_z (pg, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_UNARY_RET_FLOAT(rtype, type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + rtype func_ ## name ## rtype ## type ## _unary(type a) { \ + return op (a); \ + } \ + void checkfunc_ ## name ## rtype ## type ## _unary () { \ + type a = svdup_n_ ## su ## sz (2.0); \ + svbool_t pg = svptrue_b ## sz (); \ + rtype exp = intr ## su ## sz ## _z (a); \ + rtype actual = func_ ## name ## type ## _unary (a); \ + svbool_t res = svcmpeq_ ## su ## sz (pg, exp, actual); \ + if (svptest_any (pg, svnot_b_z (pg, res))) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY_RET_FLOAT_CMP(rtype, type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + rtype func_ ## name ## rtype ## type ## _binary_cmp(type a, type b) { \ + return (a) op (b); \ + } \ + void checkfunc_ ## name ## rtype ## type ## _binary_cmp () { \ + type a = svdup_n_ ## su ## sz (2.0); \ + type b = svdup_n_ ## su ## sz (3.0); \ + svbool_t all_true = svptrue_b ## sz (); \ + rtype cmp = func_ ## name ## rtype ## type ## _binary_cmp (a, b); \ + svbool_t pgc = intr ## su ## sz (all_true, a, b) ; \ + svbool_t pg = svcmpne_n_s ## sz (all_true, cmp, 0); \ + svbool_t res = sveor_b_z (all_true, pg, pgc); \ + if (svptest_any (all_true, res)) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_BINARY_RET_COND(rtype, type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + rtype func_ ## name ## rtype ## type ## _binary_cond(type a, type b) { \ + return (a) op (b); \ + } \ + __attribute__ ((noipa)) \ + svbool_t name ## intr ## su ## sz (svbool_t t, type a, type b) { \ + svbool_t pgl = svcmpne_n_ ## su ## sz (t, a, 0); \ + svbool_t pgr = svcmpne_n_ ## su ## sz (t, b, 0); \ + return intr ## b_z (t, pgl, pgr); \ + } \ + void checkfunc_ ## name ## rtype ## type ## _binary_cond () { \ + type a = svdup_n_ ## su ## sz (2); \ + type b = svdup_n_ ## su ## sz (3); \ + svbool_t all_true = svptrue_b ## sz (); \ + rtype cmp = func_ ## name ## rtype ## type ## _binary_cond (a, b); \ + svbool_t pgc = name ## intr ## su ## sz (all_true, a, b) ; \ + svbool_t pg = svcmpne_n_s ## sz (all_true, cmp, 0); \ + svbool_t res = sveor_b_z (all_true, pg, pgc); \ + if (svptest_any (all_true, res)) \ + __builtin_abort (); \ + } + +#define DECL_FUNC_UNARY_RET_COND(rtype, type, name, op, intr, su, sz) \ + __attribute__ ((noipa)) \ + rtype func_ ## name ## rtype ## type ## _unary_cond (type a) { \ + return op (a); \ + } \ + __attribute__ ((noipa)) \ + svbool_t name ## intr ## su ## sz (svbool_t t, type a) { \ + svbool_t pgl = svcmpeq_n_ ## su ## sz (t, a, 0); \ + return pgl; \ + } \ + void checkfunc_ ## name ## rtype ## type ## _unary_cond () { \ + type a = svdup_n_ ## su ## sz (2); \ + svbool_t all_true = svptrue_b ## sz (); \ + rtype cmp = func_ ## name ## rtype ## type ## _unary_cond (a); \ + svbool_t pgc = name ## intr ## su ## sz (all_true, a) ; \ + svbool_t pg = svcmpne_n_s ## sz (all_true, cmp, 0); \ + svbool_t res = sveor_b_z (all_true, pg, pgc); \ + if (svptest_any (all_true, res)) \ + __builtin_abort (); \ + } + +#define TYPES_UNARY(name, op, intr, id) \ + DECL_FUNC_UNARY (svint8_t, name, op, intr, s, 8, id) \ + DECL_FUNC_UNARY (svint16_t, name, op, intr, s, 16, id) \ + DECL_FUNC_UNARY (svint32_t, name, op, intr, s, 32, id) \ + DECL_FUNC_UNARY (svint64_t, name, op, intr, s, 64, id) \ + DECL_FUNC_UNARY_FLOAT (svfloat32_t, name, op, intr, f, 32, id) \ + DECL_FUNC_UNARY_FLOAT (svfloat64_t, name, op, intr, f, 64, id) + +#define TYPES_INT_UNARY(name, op, intr, id) \ + DECL_FUNC_UNARY (svint8_t, name, op, intr, s, 8, id) \ + DECL_FUNC_UNARY (svint16_t, name, op, intr, s, 16, id) \ + DECL_FUNC_UNARY (svint32_t, name, op, intr, s, 32, id) \ + DECL_FUNC_UNARY (svint64_t, name, op, intr, s, 64, id) + +#define TYPES_BINARY(name, op, intr) \ + DECL_FUNC_BINARY (svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_BINARY (svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_BINARY (svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY (svint64_t, name, op, intr, s, 64) \ + DECL_FUNC_BINARY_FLOAT (svfloat32_t, name, op, intr, f, 32) \ + DECL_FUNC_BINARY_FLOAT (svfloat64_t, name, op, intr, f, 64) + +#define TYPES_BINARY32_64(name, op, intr) \ + DECL_FUNC_BINARY (svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY (svint64_t, name, op, intr, s, 64) + +#define TYPES_TERNARY() \ + DECL_FUNC_TERNARY (svint8_t, s, 8) \ + DECL_FUNC_TERNARY (svint16_t, s, 16) \ + DECL_FUNC_TERNARY (svint32_t, s, 32) \ + DECL_FUNC_TERNARY (svint64_t, s, 64) \ + DECL_FUNC_TERNARY_FLOAT (svfloat32_t, f, 32) \ + DECL_FUNC_TERNARY_FLOAT (svfloat64_t, f, 64) + +#define TYPES_INDEX(intr) \ + DECL_FUNC_INDEX (int8_t, svint8_t, intr, s, 8) \ + DECL_FUNC_INDEX (int16_t, svint16_t, intr, s, 16) \ + DECL_FUNC_INDEX (int32_t, svint32_t, intr, s, 32) \ + DECL_FUNC_INDEX (int64_t, svint64_t, intr, s, 64) \ + DECL_FUNC_INDEX_FLOAT (float32_t, svfloat32_t, intr, f, 32) \ + DECL_FUNC_INDEX_FLOAT (float64_t, svfloat64_t, intr, f, 64) + +#define TYPES_INT_BINARY(name, op, intr) \ + DECL_FUNC_BINARY (svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_BINARY (svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_BINARY (svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY (svint64_t, name, op, intr, s, 64) + +#define TYPES_INT_BINARY_SHIFT(name, op, intr) \ + DECL_FUNC_BINARY_SHIFT (svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_BINARY_SHIFT (svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_BINARY_SHIFT (svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY_SHIFT (svint64_t, name, op, intr, s, 64) + +#define TYPES_INT_BINARY_CMP(name, op, intr) \ + DECL_FUNC_BINARY_CMP (svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_BINARY_CMP (svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_BINARY_CMP (svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY_CMP (svint64_t, name, op, intr, s, 64) \ + +#define TYPES_INT_BINARY_SCALAR(c, name, op, intr) \ + DECL_FUNC_BINARY_SCALAR (c, svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_BINARY_SCALAR (c, svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_BINARY_SCALAR (c, svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY_SCALAR (c, svint64_t, name, op, intr, s, 64) + +#define TYPES_FLOAT_BINARY_RET_CMP(name, op, intr) \ + DECL_FUNC_BINARY_RET_FLOAT_CMP (svint32_t, svfloat32_t, name, op, intr, f, 32) \ + DECL_FUNC_BINARY_RET_FLOAT_CMP (svint64_t, svfloat64_t, name, op, intr, f, 64) + +#define TYPES_FLOAT_UNARY_RET(name, op, intr) \ + DECL_FUNC_UNARY_RET_FLOAT (svint32_t, svfloat32_t, name, op, intr, f, 32) \ + DECL_FUNC_UNARY_RET_FLOAT (svint64_t, svfloat64_t, name, op, intr, f, 64) + +#define TYPES_BINARY_RET_COND(name, op, intr) \ + DECL_FUNC_BINARY_RET_COND (svint8_t, svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_BINARY_RET_COND (svint16_t, svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_BINARY_RET_COND (svint32_t, svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_BINARY_RET_COND (svint64_t, svint64_t, name, op, intr, s, 64) \ + DECL_FUNC_BINARY_RET_COND (svint32_t, svfloat32_t, name, op, intr, f, 32) \ + DECL_FUNC_BINARY_RET_COND (svint64_t, svfloat64_t, name, op, intr, f, 64) + +#define TYPES_UNARY_RET_COND(name, op, intr) \ + DECL_FUNC_UNARY_RET_COND (svint8_t, svint8_t, name, op, intr, s, 8) \ + DECL_FUNC_UNARY_RET_COND (svint16_t, svint16_t, name, op, intr, s, 16) \ + DECL_FUNC_UNARY_RET_COND (svint32_t, svint32_t, name, op, intr, s, 32) \ + DECL_FUNC_UNARY_RET_COND (svint64_t, svint64_t, name, op, intr, s, 64) \ + DECL_FUNC_UNARY_RET_COND (svint32_t, svfloat32_t, name, op, intr, f, 32) \ + DECL_FUNC_UNARY_RET_COND (svint64_t, svfloat64_t, name, op, intr, f, 64) + +#define TYPES_INIT() \ + DECL_FUNC_INIT (svint8_t, s, 8, 16) \ + DECL_FUNC_INIT (svint16_t, s, 16, 8) \ + DECL_FUNC_INIT (svint32_t, s, 32, 4) \ + DECL_FUNC_INIT (svint64_t, s, 64, 2) + +#define C_TYPES \ + TYPES_INIT () \ + TYPES_UNARY (plus, +, svadd_, zr) \ + TYPES_UNARY (minus, -, svsub_, zr) \ + TYPES_UNARY (plus_plus, ++, svadd_, one) \ + TYPES_UNARY (minus_minus, --, svadd_, mone) \ + TYPES_INDEX (svget_lane_) \ + TYPES_BINARY (plus, +, svadd_) \ + TYPES_BINARY (minus, -, svsub_) \ + TYPES_BINARY (mult, *, svmul_) \ + TYPES_BINARY32_64 (div, /, svdiv_) \ + TYPES_INT_BINARY (and, &, svand_) \ + TYPES_INT_BINARY (orr, |, svorr_) \ + TYPES_INT_UNARY (not, ~, sveor_, mone) \ + TYPES_INT_BINARY (eor, ^, sveor_) \ + TYPES_INT_BINARY_SHIFT (lshift, <<, svlsl_) \ + TYPES_INT_BINARY_SHIFT (rshift, >>, svasr_) \ + TYPES_INT_BINARY_SCALAR (2, lshift, <<, svlsl_n_) \ + TYPES_INT_BINARY_SCALAR (2, rshift, >>, svasr_n_) \ + TYPES_INT_BINARY_CMP (eq, ==, svcmpeq_) \ + TYPES_INT_BINARY_CMP (ne, !=, svcmpne_) \ + TYPES_INT_BINARY_CMP (gt, >, svcmpgt_) \ + TYPES_INT_BINARY_CMP (lt, <, svcmplt_) \ + TYPES_INT_BINARY_CMP (ge, >=, svcmpge_) \ + TYPES_INT_BINARY_CMP (le, <=, svcmple_) \ + TYPES_FLOAT_BINARY_RET_CMP (eq, ==, svcmpeq_) \ + TYPES_FLOAT_BINARY_RET_CMP (ne, !=, svcmpne_) \ + TYPES_FLOAT_BINARY_RET_CMP (gt, >, svcmpgt_) \ + TYPES_FLOAT_BINARY_RET_CMP (lt, <, svcmplt_) \ + TYPES_FLOAT_BINARY_RET_CMP (ge, >=, svcmpge_) \ + TYPES_FLOAT_BINARY_RET_CMP (le, <=, svcmple_) \ + +#ifdef __cplusplus +#define CPP_TYPES \ + TYPES_BINARY_RET_COND (and_and, &&, svand_) \ + TYPES_BINARY_RET_COND (or_or, ||, svorr_) \ + TYPES_UNARY_RET_COND (lnot, !, svnot_z_) \ + TYPES_TERNARY () +#endif + +/* Declare and define functions. */ +C_TYPES + +#ifdef __cplusplus +CPP_TYPES +#endif + +#undef DECL_FUNC_UNARY +#define DECL_FUNC_UNARY(type, name, op, intr, su, sz, id) \ + checkfunc_ ## name ## type ## _unary (); + +#undef DECL_FUNC_UNARY_FLOAT +#define DECL_FUNC_UNARY_FLOAT(type, name, op, intr, su, sz, id) \ + checkfunc_ ## name ## type ## _unary (); + +#undef DECL_FUNC_UNARY_RET_FLOAT +#define DECL_FUNC_UNARY_RET_FLOAT(type, name, op, intr, su, sz, id) \ + checkfunc_ ## name ## type ## _unary (); + +#undef DECL_FUNC_INDEX +#define DECL_FUNC_INDEX(rtype, type, intr, su, sz) \ + checkfunc_ ## rtype ## type ## _vindex (); \ + checkfunc_ ## rtype ## type ## _cindex (); + +#undef DECL_FUNC_INDEX_FLOAT +#define DECL_FUNC_INDEX_FLOAT(rtype, type, intr, su, sz) \ + checkfunc_ ## rtype ## type ## _vindex (); \ + checkfunc_ ## rtype ## type ## _cindex (); + +#undef DECL_FUNC_BINARY +#define DECL_FUNC_BINARY(type, name, op, intr, su, sz) \ + checkfunc_ ## name ## type ## _binary (); + +#undef DECL_FUNC_BINARY_SHIFT +#define DECL_FUNC_BINARY_SHIFT(type, name, op, intr, su, sz) \ + checkfunc_ ## name ## type ## _binary (); + +#undef DECL_FUNC_BINARY_FLOAT +#define DECL_FUNC_BINARY_FLOAT(type, name, op, intr, su, sz) \ + checkfunc_ ## name ## type ## _binary (); + +#undef DECL_FUNC_BINARY_CMP +#define DECL_FUNC_BINARY_CMP(type, name, op, intr, su, sz) \ + checkfunc_ ## name ## type ## _binary_cmp (); + +#undef DECL_FUNC_TERNARY +#define DECL_FUNC_TERNARY(type, su, sz) \ + checkfunc_ ## type ## _ternary (); + +#undef DECL_FUNC_INIT +#define DECL_FUNC_INIT(type, su, sz, nelem) \ + checkfunc_ ## type ## _init (); + +#undef DECL_FUNC_TERNARY_FLOAT +#define DECL_FUNC_TERNARY_FLOAT(type, su, sz) \ + checkfunc_ ## type ## _ternary (); + +#undef DECL_FUNC_BINARY_SCALAR +#define DECL_FUNC_BINARY_SCALAR(scalar, type, name, op, intr, su, sz) \ + checkfunc_ ## name ## type ## _binary_cscalar (); \ + checkfunc_ ## name ## type ## _binary_vscalar (); + +#undef DECL_FUNC_BINARY_RET_FLOAT_CMP +#define DECL_FUNC_BINARY_RET_FLOAT_CMP(rtype, type, name, op, intr, su, sz) \ + checkfunc_ ## name ## rtype ## type ## _binary_cmp (); + +#undef DECL_FUNC_BINARY_RET_COND +#define DECL_FUNC_BINARY_RET_COND(rtype, type, name, op, intr, su, sz) \ + checkfunc_ ## name ## rtype ## type ## _binary_cond (); + +#undef DECL_FUNC_UNARY_RET_COND +#define DECL_FUNC_UNARY_RET_COND(rtype, type, name, op, intr, su, sz) \ + checkfunc_ ## name ## rtype ## type ## _unary_cond (); + +int +main (void) +{ + C_TYPES + +#ifdef __cplusplus + CPP_TYPES +#endif + + return 0; +}