From patchwork Thu Mar 14 13:30:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 87194 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 40F0D385781E for ; Thu, 14 Mar 2024 13:31:50 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2057.outbound.protection.outlook.com [40.107.105.57]) by sourceware.org (Postfix) with ESMTPS id C54213857B86 for ; Thu, 14 Mar 2024 13:30:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C54213857B86 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 C54213857B86 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.105.57 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1710423031; cv=pass; b=qkXsKZcqTD2x0kYsVZuQXGziOyhIjFEWlfJ0z36CFXlDHWsxUcK7fINmI+J9OqQc0ORRmq5jyvwcpirCOmUy9d08B9L65/XP5PfvsMQWL5eQPzkg2UCVM3i/yO1HZX9Qg9wQow8zqNcXxjHJUkTioGv5OCoGeZyhutKLQKYHKqA= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1710423031; c=relaxed/simple; bh=8xDmRop+m2hqNRY3d+DQKNw58d7jV8GkD3XMh3J5Yv0=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=c4MsbZmjAgYJ+SrKHRHGkxWEwKU3wbfZsOjO76al+Kqxe3I7L3RfWLAfGZt7/THcVIgtaeAezssVPSOrFWYqPXZiOqIydANjerfUHhVcDv7WXXMm81lYckPwE4rr9oHWd3YBEGtIBd9Tu2MsNxIgHvpzd8JSdgqnY1SJY8jPCXw= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=e/ML11zmifaIQkWWqhmeTjU7t2Gos5Eivc8ADTTo62Nm2eJt6Kz0zQsJYjFx59GdpQ6MS5wo7m2jVNRMOv6BkbBr18kw1NWBwbzChI+7Lr6xecF0Y0h5WLfnfl9UvUgwbdq+w/EsLcFftrw3T77SRJNZaGQlxve/5mVSF3tT48KIZJ5q/SjKJAd3jDSXPcfCtHgLbTCsA0vZafLP8SmDjyAkBjLfn2okY62EEx3BxsuxBg7y3sY7d/WnXpJl5KSahNpJQgrJ3gRBGn0DThUSc21K1nlmFqP0sHjMq+WjvvHnIDGVk404Ok3o1RwyR0pcir8W2O+ge2hrJ4c7USYehA== 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=WR6N+ru2jCSwZutTU1JP0CEVeOpN2BAPtAOdT8RTmTA=; b=Wj8tDp1aNfr81LAlvstWM8xUwWyn9NMjcyVxarmjbDOiMo+Wt+419jtNNWG52vJuxPAsYCjY8w0UqLkX1wzERDaTjXYOVLvPmoSuctY+h3WUeB2+E8h259vKfgXXLoKVIsZB0IxTHjIAIM+arXhuYyXMzOXWr6jVimqePhkSloiSppaw0y7oM2NiycO/xlbe2xQczg7WTp1cCzjMKsdZcfjDuLTA0Ny0dTPRZ9l7y72OZ9CPV7/WFjb+ldfnrOgVzBVGIXM2LBeEEzOy1IKiiAGaydjRWufOJymsF1xUOdpabKp/rq1z9fKRG3miZZJo7ySID1ALCVUGwfrY9Oad4g== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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] 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=WR6N+ru2jCSwZutTU1JP0CEVeOpN2BAPtAOdT8RTmTA=; b=A14BlR26yV2vW//ftVUfCdJH6fwUatOi7D2visgef2/YA/FX4xm7UdiycLkKBSdi8Jn4yU76/AWW2x1XC0cGWfI96cojdSMkynjC/amG6Tb4AiYw2rhaDYc2ifziKSmXh9UqHkMiDS+VeWSV5KPQ+d9++0JIOCUNsw2nd4FO8eY= Received: from DUZPR01CA0157.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bd::21) by AS8PR08MB8993.eurprd08.prod.outlook.com (2603:10a6:20b:5b4::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.21; Thu, 14 Mar 2024 13:30:25 +0000 Received: from DB1PEPF000509FB.eurprd03.prod.outlook.com (2603:10a6:10:4bd:cafe::da) by DUZPR01CA0157.outlook.office365.com (2603:10a6:10:4bd::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.20 via Frontend Transport; Thu, 14 Mar 2024 13:30:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=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 DB1PEPF000509FB.mail.protection.outlook.com (10.167.242.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.12 via Frontend Transport; Thu, 14 Mar 2024 13:30:25 +0000 Received: ("Tessian outbound 7b0d57313a48:v276"); Thu, 14 Mar 2024 13:30:25 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d22b0b7f218c8606 X-CR-MTA-TID: 64aa7808 Received: from 149c140a6a57.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5D675EBF-D42F-4762-84C4-D1BB17FB1640.1; Thu, 14 Mar 2024 13:30:18 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 149c140a6a57.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 14 Mar 2024 13:30:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oFbpRkdsd/EJ7q7rYbqnMlMqcmqJ9Xyosg+o5Yf+Kq/4ae7eBR34ZCWnZPBQ6MsfMchtEXfH8RQfnPZaH/+XWz6/lZD+p259VAdUnc/7x6sWj0UPkIr0078NZ36jG5rbPhFed3qKDlQjf5DBAK5E9opTF7lk7VFDyfzU7Xcg2ngHTCyYFSZCGIYg8bOoIF2dzzuUUM+2n6m7wGwvqEP0qU7Ld1ojgtbUq5QVb3pzlDhzmDZrlAUU823BTjJRrWCfmx0ncUVT41jKK1xBKjSqUGNh3JmUGgA3bd0fvqKQJD8DS/7kHpkGG+ij21IcUBPS+qs5OK0eDAI8eEP4UNQfbg== 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=WR6N+ru2jCSwZutTU1JP0CEVeOpN2BAPtAOdT8RTmTA=; b=BOJWvchBFD3sim5ONIV2wtLfkaHDStzBvzDeL0w+QebCuxPT6jwnOU/bVQWiclYAb+7B5qxBrOzvExGjQUTkO8+LSXIBGXT7XYPJssu0mzP1G/YWzzFIGwjhykaIJFmhXs7h1KhClDFRp87YNqZq9W3FVT/KnVEMa05L5gv3+f/RYmkL3l/lmhRoqmFOY4UVpJOqTBi0K7dQmUbAg+l9l8bCnrImzW+DEexeJVgoT0wfA0aLzuU8s4XwIGTrH9Yv6sJj8UcSz8QREK1vaJ6lteucgo6HVUFwj1a7a5978Z0h/1iBF0d8lF9U5H3f9xrh1/ub095CFPZAW7iKvsP2cA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.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=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WR6N+ru2jCSwZutTU1JP0CEVeOpN2BAPtAOdT8RTmTA=; b=A14BlR26yV2vW//ftVUfCdJH6fwUatOi7D2visgef2/YA/FX4xm7UdiycLkKBSdi8Jn4yU76/AWW2x1XC0cGWfI96cojdSMkynjC/amG6Tb4AiYw2rhaDYc2ifziKSmXh9UqHkMiDS+VeWSV5KPQ+d9++0JIOCUNsw2nd4FO8eY= Received: from DB7PR05CA0038.eurprd05.prod.outlook.com (2603:10a6:10:2e::15) by VE1PR08MB5711.eurprd08.prod.outlook.com (2603:10a6:800:1ae::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.36; Thu, 14 Mar 2024 13:30:15 +0000 Received: from DU6PEPF0000B61D.eurprd02.prod.outlook.com (2603:10a6:10:2e:cafe::a5) by DB7PR05CA0038.outlook.office365.com (2603:10a6:10:2e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.20 via Frontend Transport; Thu, 14 Mar 2024 13:30:15 +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 DU6PEPF0000B61D.mail.protection.outlook.com (10.167.8.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7386.12 via Frontend Transport; Thu, 14 Mar 2024 13:30:15 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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.35; Thu, 14 Mar 2024 13:30:13 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Thu, 14 Mar 2024 13:30:13 +0000 From: Szabolcs Nagy To: CC: Khem Raj , Ross Burton Subject: [PATCH] aarch64: fix check for SVE support in assembler Date: Thu, 14 Mar 2024 13:30:12 +0000 Message-ID: <20240314133012.16925-1-szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU6PEPF0000B61D:EE_|VE1PR08MB5711:EE_|DB1PEPF000509FB:EE_|AS8PR08MB8993:EE_ X-MS-Office365-Filtering-Correlation-Id: 98176d90-3f66-4857-b1c1-08dc442ae824 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: GACVdk3R61jtRFjvwh6KMfBrvUj5Ny3nwJC55WuvntL2L+73C0kDOVM9wqD+Ud+dIti2bv7+w8BqquZM0Vl+jtvHz+z+h+IXMYPKPdp4w1e4U+65oLlzlWmv64TdWADIppeGqwb2lEClSxFiIXLHq9ytxUN1qGGvW/rCSKn9wJufjcshKQTghjKhvVPrVaeo3cNbqTQH157DySGe0E4x6Q+UWaqsJGVp55mAz38jwdhFrH2bw90VXFKIeQt6SJPa2wOUJvRFUWrCbAXoeXXPOELBER1cZWTwTH/NPridUVPN2mSHDtvR6XiOMDWj+ABg9GARYRS0pv2+ngUYpmWmfEqlSMLET2+O7QhPU0SOrJiCNyPJFHhOhTvuILYbTNSj4LhWzeZljzHgOJ7ImOKfAhLFWRvACqkC+fP6x/Zofxjg81ij3ZSHwuo15YbEM00OR9KT1wCMH6zHyYxwPar3KHNGR1/D3yExSu3qHzXcPdhoO8vllYakfgiaMDg2SI83X7f6gWocB+V9+eJEqneY8I1MaFCJ405e55iAyTjPZr2OT0ltiO+tLGlS9zT7iHT4HJklLxnaJiSSi2D8GK23U/wNP6otdiJCh0Rh+2Ptr8Z8/z0DK5UwWcnYY6twn6O3NDxF3xoFMGWNeKX7gYBmOny0uW+dWAjRzMd+gtUEY4ccB8L3UmAf+j8VmXXnUoGMgq5p3zn6d147GXL4jrVHdA== 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:(13230031)(82310400014)(36860700004)(376005)(1800799015); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5711 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF000509FB.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: fbe1cd97-f23e-452d-3f23-08dc442ae24c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z0/VWoM6XVYvHjOhUBTY605inm2My+so5SesiA/W/hy6/ARmOh+d8r4tnN1BYlTM2X87sN7m6DxrNf1pB/jRbRyjenmgHucm9jD9rhykQ2x15O1io2DOUpUQveFmNXfKCwaklKdd0/ir92rKTBJFzlXdKJ3nbrnbXDQHcYPHwq48GPTVdzTnjY9tHLmRSdHbYBSpJ76jvQs9fuAdNr5QQCothx/RusRNBFsG7rpuuzn/MkUMgRXXjoHW3iagnDL4sK6oNOyUFgEVH/L+H265Ug4/4JOCxWolkrtQf+HapMh0xPoiBqWHMjuOIHhDxJECKgYSHLHpzWxx37bKac5/JLQ/ywxPjRWR23TMv8B/ZcbnqShIl+ud6V748IttGedwsCWvFWE1GriRGOgGZeEivsMvnCIqPjUYkpkaVcdtjVrcIRRtQX8g9+EgG9fQb+XpJWYlhulKiEf4ngpf0PfQ4WZ96boV3TogcQnib/tJnf9AudHSca0hBdxv/PfUJvgWy7GPz/vuOf32OesfyHA0pQzQGZGDEy3aGWUdZbHfOYbdZMeVZeGNaEpK9u3lDD7nI1fSwqNhVv39ZcBfNxI4DRrnh5nAWLYMfiMSLavZDpq+BBiB6Sdmn03Ksyu1u4jtJeB8EKJkNPAAMtkSuVrFhKLQPS4etTnDYJGaq0lRlQoplbqDMVM+U8Jl75wOT4E7l7sMY/VOx808w8TuhJIJbw== 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)(36860700004)(376005)(82310400014)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2024 13:30:25.3645 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 98176d90-3f66-4857-b1c1-08dc442ae824 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: DB1PEPF000509FB.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8993 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Due to GCC bug 110901 -mcpu can override -march setting when compiling asm code and thus a compiler targetting a specific cpu can fail the configure check even when binutils gas supports SVE. The workaround is that explicit .arch directive overrides both -mcpu and -march, and since that's what the actual SVE memcpy uses the configure check should use that too even if the GCC issue is fixed independently. Reviewed-by: Florian Weimer --- note: i found this in yocto, and i think it's a better fix than https://git.yoctoproject.org/poky/tree/meta/recipes-core/glibc/glibc/0023-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch sysdeps/aarch64/configure | 5 +++-- sysdeps/aarch64/configure.ac | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) mode change 100644 => 100755 sysdeps/aarch64/configure diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure old mode 100644 new mode 100755 index ca57edce47..9606137e8d --- a/sysdeps/aarch64/configure +++ b/sysdeps/aarch64/configure @@ -325,9 +325,10 @@ then : printf %s "(cached) " >&6 else $as_nop cat > conftest.s <<\EOF - ptrue p0.b + .arch armv8.2-a+sve + ptrue p0.b EOF -if { ac_try='${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&5' +if { ac_try='${CC-cc} -c conftest.s 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac index 27874eceb4..56d12d661d 100644 --- a/sysdeps/aarch64/configure.ac +++ b/sysdeps/aarch64/configure.ac @@ -90,9 +90,10 @@ LIBC_CONFIG_VAR([aarch64-variant-pcs], [$libc_cv_aarch64_variant_pcs]) # Check if asm support armv8.2-a+sve AC_CACHE_CHECK([for SVE support in assembler], [libc_cv_aarch64_sve_asm], [dnl cat > conftest.s <<\EOF - ptrue p0.b + .arch armv8.2-a+sve + ptrue p0.b EOF -if AC_TRY_COMMAND(${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&AS_MESSAGE_LOG_FD); then +if AC_TRY_COMMAND(${CC-cc} -c conftest.s 1>&AS_MESSAGE_LOG_FD); then libc_cv_aarch64_sve_asm=yes else libc_cv_aarch64_sve_asm=no