From patchwork Tue Oct 24 12:33:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 78465 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 AABDF385840C for ; Tue, 24 Oct 2023 12:34:18 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2073.outbound.protection.outlook.com [40.107.13.73]) by sourceware.org (Postfix) with ESMTPS id 61A3C3858D37 for ; Tue, 24 Oct 2023 12:34:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 61A3C3858D37 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 61A3C3858D37 Authentication-Results: server2.sourceware.org; arc=fail smtp.remote-ip=40.107.13.73 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1698150844; cv=fail; b=iNS2s7DNeGgmavlavUZLc2oq7DUCWS9MF8XdapFPYdijwBUN1GLKjNILNRA9amdNDx5X08cchDZXgQbMlXPu726B3PuUtaLECN2/AQ1Y+zeSAxVWmA1xGTmgtXCVU900i/BBwcu5XUpmP+K2x3FSawKc76PguzQ+UidqH2oPC7E= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1698150844; c=relaxed/simple; bh=1Zc+8G8loigH21IrrUmSONv1KJfmZGFsH1g8e+cK2E8=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=oDMWh0Hpp1NsckoBcxFF34/Pr5btyLUDF57BcIGKxgyUC4w9yFmBcUmSJN4egxh+qlWvNHY1vdjOqYfyUx6zfknIYyB9ZhWTBnI9nrM8TIw+Kc4/djiEpRkTwl+3iIyrj/jZBQP4bmoHcPDMdc3mofXDqxM4mlnQo5oVxJ8XiKA= ARC-Authentication-Results: i=2; server2.sourceware.org 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=MaNx5gzSgV8o5JcP7DPBwJ/c1wmDMEQ354mpgVZodq4=; b=fSQfYiSII+sRieVGsKnIVugGl7ucsHHmkyoywEyWyTd33lWUovt1MR+MOR0qNz3nV9WtNNDVHlohnas6PkKb0EY/kP4yG3abRVm0twtUJbGJ88Qn3VyG+KrFF0m2qrGCvTksNLSe/6RhTOTtnwTExCvTQX+VIQwBfLQrhGsoJB0= Received: from DB9PR06CA0014.eurprd06.prod.outlook.com (2603:10a6:10:1db::19) by PAVPR08MB9579.eurprd08.prod.outlook.com (2603:10a6:102:31a::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.25; Tue, 24 Oct 2023 12:33:57 +0000 Received: from DU6PEPF0000A7DF.eurprd02.prod.outlook.com (2603:10a6:10:1db:cafe::bc) by DB9PR06CA0014.outlook.office365.com (2603:10a6:10:1db::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33 via Frontend Transport; Tue, 24 Oct 2023 12:33:57 +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 DU6PEPF0000A7DF.mail.protection.outlook.com (10.167.8.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Tue, 24 Oct 2023 12:33:57 +0000 Received: ("Tessian outbound 36e2b13fe8d0:v215"); Tue, 24 Oct 2023 12:33:57 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e7e77345224c2835 X-CR-MTA-TID: 64aa7808 Received: from 0dfc73981061.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 89C18E62-6EC8-45B2-AF8D-6CDEC38567E2.1; Tue, 24 Oct 2023 12:33:50 +0000 Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0dfc73981061.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 24 Oct 2023 12:33:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hV5LXvgXL3hGBHPTZypc4HbUat1lqET5H6+MNBwI3KO+XEOArFKtmcLsF7zvMn6bzwASCpUy8Aw02SwI4yQE602aSSs+/XWG40s2pEfvP7n74ysl0hFj406u2ilSoImKwKIZddkwjIUfLnxPrA+Aydq5Dy6A1Ym2UMQcoa29DnuKa4mNjY2hEI3BQii1yTwgwkg3dwtOJhcFvJDjtedHHz9wg5Jhz92x+YNsKEj2qPqhF8SPcpCtWW8hnxsYqEdtQ2QcpA6zxdC3a2tMI+ja8PkNVZYFn3Su0FFwmjxqTkac9tU7Hh4X6Qdlp4iodpN+bPX92pe8Jx+Drocg5aRcvw== 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=MaNx5gzSgV8o5JcP7DPBwJ/c1wmDMEQ354mpgVZodq4=; b=hZhK3UDrKMpGunNSHXiptgPTDaBrlo5xhHiOWu4S/T2GxrKploRhjkrBTJCuj0tB5Fll3evHY7t1YNxpHlc+F57vyGkb68zkSv5E5tscys4NGYRiNx9fhueNJnY1ohV8Bqn/qk5YRHFR5AvBDi3+zBsh3L8lw8zyW7VKVL5yKMlFDiDH35e11KvvfCcqLVJjLiIwmmZQfET6tfrYUssRiwKZmcEKPuUg0mEc0jUHSpMhP0nOZ/OeANaA9HRjRuN/cpaxCCHpjMxcQBUzXpomRPinmBQ857NvftZYwhe8qDSwe9orLHa3P3MOUO8LA0/5b4FiMPyAhY6LDNIvOeiA/Q== 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=MaNx5gzSgV8o5JcP7DPBwJ/c1wmDMEQ354mpgVZodq4=; b=fSQfYiSII+sRieVGsKnIVugGl7ucsHHmkyoywEyWyTd33lWUovt1MR+MOR0qNz3nV9WtNNDVHlohnas6PkKb0EY/kP4yG3abRVm0twtUJbGJ88Qn3VyG+KrFF0m2qrGCvTksNLSe/6RhTOTtnwTExCvTQX+VIQwBfLQrhGsoJB0= Received: from PAWPR08MB8982.eurprd08.prod.outlook.com (2603:10a6:102:33f::20) by DB9PR08MB7584.eurprd08.prod.outlook.com (2603:10a6:10:308::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.29; Tue, 24 Oct 2023 12:33:47 +0000 Received: from PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::2939:a00c:af3:2551]) by PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::2939:a00c:af3:2551%4]) with mapi id 15.20.6907.032; Tue, 24 Oct 2023 12:33:47 +0000 From: Wilco Dijkstra To: 'GNU C Library' CC: Szabolcs Nagy , Adhemerval Zanella Subject: [PATCH] AArch64: Cleanup ifuncs Thread-Topic: [PATCH] AArch64: Cleanup ifuncs Thread-Index: AQHaBnYUoY1ybgP+7k6JlyCOoYozOg== Date: Tue, 24 Oct 2023 12:33:47 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: PAWPR08MB8982:EE_|DB9PR08MB7584:EE_|DU6PEPF0000A7DF:EE_|PAVPR08MB9579:EE_ X-MS-Office365-Filtering-Correlation-Id: ed0a4f60-0cf0-4137-9770-08dbd48d7e24 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: xt47CLbuHrsfu0+rfYFQ8KsruMJg1GificBdVu4PNTn5AcqjaeORClBvk+sZ2qef+qIRMuKij+XuyhsqFmTKenuWsCBhmCGWID1qL9Z5W5To6C8m0pWaCmTqaYoPLwuZgusFal4s/vdEYRmE3ncsvvenlSu//AO8k1GbtqeXM/w7II8PB7XlGvZvw0STvkGyxYlYiP/EcJW3J2rXHWmFalrNZTQFUugZK0NEg7FAsu8tikBqJBMhfZvb3PuVvYFEl5gS0TRU+DG8B2I5UWMz/B1HvLOBMo+kwbF/tP8Rq84ZDWIoyogV4SaBYyj/++EfRrhnxMIOAYkowy9tQhL0w5ZUNsQOYU31GBQH6boT4P6eakkhCdhecAx3/Q2Mim0H2jnqEYu9lUg3GLlGsMCUySU7vZdmO1iJQG8ljQEcY+DVbhWRWqLPRLm0cQ+UdxWXlUWdLKmYqW861baMq2LjC7EvWXIdgoM7wghCOhYUcvjH6/0nC5ZBgjhP2xUg5wY5m/LcMIXJxjU3ERaG9ycWXycwaTomQWr7MhzWKoYaa2ZpK852SS2uW7yTFuCKResJvyGywUdNyHsgiSJB0Xg7hStFfBAxonkvt086bjcqGblFuJcJKfFy6qPsf2l0o4Hl/1pAEaqU3i1huM3TfzlNdg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8982.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376002)(346002)(136003)(39860400002)(366004)(396003)(230922051799003)(1800799009)(451199024)(64100799003)(186009)(26005)(38070700009)(38100700002)(2906002)(55016003)(30864003)(41300700001)(52536014)(86362001)(5660300002)(4326008)(8936002)(33656002)(8676002)(7696005)(6506007)(64756008)(76116006)(478600001)(91956017)(71200400001)(122000001)(316002)(66476007)(66556008)(66946007)(6916009)(66446008)(54906003)(83380400001)(9686003)(2004002)(357404004); DIR:OUT; SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7584 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: DU6PEPF0000A7DF.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 5fac5129-ea6e-4225-3f7e-08dbd48d77ef X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JNiNzmn+pWpbflDYgXtjVhX8fIBf3KdgL5PdUo2rVDbElSNV9use1fJlGKLpZrZwfyDrjzl+lJWZam+azGyiwI2H4QAJE7uajx5Z1br6sakilsrETEiLQaRFtFRaqWZ8gabpgHH0Dz/bXRv+ISDFEwas27GQiL7enxcSptimDSonn+3XWgs9w4z3PaSh4OHG9CZASlhT5GtZRU69Nh7VEelfcqameFwL14cVJImo+M79NYkTHoAz0UVyPzcOLVcqnihrA7A+7v/MOW/rf6XSkvLkd6m0YYk9fYd+doIrBfNCbeLiaCpsyAh//wTYNe9qKlKMvTwsXnHR3lJrQCe96vJJijvfXQjdJAeDlAB+zCNesyP1rRt+WRtwvl0bKh8cX9nZD+ugU5OZDjnnH5O3xKBPWATUgJ3VRpxE/XUDR6u9UTYmUclOFay1TvAT/+84j7L3J0CrboMiVas3MxoZQo3J6CWRcbkgdMCh3vex8FCA7z9jU4CN4N/9mx5TGgOlut7I+7F78/zVVNwXpNUqPLX1MwovYuAYIEUWuaBCihVdW/ttyChjEyOyvDqMEUXlKz9U1oZu8CvJ6b3ViXGjDGLNsjLPqwOmCom5v0ot/bXHR62Y6vhL+0bwMuoV8owoaBvWLjOwsubYQG7werTOkbRLGdWq9qOymar/B7xUf0oDSkAa2iDBiHMhSqBl5YJrBvfSGmU/UJSjMaG8D4LlYBSOw26D0xofSprGiNtH6MqzRLeUqXRdxKAvtaRyPS71GQ2KO8UXXubpVlpmX+dxOA== 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)(136003)(39860400002)(346002)(396003)(376002)(230922051799003)(1800799009)(64100799003)(82310400011)(451199024)(186009)(36840700001)(40470700004)(46966006)(26005)(40460700003)(55016003)(52536014)(107886003)(47076005)(30864003)(7696005)(36860700001)(336012)(86362001)(6506007)(41300700001)(9686003)(83380400001)(81166007)(356005)(4326008)(82740400003)(5660300002)(70206006)(40480700001)(2906002)(316002)(6916009)(33656002)(8936002)(70586007)(478600001)(54906003)(8676002)(2004002)(357404004); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2023 12:33:57.4861 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ed0a4f60-0cf0-4137-9770-08dbd48d7e24 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: DU6PEPF0000A7DF.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9579 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_LOTSOFHASH, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY, URIBL_BLACK 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 Cleanup ifuncs. Remove uses of libc_hidden_builtin_def, use ENTRY rather than ENTRY_ALIGN, remove unnecessary defines and conditional compilation. Rename strlen_mte to strlen_generic. Remove rtld-memset. Passes regress, OK for commit? diff --git a/sysdeps/aarch64/memset.S b/sysdeps/aarch64/memset.S index 50e5da3e7aec3a7b4ef23676c35c34896e8078e6..bf3cf85c8a95fd8c03ae13c4173fe507040ee8cd 100644 --- a/sysdeps/aarch64/memset.S +++ b/sysdeps/aarch64/memset.S @@ -29,7 +29,7 @@ * */ -ENTRY_ALIGN (MEMSET, 6) +ENTRY (MEMSET) PTR_ARG (0) SIZE_ARG (2) diff --git a/sysdeps/aarch64/multiarch/Makefile b/sysdeps/aarch64/multiarch/Makefile index e6099548b96b80b656f3f22cd8d5598634647360..a1a4de3cd93c48db6e47eebc9c111186efca53fb 100644 --- a/sysdeps/aarch64/multiarch/Makefile +++ b/sysdeps/aarch64/multiarch/Makefile @@ -17,6 +17,6 @@ sysdep_routines += \ memset_kunpeng \ memset_mops \ strlen_asimd \ - strlen_mte \ + strlen_generic \ # sysdep_routines endif diff --git a/sysdeps/aarch64/multiarch/ifunc-impl-list.c b/sysdeps/aarch64/multiarch/ifunc-impl-list.c index da7f1153778efd41a15ef5aa900252f9e492b18d..836e8317a5d3b652134d199cf685499983b1a3fc 100644 --- a/sysdeps/aarch64/multiarch/ifunc-impl-list.c +++ b/sysdeps/aarch64/multiarch/ifunc-impl-list.c @@ -70,7 +70,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, IFUNC_IMPL (i, name, strlen, IFUNC_IMPL_ADD (array, i, strlen, !mte, __strlen_asimd) - IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_mte)) + IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_generic)) return 0; } diff --git a/sysdeps/aarch64/multiarch/memchr_nosimd.S b/sysdeps/aarch64/multiarch/memchr_nosimd.S index 57e48375e91edd74ee0a69e747e09d995ae8fd4f..780075189902919345c5eb15cba7ea0929043d6a 100644 --- a/sysdeps/aarch64/multiarch/memchr_nosimd.S +++ b/sysdeps/aarch64/multiarch/memchr_nosimd.S @@ -26,10 +26,6 @@ * Use base integer registers. */ -#ifndef MEMCHR -# define MEMCHR __memchr_nosimd -#endif - /* Arguments and results. */ #define srcin x0 #define chrin x1 @@ -62,7 +58,7 @@ #define REP8_7f 0x7f7f7f7f7f7f7f7f -ENTRY_ALIGN (MEMCHR, 6) +ENTRY (__memchr_nosimd) PTR_ARG (0) SIZE_ARG (2) @@ -219,5 +215,4 @@ L(none_chr): mov result, 0 ret -END (MEMCHR) -libc_hidden_builtin_def (MEMCHR) +END (__memchr_nosimd) diff --git a/sysdeps/aarch64/multiarch/memcpy_a64fx.S b/sysdeps/aarch64/multiarch/memcpy_a64fx.S index f89b5b670a16ceb944eb816d318e02628a239df8..baff7e96d0045dac5a6a7a8d555e997998c978dd 100644 --- a/sysdeps/aarch64/multiarch/memcpy_a64fx.S +++ b/sysdeps/aarch64/multiarch/memcpy_a64fx.S @@ -39,9 +39,6 @@ #define vlen8 x8 #if HAVE_AARCH64_SVE_ASM -# if IS_IN (libc) -# define MEMCPY __memcpy_a64fx -# define MEMMOVE __memmove_a64fx .arch armv8.2-a+sve @@ -97,7 +94,7 @@ #undef BTI_C #define BTI_C -ENTRY (MEMCPY) +ENTRY (__memcpy_a64fx) PTR_ARG (0) PTR_ARG (1) @@ -234,11 +231,10 @@ L(last_bytes): st1b z3.b, p0, [dstend, -1, mul vl] ret -END (MEMCPY) -libc_hidden_builtin_def (MEMCPY) +END (__memcpy_a64fx) -ENTRY_ALIGN (MEMMOVE, 4) +ENTRY_ALIGN (__memmove_a64fx, 4) PTR_ARG (0) PTR_ARG (1) @@ -307,7 +303,5 @@ L(full_overlap): mov dst, dstin b L(last_bytes) -END (MEMMOVE) -libc_hidden_builtin_def (MEMMOVE) -# endif /* IS_IN (libc) */ +END (__memmove_a64fx) #endif /* HAVE_AARCH64_SVE_ASM */ diff --git a/sysdeps/aarch64/multiarch/memcpy_falkor.S b/sysdeps/aarch64/multiarch/memcpy_falkor.S index ec0e4ade24bbad76979d2e34a36eff7703d30264..67c4ab34eba40c37c6aae08be6cb5e11e2a82d17 100644 --- a/sysdeps/aarch64/multiarch/memcpy_falkor.S +++ b/sysdeps/aarch64/multiarch/memcpy_falkor.S @@ -71,7 +71,7 @@ The non-temporal stores help optimize cache utilization. */ #if IS_IN (libc) -ENTRY_ALIGN (__memcpy_falkor, 6) +ENTRY (__memcpy_falkor) PTR_ARG (0) PTR_ARG (1) @@ -198,7 +198,6 @@ L(loop64): ret END (__memcpy_falkor) -libc_hidden_builtin_def (__memcpy_falkor) /* RATIONALE: @@ -216,7 +215,7 @@ libc_hidden_builtin_def (__memcpy_falkor) For small and medium cases memcpy is used. */ -ENTRY_ALIGN (__memmove_falkor, 6) +ENTRY (__memmove_falkor) PTR_ARG (0) PTR_ARG (1) @@ -311,5 +310,4 @@ L(move_long): 3: ret END (__memmove_falkor) -libc_hidden_builtin_def (__memmove_falkor) #endif diff --git a/sysdeps/aarch64/multiarch/memcpy_sve.S b/sysdeps/aarch64/multiarch/memcpy_sve.S index d11be6a44301af4bfd7fa4900555b769dc58d34d..2f14f9136698c5b3130482e2c15c5d4ceb198bda 100644 --- a/sysdeps/aarch64/multiarch/memcpy_sve.S +++ b/sysdeps/aarch64/multiarch/memcpy_sve.S @@ -141,7 +141,6 @@ L(copy64_from_end): ret END (__memcpy_sve) -libc_hidden_builtin_def (__memcpy_sve) ENTRY (__memmove_sve) @@ -208,5 +207,4 @@ L(return): ret END (__memmove_sve) -libc_hidden_builtin_def (__memmove_sve) #endif diff --git a/sysdeps/aarch64/multiarch/memcpy_thunderx.S b/sysdeps/aarch64/multiarch/memcpy_thunderx.S index 366287587f4aec5c00c35320fd1f862e45400d08..14269b1a47137f178e289e31026ab2874ccc3173 100644 --- a/sysdeps/aarch64/multiarch/memcpy_thunderx.S +++ b/sysdeps/aarch64/multiarch/memcpy_thunderx.S @@ -65,21 +65,7 @@ Overlapping large forward memmoves use a loop that copies backwards. */ -#ifndef MEMMOVE -# define MEMMOVE memmove -#endif -#ifndef MEMCPY -# define MEMCPY memcpy -#endif - -#if IS_IN (libc) - -# undef MEMCPY -# define MEMCPY __memcpy_thunderx -# undef MEMMOVE -# define MEMMOVE __memmove_thunderx - -ENTRY_ALIGN (MEMMOVE, 6) +ENTRY (__memmove_thunderx) PTR_ARG (0) PTR_ARG (1) @@ -91,9 +77,9 @@ ENTRY_ALIGN (MEMMOVE, 6) b.lo L(move_long) /* Common case falls through into memcpy. */ -END (MEMMOVE) -libc_hidden_builtin_def (MEMMOVE) -ENTRY (MEMCPY) +END (__memmove_thunderx) + +ENTRY (__memcpy_thunderx) PTR_ARG (0) PTR_ARG (1) @@ -316,7 +302,4 @@ L(move_long): stp C_l, C_h, [dstin] 3: ret -END (MEMCPY) -libc_hidden_builtin_def (MEMCPY) - -#endif +END (__memcpy_thunderx) diff --git a/sysdeps/aarch64/multiarch/memcpy_thunderx2.S b/sysdeps/aarch64/multiarch/memcpy_thunderx2.S index d3d6f1debcc936b81aa62b170969b149faa9913d..93993b9e03b95075dbc9aef13f44c2b9a2b7800f 100644 --- a/sysdeps/aarch64/multiarch/memcpy_thunderx2.S +++ b/sysdeps/aarch64/multiarch/memcpy_thunderx2.S @@ -75,27 +75,12 @@ #define I_v v16 #define J_v v17 -#ifndef MEMMOVE -# define MEMMOVE memmove -#endif -#ifndef MEMCPY -# define MEMCPY memcpy -#endif - -#if IS_IN (libc) - -#undef MEMCPY -#define MEMCPY __memcpy_thunderx2 -#undef MEMMOVE -#define MEMMOVE __memmove_thunderx2 - - /* Overlapping large forward memmoves use a loop that copies backwards. Otherwise memcpy is used. Small moves branch to memcopy16 directly. The longer memcpy cases fall through to the memcpy head. */ -ENTRY_ALIGN (MEMMOVE, 6) +ENTRY (__memmove_thunderx2) PTR_ARG (0) PTR_ARG (1) @@ -109,8 +94,7 @@ ENTRY_ALIGN (MEMMOVE, 6) ccmp tmp1, count, 2, hi b.lo L(move_long) -END (MEMMOVE) -libc_hidden_builtin_def (MEMMOVE) +END (__memmove_thunderx2) /* Copies are split into 3 main cases: small copies of up to 16 bytes, @@ -124,8 +108,7 @@ libc_hidden_builtin_def (MEMMOVE) #define MEMCPY_PREFETCH_LDR 640 - .p2align 4 -ENTRY (MEMCPY) +ENTRY (__memcpy_thunderx2) PTR_ARG (0) PTR_ARG (1) @@ -449,7 +432,7 @@ L(move_long): 3: ret -END (MEMCPY) +END (__memcpy_thunderx2) .section .rodata .p2align 4 @@ -472,6 +455,3 @@ L(ext_table): .word L(ext_size_13) -. .word L(ext_size_14) -. .word L(ext_size_15) -. - -libc_hidden_builtin_def (MEMCPY) -#endif diff --git a/sysdeps/aarch64/multiarch/memset_a64fx.S b/sysdeps/aarch64/multiarch/memset_a64fx.S index d520355143ead2acdaf6a7e1652d2417df8087e8..7176f3d284ab12f7a354781db668c0520f47702d 100644 --- a/sysdeps/aarch64/multiarch/memset_a64fx.S +++ b/sysdeps/aarch64/multiarch/memset_a64fx.S @@ -33,8 +33,6 @@ #define vector_length x9 #if HAVE_AARCH64_SVE_ASM -# if IS_IN (libc) -# define MEMSET __memset_a64fx .arch armv8.2-a+sve @@ -49,7 +47,7 @@ #undef BTI_C #define BTI_C -ENTRY (MEMSET) +ENTRY (__memset_a64fx) PTR_ARG (0) SIZE_ARG (2) @@ -166,8 +164,6 @@ L(L2): add count, count, CACHE_LINE_SIZE b L(last) -END (MEMSET) -libc_hidden_builtin_def (MEMSET) +END (__memset_a64fx) -#endif /* IS_IN (libc) */ #endif /* HAVE_AARCH64_SVE_ASM */ diff --git a/sysdeps/aarch64/multiarch/memset_base64.S b/sysdeps/aarch64/multiarch/memset_base64.S index 35296a6dec4944fa74af176bf280e17b11a027fd..0e8f709fa58478d6e9d62020c576bb9be108866c 100644 --- a/sysdeps/aarch64/multiarch/memset_base64.S +++ b/sysdeps/aarch64/multiarch/memset_base64.S @@ -34,7 +34,7 @@ * */ -ENTRY_ALIGN (MEMSET, 6) +ENTRY (MEMSET) PTR_ARG (0) SIZE_ARG (2) @@ -183,4 +183,3 @@ L(zva_64): #endif END (MEMSET) -libc_hidden_builtin_def (MEMSET) diff --git a/sysdeps/aarch64/multiarch/memset_emag.S b/sysdeps/aarch64/multiarch/memset_emag.S index 17d609cead96030fbd42f2997d081c6740396af3..6fecad4fae699f9967da94ddc88867afd5c59414 100644 --- a/sysdeps/aarch64/multiarch/memset_emag.S +++ b/sysdeps/aarch64/multiarch/memset_emag.S @@ -19,8 +19,7 @@ #include -#if IS_IN (libc) -# define MEMSET __memset_emag +#define MEMSET __memset_emag /* * Using DC ZVA to zero memory does not produce better performance if @@ -30,7 +29,6 @@ * workloads. */ -# define DC_ZVA_THRESHOLD 0 +#define DC_ZVA_THRESHOLD 0 -# include "./memset_base64.S" -#endif +#include "./memset_base64.S" diff --git a/sysdeps/aarch64/multiarch/memset_generic.S b/sysdeps/aarch64/multiarch/memset_generic.S index 9c23e482bf90d8b466d3e3d1e2d2d4a053b434bb..6c1f0daac8615c3e83e067db9b61e77c1c2c2fdd 100644 --- a/sysdeps/aarch64/multiarch/memset_generic.S +++ b/sysdeps/aarch64/multiarch/memset_generic.S @@ -21,9 +21,15 @@ #if IS_IN (libc) # define MEMSET __memset_generic + +/* Do not hide the generic version of memset, we use it internally. */ +# undef libc_hidden_builtin_def +# define libc_hidden_builtin_def(name) + /* Add a hidden definition for use within libc.so. */ # ifdef SHARED .globl __GI_memset; __GI_memset = __memset_generic # endif -# include #endif + +#include <../memset.S> diff --git a/sysdeps/aarch64/multiarch/memset_kunpeng.S b/sysdeps/aarch64/multiarch/memset_kunpeng.S index 86c46434fdd30460d0655850d25f69d75b193b2e..4a54373398ff14151c49490c06749277de664cd9 100644 --- a/sysdeps/aarch64/multiarch/memset_kunpeng.S +++ b/sysdeps/aarch64/multiarch/memset_kunpeng.S @@ -20,16 +20,13 @@ #include #include -#if IS_IN (libc) -# define MEMSET __memset_kunpeng - /* Assumptions: * * ARMv8-a, AArch64, unaligned accesses * */ -ENTRY_ALIGN (MEMSET, 6) +ENTRY (__memset_kunpeng) PTR_ARG (0) SIZE_ARG (2) @@ -108,6 +105,4 @@ L(set_long): stp q0, q0, [dstend, -32] ret -END (MEMSET) -libc_hidden_builtin_def (MEMSET) -#endif +END (__memset_kunpeng) diff --git a/sysdeps/aarch64/multiarch/rtld-memset.S b/sysdeps/aarch64/multiarch/rtld-memset.S deleted file mode 100644 index 4b035ed8b2cfc80cc37babe6cb2f146804feb46f..0000000000000000000000000000000000000000 --- a/sysdeps/aarch64/multiarch/rtld-memset.S +++ /dev/null @@ -1,25 +0,0 @@ -/* Memset for aarch64, for the dynamic linker. - Copyright (C) 2017-2023 Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -#include - -#if IS_IN (rtld) -# define MEMSET memset -# include -#endif diff --git a/sysdeps/aarch64/multiarch/strlen.c b/sysdeps/aarch64/multiarch/strlen.c index bbdd3de8c4a8dca2e86f6fcfbe810be2fb1867b1..728bd1936a218c77f931c7327d402bcc873c50f9 100644 --- a/sysdeps/aarch64/multiarch/strlen.c +++ b/sysdeps/aarch64/multiarch/strlen.c @@ -28,10 +28,10 @@ extern __typeof (__redirect_strlen) __strlen; -extern __typeof (__redirect_strlen) __strlen_mte attribute_hidden; +extern __typeof (__redirect_strlen) __strlen_generic attribute_hidden; extern __typeof (__redirect_strlen) __strlen_asimd attribute_hidden; -libc_ifunc (__strlen, (mte ? __strlen_mte : __strlen_asimd)); +libc_ifunc (__strlen, (mte ? __strlen_generic : __strlen_asimd)); # undef strlen strong_alias (__strlen, strlen); diff --git a/sysdeps/aarch64/multiarch/strlen_asimd.S b/sysdeps/aarch64/multiarch/strlen_asimd.S index 490439491d19c3f14b0228f42248bc8aa6e9e8bd..aee5ef9f78adb1f769dbc48ef9aae8966f120c24 100644 --- a/sysdeps/aarch64/multiarch/strlen_asimd.S +++ b/sysdeps/aarch64/multiarch/strlen_asimd.S @@ -203,4 +203,3 @@ L(page_cross): ret END (__strlen_asimd) -libc_hidden_builtin_def (__strlen_asimd) diff --git a/sysdeps/aarch64/multiarch/strlen_mte.S b/sysdeps/aarch64/multiarch/strlen_generic.S similarity index 85% rename from sysdeps/aarch64/multiarch/strlen_mte.S rename to sysdeps/aarch64/multiarch/strlen_generic.S index 1c1220b7675fcc83953aba9ceca79deedca9242b..2346296a188af76880435ff446b9fdd76a174072 100644 --- a/sysdeps/aarch64/multiarch/strlen_mte.S +++ b/sysdeps/aarch64/multiarch/strlen_generic.S @@ -17,14 +17,14 @@ . */ /* The actual strlen code is in ../strlen.S. If we are building libc this file - defines __strlen_mte. Otherwise the include of ../strlen.S will define - the normal __strlen entry points. */ + defines __strlen_generic. Otherwise the include of ../strlen.S will define + the normal __strlen entry points. */ #include #if IS_IN (libc) -# define STRLEN __strlen_mte +# define STRLEN __strlen_generic /* Do not hide the generic version of strlen, we use it internally. */ # undef libc_hidden_builtin_def @@ -32,7 +32,7 @@ # ifdef SHARED /* It doesn't make sense to send libc-internal strlen calls through a PLT. */ - .globl __GI_strlen; __GI_strlen = __strlen_mte + .globl __GI_strlen; __GI_strlen = __strlen_generic # endif #endif