From patchwork Wed Dec 13 14:52:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Carlotti X-Patchwork-Id: 178067 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp7829876dys; Wed, 13 Dec 2023 06:53:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTDh4ke9ahqTm8p7O+erls4Px/wJij/5K/R4WctwmrtjJOQ+IT2/XdZQO8O7yZLdWkW47t X-Received: by 2002:a05:6808:11c7:b0:3b9:e858:996c with SMTP id p7-20020a05680811c700b003b9e858996cmr9918911oiv.58.1702479192715; Wed, 13 Dec 2023 06:53:12 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1702479192; cv=pass; d=google.com; s=arc-20160816; b=zDogIQjeD8uAg0nW2d4XFwEPaAdWlWZRASl9LCfLPCOBCEQ5UgqEf6lwPZLT/cxqTT 0IkKoPxaARNyW/8lHmXvQr24KyIEz3lZkj0mkLqCsxe1baNpwP8vJUQZOi6A7rBoljG6 +xWKB/oxYuVEJQAcyd2d9JqohxPmnQ/8MRXIfF6W1lDCHqk9nUjlJrVTYw3VkgKlpl1C +kN+KTMVR9ynwBiBVc9xL93cG3Ka44zsKG6ZVBLqgmc4J/LMrTjA2Tg1uJSD3YP4Rcz1 iVydP5CfK0h/SCNr6qT4rD5/oVQS2Vr8LJAtLmpeCLu7jSK6ldYMRcDlEtu9hrlrM33x kB4Q== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:original-authentication-results :nodisclaimer:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date :authentication-results-original:dkim-signature:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=dAAtfraSUCAmTIzDlJ94lHPxa62BGPCNa9roW+85r+M=; fh=27Lp4U38l3PfaJWgZX+Be1xBEiyVJDNutUeOZbE31gc=; b=BRHTepMG5mii0TkK2wTur7aD1LRfZQYTcLjWYJP12ZjjDdJQZck8lBJW1m9BewMaIH 3qptbPcQTxY9z+Ve251ovaWsadPzG2oFwjDFKQLeOgIVbFdrGOu8KksXkkfahtvb1Vi4 m5QcZnbTsfrM1i2oIVWrVUuUsZAoB/Q62Ikav3z/rmuYPP/p+m6co8dfyFKB0HIwjuKH 4kvpDZrY7xGRgQCVq5Kgrdo5zD1ECkeWRUdEzb1D+ZQtG4Cp3iMyb5j67Gv/bAaJqtCs WWiYqLzK6KvfB1vOzoB0AHdjae4A2LV8wfVu9Ft9cId4/kOGmCvwnk6Ye94Ev1D1UvSX pzrg== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=haB5TXuH; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=haB5TXuH; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id gc15-20020a05622a59cf00b00423a6edba0csi13603288qtb.459.2023.12.13.06.53.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 06:53:12 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=haB5TXuH; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=haB5TXuH; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6AA713857001 for ; Wed, 13 Dec 2023 14:53:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2056.outbound.protection.outlook.com [40.107.104.56]) by sourceware.org (Postfix) with ESMTPS id 4A8073858298 for ; Wed, 13 Dec 2023 14:52:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4A8073858298 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 4A8073858298 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.104.56 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1702479166; cv=pass; b=fr0Lt8/Srn8qu22Q+K59Twiwkx+tuqbw/w1hJGxCRCkB/u8KxyII23k0YagBYeNj85/Jc/Gq7sJmRS6JT6KIog0wZhbg645fFWvx5sT6HnHi3Iv6ND7PSvSElQ+gJZvglujSjR+8cleNgjYY3OGFhhXrRkhEwCEGOgaGQ8pSBrY= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1702479166; c=relaxed/simple; bh=cZzX4evjk4kyEf3pbnz4AgjtbnYLjGHryG1/eJYuZ5A=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=ojjeDcIU34nUUmhng5kL+6yJw8rV+bcLYyDfAQyg3a9Hr1nfyXYwvZ81K9g0y47/eo1OJSO5MeZylzYJcNjj3Atb/t5oVDYQJzXsrKEmPqUIU25vzPoutUHh0uxDPGMzWVcWc1EHtcJVhaV7GnXDjVVMfuD6Ct6pV5PpmZSEdK0= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=P7P2hXdnrOEyH2cQ67xBUBnnvnP3O5SnQxcLMojvifsyxVCRDQwrZcGaY7/eDfqip2Swl0a4sevQmLxZCObP3JTjrkBCsGBnV6N+NdqnmNvl3JWQ5XXX/Rfnm6Bd0X+nS4YSBLU0AWq0Ei0Wl+sMse2XlhuD74bhKPtvSzN72MKSG7SCIEW4gk9GoBXIKVfjeCmr+WBjbw8vIugcLX+isJl2Cy7U88a5laSGq0gKWosAXB5blt+59m3yaoS6NfsN6HfcAkb9m87iWPVNpRazhTEbHRMC7rYVFcD8y7W7drQtPR8DiYedj3NzouA+UYLtXBFPV0MOkW5YNEy9dcFdZQ== ARC-Message-Signature: i=2; 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=dAAtfraSUCAmTIzDlJ94lHPxa62BGPCNa9roW+85r+M=; b=EbPPXNyrr8FFS+PWmCPNSWlkkMsyVcGdYeeEVElSBk/VP1QHxV0ge7FVE+XZUtVynU8R6RteNKYOn7J2y2dgxPn/26nSICVDpGnnTZvraP6Cgz3FiIbghn3Qs1GuSvg+tEy4NEy3BLvPVMZN+cLznG9+ehGSOJxoQZcbLW/IMMp8TF1oROB6GjbfcMk6Ra5g9l6w59vxxhdicRKh3WL8U3mkWo1XFpy5f/xqfaSgYZtdOmD8k2emiTKcVc7Mq5/VN5qn1BndvgFxiYVTNtRrzBxk/NQsmNOF7ue6gjhWyFQCzluIueh64OZBD2h6j0pI11slnU/oQ1MzTZ0/17Jcaw== 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=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=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=dAAtfraSUCAmTIzDlJ94lHPxa62BGPCNa9roW+85r+M=; b=haB5TXuH4gVDYTYDdQit/dBY3ZHMYWgcutoiBU89+8uLQQpdg5pdrvMAQT4oMJsX7mQBlw/h/wryllwmgcXRdnXn294TI95Yyjk1oRHNX+s2tP8fE0EHld1Lqnp/NgOkOo7b2kuXNHKdqI9qisbbgs254tO+sq047op9GsDr4ec= Received: from AS9PR05CA0251.eurprd05.prod.outlook.com (2603:10a6:20b:493::10) by DU2PR08MB10277.eurprd08.prod.outlook.com (2603:10a6:10:49b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33; Wed, 13 Dec 2023 14:52:40 +0000 Received: from AM2PEPF0001C714.eurprd05.prod.outlook.com (2603:10a6:20b:493:cafe::26) by AS9PR05CA0251.outlook.office365.com (2603:10a6:20b:493::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26 via Frontend Transport; Wed, 13 Dec 2023 14:52:40 +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 AM2PEPF0001C714.mail.protection.outlook.com (10.167.16.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26 via Frontend Transport; Wed, 13 Dec 2023 14:52:39 +0000 Received: ("Tessian outbound 7671e7ddc218:v228"); Wed, 13 Dec 2023 14:52:39 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ab0d0976411a72b5 X-CR-MTA-TID: 64aa7808 Received: from 66ea126a1935.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E5028C2A-2095-463D-9FF5-72B3563BB2BB.1; Wed, 13 Dec 2023 14:52:33 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 66ea126a1935.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 13 Dec 2023 14:52:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k5LiaJWCBnn2+fdbQpCzGRw1713JqIg1v6CJZsnHkzsh9hY9dev1hOq7DCv5kWm8HIxiNcb0/+GDn9718hksIPiyYVrXJWVLIz7teQ3n6uXE45vzPwAXx2i7cdZ5/Dx9sYulxGPYcs+u9YFtBez2bcbrDtjTWiuAsL3fEz8iZvMwS6vOGfXkz1n5YT/M4zUUj/aJ8GkqFVV5xlAdaBHLCLVMvuIk2s+cse+acqrWyrRIZuyjeLOipUBdcke+RIEXJEOA52+M4QxudPHXabCEpV71M6FloS0XFSsavh5oYfzKIsq0p5wSsJHot9kvw7c3yuZmsPZ5tCmJR4ozx427QA== 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=dAAtfraSUCAmTIzDlJ94lHPxa62BGPCNa9roW+85r+M=; b=E9zpqtCLV9M0YC/LLaHWG6KpoBWsR61Vg0I13qGSq8lUDxELPg6JjBFXx4Y+wkzNYit+v0aBaeAM/vyUmVh8gxnV9CP1QchgR+rXEv887SoXWd6k0XNMpOnrUnHoT0kR09+ofzjjBDtq+MnFAWScQN7nkS7s340ymGtf3G01e3mawDUIG/Dg9OaS8phS178iCB8lAKe0H6r6G7K5qu30oTt5JJdvbGzv51hCcRpIBOA4L09nJg9hA9ncavAufSojSzrlFnm1c2gjsEPGZ6LBuvh0lJTtbDDU8m/TahHKySXHaC8U9rl7vbuKU0QLXA7E8lrDhnhwgMqcYeUza/p0AQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; 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=dAAtfraSUCAmTIzDlJ94lHPxa62BGPCNa9roW+85r+M=; b=haB5TXuH4gVDYTYDdQit/dBY3ZHMYWgcutoiBU89+8uLQQpdg5pdrvMAQT4oMJsX7mQBlw/h/wryllwmgcXRdnXn294TI95Yyjk1oRHNX+s2tP8fE0EHld1Lqnp/NgOkOo7b2kuXNHKdqI9qisbbgs254tO+sq047op9GsDr4ec= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) by AS8PR08MB8634.eurprd08.prod.outlook.com (2603:10a6:20b:564::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26; Wed, 13 Dec 2023 14:52:31 +0000 Received: from AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::af15:c9d7:cd8c:6da2]) by AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::af15:c9d7:cd8c:6da2%7]) with mapi id 15.20.7091.022; Wed, 13 Dec 2023 14:52:29 +0000 Date: Wed, 13 Dec 2023 14:52:26 +0000 From: Andrew Carlotti To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw , richard.sandiford@arm.com Subject: [PATCH v2] aarch64: Fix +nocrypto handling Message-ID: <4b906d4e-0624-184b-b296-283ac3479d5a@e124511.cambridge.arm.com> References: <58ac7f4d-04d3-260c-1612-1ca09c420ce5@e124511.cambridge.arm.com> Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: LO4P265CA0001.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ad::14) To AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6678:EE_|AS8PR08MB8634:EE_|AM2PEPF0001C714:EE_|DU2PR08MB10277:EE_ X-MS-Office365-Filtering-Correlation-Id: bc326c78-95bc-431e-4310-08dbfbeb276e 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: j59S5PqwumADF+44Ux3rvLui37NCZQSsLmiByG+r4nRGXpYmSnJr6W6PDRvCgH9yXDpYybHOD7yHdOFyywRJuqphsnszs/8XnuJoraC5jc3Sc0FcBpxnuAVT2sI39o9/Jre00tGMLJNYt6mbyd1btGoa3zrjOJ+AZyaAcWfIxc21ijOHx+dsBiSTbY//Jy9IuUUaoDQvomknx4BAMgSVYa4YIPMRGtyY7J07k1zhE75YvIn2qym4Bh/c6N8y+KxjNr99sbWvgvYg061/YMcnbyxeLDyfZyTIrNIZyl40ei8IZ0A4WLUuzKQMC6UGM/x+TsbOJmsLWuQI0oZoelqi4cym3S8YBrF/KXccgSECjXIuuYsTRIVchY3elj611Kw3eFRMTDgYuclRmn9en21srpZ4nVtM4M6IPKwRHoZK+DTUXcVbcfAyU8TdQ77flDKwvHcdfz8J9lumdBdJY3nG2eCFBcX4HOcikOUXtS1weRcWgPya4M6v8CoSGwEx9YSmY3NS2qVOwmSE8wkmRbK6PNg82KW4GzDLqAeH+Mbl436fAJ80GT8NA9lB1CWpl8pxWxdaoNtrBVIPEjUjS0JnWQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB6678.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(346002)(136003)(396003)(366004)(39860400002)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(38100700002)(2906002)(8676002)(6506007)(6512007)(6666004)(44832011)(4326008)(8936002)(6916009)(316002)(66476007)(66946007)(66556008)(478600001)(5660300002)(6486002)(26005)(83380400001)(41300700001)(31686004)(31696002)(86362001)(84970400001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8634 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM2PEPF0001C714.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 45078bc2-227a-4f05-897b-08dbfbeb212e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nu6XbX85a3H60c5pOLbxlaWjaLWqwy38Rdv7jbQaxwb4CGhcC0QmEArT/VxpDHK9AGSp6yX5OZYPJO4BUx2LUq5cUf+gEtmCZk+mL16sLXP/wQu5sPRfp3VsT7cstwkJSCYJavkF1ibC8r9X3sl3Wl9d4iQhxx1W8+l72KPPNr3LKRQxaOXYcWyaswWvcMXYxrMGjkiDwOsijlAukmcn7SFQkXEMwyesfiYFe3QwXPjOWxEIbzINxZpS1ZJQPtEnlApsq+O+UoQReTpVeIH2lNZlJPHlmlVRk1PsxqvhFmqvx7oD+KGspdJIQmVUREHbpHfou75rtW3GhLRJgju0U3cn+UltwWuJtfXCbUacctYYMx9de6cNi7/2mbnbeyN2PRAU/ZNgqsjqsEoL74ZQZtkpiaCCawa5Rq9nI9vBr6zKri/XY4CVzy883fdHul2Fp+PtjYCsr/j6khNlRbsEFh6BjHgjc3jYO32G5upZzev51a1Hgh03CUgFiIQZJMqi/A1ZOpaWQRi+RpUtzX6M8IbZLs9Toe48U11VNqAgbQKX4ubEdn+HufeTOmbWoEnsiaQ6vMg4Zhhb//xlHdpmxfn37TKLJxX1z6gUSeqFxHO8C+ysWBysSZ3I+s2JdcoqymUFfXlJ1zSvgm49yWPsypP+OZpdBiESC2bIOU1R7nVVeAdsKTVyCkup5YsrDYygj3olSUyiW5vz9LmaTLV5AWRg0SnhDFT40sSd2mgTFVcDcVXdSbHTdLbARI0Gu1ZsZCl6TafGw2fACJ7tJzLuVA== 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:(13230031)(4636009)(39850400004)(376002)(396003)(346002)(136003)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(82310400011)(36840700001)(40470700004)(46966006)(40460700003)(26005)(336012)(356005)(47076005)(6506007)(6666004)(36860700001)(70586007)(6512007)(316002)(4326008)(5660300002)(83380400001)(44832011)(41300700001)(2906002)(70206006)(8676002)(478600001)(8936002)(6916009)(6486002)(81166007)(31696002)(82740400003)(86362001)(31686004)(40480700001)(84970400001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2023 14:52:39.9856 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc326c78-95bc-431e-4310-08dbfbeb276e 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: AM2PEPF0001C714.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR08MB10277 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_DMARC_NONE, KAM_LOTSOFHASH, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784471727844667742 X-GMAIL-MSGID: 1785178822208936515 Additionally, replace all checks for the AARCH64_FL_CRYPTO bit with checks for (AARCH64_FL_AES | AARCH64_FL_SHA2) instead. The value of the AARCH64_FL_CRYPTO bit within isa_flags is now ignored, but it is retained because removing it would make processing the data in option-extensions.def significantly more complex. This bug should have been picked up by an existing test, but a missing newline meant that the pattern incorrectly allowed "+crypto+nocrypto". Ok for master? gcc/ChangeLog: * common/config/aarch64/aarch64-common.cc (aarch64_get_extension_string_for_isa_flags): Fix generation of the "+nocrypto" extension. * config/aarch64/aarch64.h (AARCH64_ISA_CRYPTO): Remove. (TARGET_CRYPTO): Remove. * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): Don't use TARGET_CRYPTO. gcc/testsuite/ChangeLog: * gcc.target/aarch64/options_set_4.c: Add terminating newline. * gcc.target/aarch64/options_set_27.c: New test. diff --git a/gcc/common/config/aarch64/aarch64-common.cc b/gcc/common/config/aarch64/aarch64-common.cc index 8fb901029ec2980a048177586b84201b3b398f9e..c2a6d357c0bc17996a25ea5c3a40f69d745c7931 100644 --- a/gcc/common/config/aarch64/aarch64-common.cc +++ b/gcc/common/config/aarch64/aarch64-common.cc @@ -311,6 +311,7 @@ aarch64_get_extension_string_for_isa_flags But in order to make the output more readable, it seems better to add the strings in definition order. */ aarch64_feature_flags added = 0; + auto flags_crypto = AARCH64_FL_AES | AARCH64_FL_SHA2; for (unsigned int i = ARRAY_SIZE (all_extensions); i-- > 0; ) { auto &opt = all_extensions[i]; @@ -320,7 +321,7 @@ aarch64_get_extension_string_for_isa_flags per-feature crypto flags. */ auto flags = opt.flag_canonical; if (flags == AARCH64_FL_CRYPTO) - flags = AARCH64_FL_AES | AARCH64_FL_SHA2; + flags = flags_crypto; if ((flags & isa_flags & (explicit_flags | ~current_flags)) == flags) { @@ -339,14 +340,32 @@ aarch64_get_extension_string_for_isa_flags not have an HWCAPs then it shouldn't be taken into account for feature detection because one way or another we can't tell if it's available or not. */ + for (auto &opt : all_extensions) - if (opt.native_detect_p - && (opt.flag_canonical & current_flags & ~isa_flags)) - { - current_flags &= ~opt.flags_off; - outstr += "+no"; - outstr += opt.name; - } + { + auto flags = opt.flag_canonical; + /* As a special case, don't emit "+noaes" or "+nosha2" when we could emit + "+nocrypto" instead, in order to support assemblers that predate the + separate per-feature crypto flags. Only allow "+nocrypto" when "sm4" + is not already enabled (to avoid dependending on whether "+nocrypto" + also disables "sm4"). */ + if (flags & flags_crypto + && (flags_crypto & current_flags & ~isa_flags) == flags_crypto + && !(current_flags & AARCH64_FL_SM4)) + continue; + + if (flags == AARCH64_FL_CRYPTO) + /* If either crypto flag needs removing here, then both do. */ + flags = flags_crypto; + + if (opt.native_detect_p + && (flags & current_flags & ~isa_flags)) + { + current_flags &= ~opt.flags_off; + outstr += "+no"; + outstr += opt.name; + } + } return outstr; } diff --git a/gcc/config/aarch64/aarch64-c.cc b/gcc/config/aarch64/aarch64-c.cc index 115a2a8b7568c43a712d819e03147ff84ff182c0..cdc4e453a2054b1a1d2c70bf0b528e497ae0b9ad 100644 --- a/gcc/config/aarch64/aarch64-c.cc +++ b/gcc/config/aarch64/aarch64-c.cc @@ -188,7 +188,7 @@ aarch64_update_cpp_builtins (cpp_reader *pfile) aarch64_def_or_undef (TARGET_ILP32, "_ILP32", pfile); aarch64_def_or_undef (TARGET_ILP32, "__ILP32__", pfile); - aarch64_def_or_undef (TARGET_CRYPTO, "__ARM_FEATURE_CRYPTO", pfile); + aarch64_def_or_undef (TARGET_AES && TARGET_SHA2, "__ARM_FEATURE_CRYPTO", pfile); aarch64_def_or_undef (TARGET_SIMD_RDMA, "__ARM_FEATURE_QRDMX", pfile); aarch64_def_or_undef (TARGET_SVE, "__ARM_FEATURE_SVE", pfile); cpp_undef (pfile, "__ARM_FEATURE_SVE_BITS"); diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 2cd0bc552ebadac06a2838ae2767852c036d0db4..501bb7478a0755fa76c488ec03dcfab6c272851c 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -204,7 +204,11 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE = AARCH64_FL_SM_OFF; #endif -/* Macros to test ISA flags. */ +/* Macros to test ISA flags. + + There is intentionally no macro for AARCH64_FL_CRYPTO, since this flag bit + is not always set when its constituent features are present. + Check (TARGET_AES && TARGET_SHA2) instead. */ #define AARCH64_ISA_SM_OFF (aarch64_isa_flags & AARCH64_FL_SM_OFF) #define AARCH64_ISA_SM_ON (aarch64_isa_flags & AARCH64_FL_SM_ON) @@ -213,7 +217,6 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE = AARCH64_FL_SM_OFF; #define AARCH64_ISA_V8A (aarch64_isa_flags & AARCH64_FL_V8A) #define AARCH64_ISA_V8_1A (aarch64_isa_flags & AARCH64_FL_V8_1A) #define AARCH64_ISA_CRC (aarch64_isa_flags & AARCH64_FL_CRC) -#define AARCH64_ISA_CRYPTO (aarch64_isa_flags & AARCH64_FL_CRYPTO) #define AARCH64_ISA_FP (aarch64_isa_flags & AARCH64_FL_FP) #define AARCH64_ISA_SIMD (aarch64_isa_flags & AARCH64_FL_SIMD) #define AARCH64_ISA_LSE (aarch64_isa_flags & AARCH64_FL_LSE) @@ -294,9 +297,6 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE = AARCH64_FL_SM_OFF; #define AARCH64_FL_SCXTNUM AARCH64_FL_V8_5A #define AARCH64_FL_ID_PFR2 AARCH64_FL_V8_5A -/* Crypto is an optional extension to AdvSIMD. */ -#define TARGET_CRYPTO (AARCH64_ISA_CRYPTO) - /* SHA2 is an optional extension to AdvSIMD. */ #define TARGET_SHA2 (AARCH64_ISA_SHA2) diff --git a/gcc/testsuite/gcc.target/aarch64/options_set_27.c b/gcc/testsuite/gcc.target/aarch64/options_set_27.c new file mode 100644 index 0000000000000000000000000000000000000000..e35744640130778cba442c365e70028e53508586 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/options_set_27.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-march=armv8.2-a+aes+sha3" } */ + +int main () +{ + return 0; +} + +/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+aes\+sha3\n} 1 } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/options_set_4.c b/gcc/testsuite/gcc.target/aarch64/options_set_4.c index 5370e02e1531dd26e5a5fb37de0bab6aed513b71..7b00d09a47f0521f148b1dd576b4100db38aec00 100644 --- a/gcc/testsuite/gcc.target/aarch64/options_set_4.c +++ b/gcc/testsuite/gcc.target/aarch64/options_set_4.c @@ -6,7 +6,7 @@ int main () return 0; } -/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+crypto} 1 } } */ +/* { dg-final { scan-assembler-times {\.arch armv8\.2\-a\+crc\+crypto\n} 1 } } */ /* Check if individual bits that make up a grouping is specified that only the grouping is kept. */