From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2066.outbound.protection.outlook.com [40.107.21.66]) by sourceware.org (Postfix) with ESMTPS id 967773858423 for ; Thu, 16 Feb 2023 06:14:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 967773858423 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8m8GsSsvOg5KpZxQ3sRd9i5ascT6WaVm3ogcuv8AoDQ=; b=Ys4i3P1QNc7NVVanhjarBWxRoY0QlUPzJmrMH1HgGav8B5yD0wNGpucXDmGw0ekS5dxazwGTxe37+7sEqCdvRB84/aAn+D4q9To8NGdkvP6o5UC2FhVXBX9L1c0U11vPAhjNlEqgvn/GwJnsrlRd2pnx2b3x2Hb+bU1Z5sSfMBk= Received: from DBBPR09CA0042.eurprd09.prod.outlook.com (2603:10a6:10:d4::30) by AS8PR08MB6742.eurprd08.prod.outlook.com (2603:10a6:20b:351::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.12; Thu, 16 Feb 2023 06:14:48 +0000 Received: from DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:d4:cafe::6a) by DBBPR09CA0042.outlook.office365.com (2603:10a6:10:d4::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.12 via Frontend Transport; Thu, 16 Feb 2023 06:14: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=armh.onmicrosoft.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 DBAEUR03FT048.mail.protection.outlook.com (100.127.142.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.12 via Frontend Transport; Thu, 16 Feb 2023 06:14:48 +0000 Received: ("Tessian outbound 8038f0863a52:v132"); Thu, 16 Feb 2023 06:14:48 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 944fcefc1f542b16 X-CR-MTA-TID: 64aa7808 Received: from 5be24e2cb99a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E7FCE8AA-5543-4EFF-8DD5-FEC04A3F42F7.1; Thu, 16 Feb 2023 06:14:42 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5be24e2cb99a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 16 Feb 2023 06:14:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d0MZ2+YZBrj/HaZi3eKbPWNF8pe09iu9sY+OhkAWAhdahL6GZrChW8Jw0XVc/hyNgmTcJDwiWGq9alzmc7Mh2iC9z6kFuUZ0e4gu/RY4EKDsIsllJqNLwBQ6L0YZC938dSnt7Tshz9FcQjTf4OrWcmA2Bat3HJ9Q/+nYXhoZs3R1ygwcx+1kkXbrXqnA/aoVJBeAui+AF4OFkeBYakW7L7GOF7G3wu70BcbkY5XW1jaTjDKz91kFw7MIoJ7YsG/EHuwNfMrPVLLKRSBfZ6TwR3fDLPKTBAaoqaLJBYc7RV2qhNZ5OX0JAsRTeEs8r+oliwBI+ZQDTZ+0N9M3YjOJ4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=8m8GsSsvOg5KpZxQ3sRd9i5ascT6WaVm3ogcuv8AoDQ=; b=IAe5pYw9sSSnnjTM+cI2jpjVL/bEwfjpO1WLaiK7FM/57jd37L6dT+DFsDJuzcTH1Y6+aI57LXLNQMROCZ7rf/Qehi5Pl4RaCtHzDKiJalRvIA7rjUc2gr1PdwsC7Vxy/vPXDVrl9SxwAl54q8FlWQWbS/hKQKZp3pSK65lFpOnk3sKp2Nd0nmb96Bm/azsXHMnoCGk7OehPSDhOki/NdKnbPjV/EUNjHh/OUc8+LZmLcaLTuHoKTurSrOcZztDHXsCCjoLGnnHvs6N3j9zYxh3bz/sMczTXMc3o7CQOYnTa+mhs3MceTi7Vc9OJDoCUNPWOcoUWbsBkrTNihkxKjQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8m8GsSsvOg5KpZxQ3sRd9i5ascT6WaVm3ogcuv8AoDQ=; b=Ys4i3P1QNc7NVVanhjarBWxRoY0QlUPzJmrMH1HgGav8B5yD0wNGpucXDmGw0ekS5dxazwGTxe37+7sEqCdvRB84/aAn+D4q9To8NGdkvP6o5UC2FhVXBX9L1c0U11vPAhjNlEqgvn/GwJnsrlRd2pnx2b3x2Hb+bU1Z5sSfMBk= Received: from DUZPR01CA0057.eurprd01.prod.exchangelabs.com (2603:10a6:10:469::6) by PA4PR08MB7387.eurprd08.prod.outlook.com (2603:10a6:102:2a2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.26; Thu, 16 Feb 2023 06:14:39 +0000 Received: from DBAEUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:469:cafe::62) by DUZPR01CA0057.outlook.office365.com (2603:10a6:10:469::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.12 via Frontend Transport; Thu, 16 Feb 2023 06:14:39 +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 DBAEUR03FT052.mail.protection.outlook.com (100.127.142.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6111.13 via Frontend Transport; Thu, 16 Feb 2023 06:14:39 +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.17; Thu, 16 Feb 2023 06:14:38 +0000 Received: from e124570.cambridge.arm.com (10.2.79.30) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.17 via Frontend Transport; Thu, 16 Feb 2023 06:14:38 +0000 From: Tejas Belagod To: CC: Tejas Belagod , , Subject: [PATCH 2/2, GCC12] AArch64: Gate various crypto intrinsics availability based on features Date: Thu, 16 Feb 2023 06:13:51 +0000 Message-ID: <20230216061351.25090-2-tejas.belagod@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230216061351.25090-1-tejas.belagod@arm.com> References: <20230216061351.25090-1-tejas.belagod@arm.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT052:EE_|PA4PR08MB7387:EE_|DBAEUR03FT048:EE_|AS8PR08MB6742:EE_ X-MS-Office365-Filtering-Correlation-Id: f9cdb0ab-5c9a-4f05-8e7b-08db0fe51b51 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 9M3zXmBV9KsXjCNs6Q3HMpUJkmgQdTlAYktVhLWdMpQh3QxI91v+grT8nQMo0tXA/KT0/BktWww3Rr8ziwYrZZDL15l2JMB83EOGsYaneoB+PqBdC8dUGj7IXaHugOQU+mbEvZ+ynLTFrxWmzOMLto0qvmyaGVf3GU9tLoUQJZVOP5DdE/jMymH4DxOLZB1/6fc7YEYGYh1MhIZz0XhS2omPvQ5telGWuhhES/3rdGf3uaVj4l+YWkhr0QnOcK5/VAkyaLGtP612WhS2P6AoloKh593b2Vp8SE2+cER5WOL9FPYcfLSr9j9p22/HxxJpsVbvD8Fpq12gBP5rCKMNp50Mdk/yFg1OTyUwbqtqMRiG1V9QplUOa3XS/gA7YnmQpNvKyRsqCMB2BS0QNppDGX9DP/xUSOLsPsAzRYhc2toxvkoeCBzOa/zb31TtZ1H86s3OiK2n7VWfD3UIUuRbLpQLxleJ2/fEoXyVXDI3+U1TmLDPy7mhfyyT/cVrIg3UZhJJg0Z1Im+ruFZKxLuvN1lTMCTlQu9cEKAtLyvoahN7zImO09r/hxOioIuhkdHVJ/KVq4Z10ptdaE1etN5jGuvjavfpELhYSY2pf8QaZALhYIqpyNq5KD8i1NG1/sEzfCJU+ZlyvlOpPsa1q7JIkJ8chcD02pPSRc7028IQJBWIdLMRfeGQPq53jZ22RBsZDRFRE3kWB4wMGMWrPi+Y7azdDe+YhnxFJbLZRDSrYOWy2aQTabPozZ2+NkzurDGcwQVXN/Qvjq/0JYOQYhdDxg== 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:(13230025)(4636009)(136003)(376002)(396003)(346002)(39860400002)(451199018)(40470700004)(36840700001)(46966006)(36756003)(26005)(478600001)(7696005)(40480700001)(47076005)(36860700001)(426003)(83380400001)(82310400005)(86362001)(82740400003)(356005)(81166007)(6666004)(1076003)(336012)(2616005)(40460700003)(84970400001)(44832011)(5660300002)(316002)(41300700001)(8936002)(54906003)(186003)(8676002)(70206006)(2906002)(70586007)(4326008)(6916009)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB7387 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 041ef7c3-3ab8-4525-3bb1-08db0fe515dc X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VRVed7zqDNejzLxkrQLcHd07CUfHHIwyxlYGxkqXfnPu8mn/CiqvPxeWd1zaJh7uVED+70fxfuVhHMQdkHhFbZfoGVIUj8NhTH7fnGAwj+s1Zu6/NewohAlRjSLaOY6aG33UtnNOKfyby9w0A0+bFD5ZzxOGTtCJwsxg/Skd0R1LM8GDhGuk4q/kI4CgGwpa3MWHkwQGI7ZqGJxj5RR+2oPKy+jdOllvyAlmGpKV7EQx2/ghsywb+pZPtGCiwtAaFLtGwgySo+LKRMXZDxeK4dzUP3se6IXhvSWYT7S1hFhbQfvNFdUjxjWvUD65s5z8M+by/exk0jV2IoNOo52DpAECMze1Yew/p4JvaZOWFTJgoA678N3Y+VMNN7lEe9F4OCYrbLMk95LEMrNf1YjHNvlYetIQHy9G3MbInWym+O34J34Q27nci71+6NDUhVpnYsu8pmLtCXiwJZla2i3ZeLIcySgwWpqr1KbbUOTZAfo/Y6H4F33O4EzxDpkc38M2hEc2Zj6J1FRKKXnyTYy0DUszvYwjaVsbj20GpsLGWMcnvEBkzIor6Eo5H8Sum0ZWkAi+lN2knVsECFSEcb10vhTLwQxlA5ktGj+KRnDZ/EVkKvV4Hk1QZetLhiwBUoX1Q83XWL9j0oNp1WXQ/qJJJTBHTnguAeucxK4JX0dvWqHofyWqw4OOZGO5qwL5mNLtQ7hosLBLl3KZ/3W4Lzr7ENw2R6RA2a8LJFxOaDksWh4= 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:(13230025)(4636009)(346002)(396003)(39860400002)(376002)(136003)(451199018)(36840700001)(40470700004)(46966006)(41300700001)(82740400003)(478600001)(82310400005)(8936002)(316002)(54906003)(84970400001)(70586007)(70206006)(8676002)(4326008)(6916009)(5660300002)(44832011)(40460700003)(36756003)(7696005)(81166007)(2906002)(36860700001)(186003)(26005)(6666004)(40480700001)(47076005)(426003)(2616005)(86362001)(83380400001)(336012)(1076003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2023 06:14:48.3314 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f9cdb0ab-5c9a-4f05-8e7b-08db0fe51b51 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: DBAEUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6742 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,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 List-Id: The 64-bit variant of PMULL{2} and AES instructions are available if FEAT_AES is implemented according to the Arm ARM [1]. Similarly FEAT_SHA1 and FEAT_SHA256 enable the use of SHA1 and SHA256 instruction variants. This patch fixes arm_neon.h to correctly reflect the feature availability based on '+aes' and '+sha2' as opposed to the ambiguous catch-all '+crypto'. [1] Section D17.2.61, C7.2.215 2022-01-11 Tejas Belagod gcc/ChangeLog: * config/aarch64/arm_neon.h (vmull_p64, vmull_high_p64, vaeseq_u8, vaesdq_u8, vaesmcq_u8, vaesimcq_u8): Gate under "nothing+aes". (vsha1*_u32, vsha256*_u32): Gate under "nothing+sha2". gcc/testsuite/ChangeLog: * gcc.target/aarch64/acle/pmull64.c: New. * gcc.target/aarch64/aes-fuse-1.c: Replace '+crypto' with corresponding feature flag based on the intrinsic. * gcc.target/aarch64/aes-fuse-2.c: Likewise. * gcc.target/aarch64/aes_1.c: Likewise. * gcc.target/aarch64/aes_2.c: Likewise. * gcc.target/aarch64/aes_xor_combine.c: Likewise. * gcc.target/aarch64/sha1_1.c: Likewise. * gcc.target/aarch64/sha256_1.c: Likewise. * gcc.target/aarch64/target_attr_crypto_ice_1.c: Likewise. --- gcc/config/aarch64/arm_neon.h | 35 ++++++++++--------- .../gcc.target/aarch64/acle/pmull64.c | 14 ++++++++ gcc/testsuite/gcc.target/aarch64/aes-fuse-1.c | 4 +-- gcc/testsuite/gcc.target/aarch64/aes-fuse-2.c | 4 +-- gcc/testsuite/gcc.target/aarch64/aes_1.c | 2 +- gcc/testsuite/gcc.target/aarch64/aes_2.c | 4 ++- .../gcc.target/aarch64/aes_xor_combine.c | 2 +- gcc/testsuite/gcc.target/aarch64/sha1_1.c | 2 +- gcc/testsuite/gcc.target/aarch64/sha256_1.c | 2 +- .../aarch64/target_attr_crypto_ice_1.c | 2 +- 10 files changed, 44 insertions(+), 27 deletions(-) create mode 100644 gcc/testsuite/gcc.target/aarch64/acle/pmull64.c diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h index 85d03c58d2a..695aafd9a5e 100644 --- a/gcc/config/aarch64/arm_neon.h +++ b/gcc/config/aarch64/arm_neon.h @@ -10243,7 +10243,7 @@ vqrdmlshs_laneq_s32 (int32_t __a, int32_t __b, int32x4_t __c, const int __d) #pragma GCC pop_options #pragma GCC push_options -#pragma GCC target ("+nothing+crypto") +#pragma GCC target ("+nothing+aes") /* vaes */ __extension__ extern __inline uint8x16_t @@ -10273,6 +10273,22 @@ vaesimcq_u8 (uint8x16_t data) { return __builtin_aarch64_crypto_aesimcv16qi_uu (data); } + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_p64 (poly64_t __a, poly64_t __b) +{ + return + __builtin_aarch64_crypto_pmulldi_ppp (__a, __b); +} + +__extension__ extern __inline poly128_t +__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) +vmull_high_p64 (poly64x2_t __a, poly64x2_t __b) +{ + return __builtin_aarch64_crypto_pmullv2di_ppp (__a, __b); +} + #pragma GCC pop_options /* vcage */ @@ -23519,7 +23535,7 @@ vrsrad_n_u64 (uint64_t __a, uint64_t __b, const int __c) } #pragma GCC push_options -#pragma GCC target ("+nothing+crypto") +#pragma GCC target ("+nothing+sha2") /* vsha1 */ @@ -23596,21 +23612,6 @@ vsha256su1q_u32 (uint32x4_t __tw0_3, uint32x4_t __w8_11, uint32x4_t __w12_15) __w12_15); } -__extension__ extern __inline poly128_t -__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) -vmull_p64 (poly64_t __a, poly64_t __b) -{ - return - __builtin_aarch64_crypto_pmulldi_ppp (__a, __b); -} - -__extension__ extern __inline poly128_t -__attribute__ ((__always_inline__, __gnu_inline__, __artificial__)) -vmull_high_p64 (poly64x2_t __a, poly64x2_t __b) -{ - return __builtin_aarch64_crypto_pmullv2di_ppp (__a, __b); -} - #pragma GCC pop_options /* vshl */ diff --git a/gcc/testsuite/gcc.target/aarch64/acle/pmull64.c b/gcc/testsuite/gcc.target/aarch64/acle/pmull64.c new file mode 100644 index 00000000000..6a1e99e2d0d --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/acle/pmull64.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-march=armv8.2-a" } */ + +#pragma push_options +#pragma GCC target ("+aes") + +#include "arm_neon.h" + +int foo (poly64_t a, poly64_t b) +{ + return vgetq_lane_s32 (vreinterpretq_s32_p128 (vmull_p64 (a, b)), 0); +} + +/* { dg-final { scan-assembler "\tpmull\tv" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/aes-fuse-1.c b/gcc/testsuite/gcc.target/aarch64/aes-fuse-1.c index d7b4f89919d..1b4e10f78db 100644 --- a/gcc/testsuite/gcc.target/aarch64/aes-fuse-1.c +++ b/gcc/testsuite/gcc.target/aarch64/aes-fuse-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -mcpu=cortex-a72+crypto -dp" } */ -/* { dg-additional-options "-march=armv8-a+crypto" { target { aarch64*-*-* } } }*/ +/* { dg-options "-O3 -mcpu=cortex-a72+aes -dp" } */ +/* { dg-additional-options "-march=armv8-a+aes" { target { aarch64*-*-* } } }*/ #include diff --git a/gcc/testsuite/gcc.target/aarch64/aes-fuse-2.c b/gcc/testsuite/gcc.target/aarch64/aes-fuse-2.c index dfe01b03a36..4c028b39083 100644 --- a/gcc/testsuite/gcc.target/aarch64/aes-fuse-2.c +++ b/gcc/testsuite/gcc.target/aarch64/aes-fuse-2.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -mcpu=cortex-a72+crypto -dp" } */ -/* { dg-additional-options "-march=armv8-a+crypto" { target { aarch64*-*-* } } }*/ +/* { dg-options "-O3 -mcpu=cortex-a72+aes -dp" } */ +/* { dg-additional-options "-march=armv8-a+aes" { target { aarch64*-*-* } } }*/ #include diff --git a/gcc/testsuite/gcc.target/aarch64/aes_1.c b/gcc/testsuite/gcc.target/aarch64/aes_1.c index 5578e85dab7..754c4ab90e7 100644 --- a/gcc/testsuite/gcc.target/aarch64/aes_1.c +++ b/gcc/testsuite/gcc.target/aarch64/aes_1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-march=armv8-a+crypto" } */ +/* { dg-options "-march=armv8-a+aes" } */ #include "arm_neon.h" diff --git a/gcc/testsuite/gcc.target/aarch64/aes_2.c b/gcc/testsuite/gcc.target/aarch64/aes_2.c index 70f113fb5ab..442c1006706 100644 --- a/gcc/testsuite/gcc.target/aarch64/aes_2.c +++ b/gcc/testsuite/gcc.target/aarch64/aes_2.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -march=armv8-a+crypto" } */ +/* { dg-options "-O3 -march=armv8-a+aes" } */ #include "arm_neon.h" @@ -76,4 +76,6 @@ test7 (uint8x16_t a, uint8x16_t b) return result; } /* { dg-final { scan-assembler-not "mov" } } */ +/* { dg-final { scan-assembler "aesd\tv" } } */ +/* { dg-final { scan-assembler "aese\tv" } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/aes_xor_combine.c b/gcc/testsuite/gcc.target/aarch64/aes_xor_combine.c index 833e9b3073b..ee0f0e99856 100644 --- a/gcc/testsuite/gcc.target/aarch64/aes_xor_combine.c +++ b/gcc/testsuite/gcc.target/aarch64/aes_xor_combine.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O3 -mcpu=cortex-a55+crypto" } */ +/* { dg-options "-O3 -mcpu=cortex-a55+aes" } */ #include #define AESE(r, v, key) (r = vaeseq_u8 ((v), (key))); diff --git a/gcc/testsuite/gcc.target/aarch64/sha1_1.c b/gcc/testsuite/gcc.target/aarch64/sha1_1.c index e208fe7d93f..ba56c04a118 100644 --- a/gcc/testsuite/gcc.target/aarch64/sha1_1.c +++ b/gcc/testsuite/gcc.target/aarch64/sha1_1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-march=armv8-a+crypto" } */ +/* { dg-options "-march=armv8-a+sha2" } */ #include "arm_neon.h" diff --git a/gcc/testsuite/gcc.target/aarch64/sha256_1.c b/gcc/testsuite/gcc.target/aarch64/sha256_1.c index 2102daf20a3..c3860c6b537 100644 --- a/gcc/testsuite/gcc.target/aarch64/sha256_1.c +++ b/gcc/testsuite/gcc.target/aarch64/sha256_1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-march=armv8-a+crypto" } */ +/* { dg-options "-march=armv8-a+sha2" } */ #include "arm_neon.h" diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_1.c b/gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_1.c index c74cc900f98..3b354c06110 100644 --- a/gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_1.c +++ b/gcc/testsuite/gcc.target/aarch64/target_attr_crypto_ice_1.c @@ -6,7 +6,7 @@ /* Unless we do something about re-laying out the SIMD builtin types this testcase ICEs during expansion of the crypto builtin. */ -__attribute__ ((target ("cpu=cortex-a57+crypto"))) +__attribute__ ((target ("cpu=cortex-a57+sha2"))) uint32x4_t test_vsha1cq_u32 (uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk) { -- 2.17.1