| Message ID | DB9PR83MB09231EA92204CCAE6FE8941F925EA@DB9PR83MB0923.EURPRD83.prod.outlook.com |
|---|---|
| State | New |
| Headers |
Return-Path: <newlib-bounces~patchwork=sourceware.org@sourceware.org> 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 548793856260 for <patchwork@sourceware.org>; Thu, 24 Jul 2025 19:28:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 548793856260 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1753385330; bh=9HQwig5SwSvLlaedYuydc+1kOWlImLHqQu/Z2LvDKWM=; h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=BZy/IrBhvB2cVnrk/LLuJTNeSwL9d9sE7zlYVQKjOznUhkYCfr+CVjWKCAJTe7H59 7KF60fO04yvvVYrMXJZcquhuI10Szidice1i3wSkrNzHtybaUkOfUsQK4lR3EMHVbD 9LXdAa7CjlCun3w+S0T9M8dgnAm+HegrKO62RZT0= X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2097.outbound.protection.outlook.com [40.107.104.97]) by sourceware.org (Postfix) with ESMTPS id 20D0C385B51A for <newlib@sourceware.org>; Thu, 24 Jul 2025 19:28:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 20D0C385B51A ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 20D0C385B51A ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1753385302; cv=pass; b=dBluAKFD80EaGF3LXbrnrL/l+V/Tvsh4vVVoUAjtzFBfAUXNfDMks3TTxUit6tLbc+0m4pnIfsvK9LmIyRPMs3FcBdc9XYqnfVMxv3x27AOkVG9kjCaUPxSowcIRuniZp+2GMp423xum41byq3HHFIaZLY9wsYY60w1keBUk/C8= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1753385302; c=relaxed/simple; bh=VbE/K7wlIaiWX/EtW4MeCWC8lMPAnQdfjQO084X3ThE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=m3vylp7ol2eog2GHHtmuPYE9ty/4VRYO0+Qg8WliFe2cuyG20QF996VqegYJxLdUFkr3kkTB+XZokJNSgzId304KNfb+NHrClTWQlQmSlltv0SA3jH8tR0zniCZp8MHgG5w0Z1bHZLquhH0JDOPFLlysijTJ69XVnujCEuMAl6w= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20D0C385B51A ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YBaITXNRtdnLbH36LIkhNf8XkCww5eAVeXyT2MJ4Xv2hOUxQj9Yzu56H3ocpbYu9MuIbSvN+tclduhJ3xiDOMivwm7f8c3u+ISC7UfQ+U/V1zC+y1cX6GmPiv0HHnKl14sh8+mHoyIkQCTucuSr0+Ml8vnR5fHrnrRzmvSkx0RrrUK9JV2rpO2GO3PBUFNZs2WKhXIEwxmyW4VDhhg0FCXBMS6ChtVYdKKn6Zva8M/bh2sMhJdqYTDh/2grjBbyWAx6ShYl5A28yZtmttG7ycaosFApgpe/anpFg6rRPgniNoCf2ZAaCtuHcF2m6TqMdI6yZCROJzsjK9P4awv7CKA== 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=9HQwig5SwSvLlaedYuydc+1kOWlImLHqQu/Z2LvDKWM=; b=mPVG3BlLinymjD1EvufGQycAOGvDiTb940abekA9psPuKBsto+z8P/c6Easv2TmpgU+zXhdxphnjYRq/ysJm8y9izUsuCl4ojK/iH2sngG8UhZI6WeATa3lKDVDg0thWHwGB7evwk0NkeXT8hME5Ihxw1aej5rHM7of5hCt+QRpNmqw3I/wklwpGRgmVYojY5JBxPW4SC7/9+EYa4Noz/ojh2K7XZoU+iYBvx0H9DhpY9OnfOWs6lYdjpDpGcpboUGsC6ycX+5cswNQVNXyt9Xso02ea2VfAtwt7G73Si085C5ksMH5u7eCSqQjRm/QhqxdCNhCMR4eOegE7ixKBZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none Received: from DB9PR83MB0923.EURPRD83.prod.outlook.com (2603:10a6:10:5ca::18) by VI2PR83MB0791.EURPRD83.prod.outlook.com (2603:10a6:800:273::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8989.4; Thu, 24 Jul 2025 19:28:18 +0000 Received: from DB9PR83MB0923.EURPRD83.prod.outlook.com ([fe80::eb7:83b3:42aa:9e7e]) by DB9PR83MB0923.EURPRD83.prod.outlook.com ([fe80::eb7:83b3:42aa:9e7e%4]) with mapi id 15.20.8989.006; Thu, 24 Jul 2025 19:28:17 +0000 To: Joel Sherrill <joel.sherrill@gmail.com>, "newlib@sourceware.org" <newlib@sourceware.org>, "Richard Earnshaw (lists)" <richard.earnshaw@arm.com> Subject: [PATCH v2] newlib: libc: return back support for AArch64 ILP32 Thread-Topic: [PATCH v2] newlib: libc: return back support for AArch64 ILP32 Thread-Index: AQHb/NEb3zOyNJqmqkCyM4tiGUh29g== Date: Thu, 24 Jul 2025 19:28:17 +0000 Message-ID: <DB9PR83MB09231EA92204CCAE6FE8941F925EA@DB9PR83MB0923.EURPRD83.prod.outlook.com> References: <GV4PR83MB0941E525894BB08010DE642A925EA@GV4PR83MB0941.EURPRD83.prod.outlook.com> <aIIT5xpaKiXq5Cfg@calimero.vinschen.de> <CAF9ehCUe=EfJaVs3o61YY+mJnoSxcFJc6eqX=hmiadTzNijJzg@mail.gmail.com> <CAF9ehCX=7waqjhMVu9avaLWXR4zwtUTxKpjiVGykHcK3tOGozQ@mail.gmail.com> In-Reply-To: <CAF9ehCX=7waqjhMVu9avaLWXR4zwtUTxKpjiVGykHcK3tOGozQ@mail.gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2025-07-24T19:28:16.377Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DB9PR83MB0923:EE_|VI2PR83MB0791:EE_ x-ms-office365-filtering-correlation-id: 026bb83a-15fa-40a2-d20b-08ddcae83dfe x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|376014|366016|38070700018; x-microsoft-antispam-message-info: =?iso-8859-2?q?ptfUCY8BThWpmqFELSnO1sB2td?= =?iso-8859-2?q?NizPQcjEO6C5KmOOwm/PZw9iO3lWOQ3KxpGi04qHF1tByG6Q9T7C3E2sDK3J?= =?iso-8859-2?q?GZAB+vXxBN72q1h6bP2KC3He45otbHKeJXU0nKX3Tz+X4WXmUAtuC2jvq84/?= =?iso-8859-2?q?1kY5QdogOkFFSPQiQx2Gkqy8/H8KqFIn+gl0XnTwIjZc8942r+uwJk684S6R?= =?iso-8859-2?q?2zYkxF2abECAFvbEvul5JeYoj9jfEBBoUChvifeJzoITtmm9eo6vVrGfaBcM?= =?iso-8859-2?q?OgsQTyHscAiZRUmBI4eeUOZLzxtotwIXC4O6eYogeeFFTavt9n3elisK6pTp?= =?iso-8859-2?q?VkUyi8iZeh/JGBho4u5ZWkoKWL5VdkF4tL1GZ7c87EllRqgqfucxxray1vcv?= =?iso-8859-2?q?OurT9lWwPqUoYOljfLmGI7u1h5RBxyoIvtuF5ohtRacRuX+55ZAsCSsMRt7N?= =?iso-8859-2?q?6eU/7dG90vaGimLMfefJ5Eu1oeC798GYABhvLtnh/afnuYrvBOMezID5xCL1?= =?iso-8859-2?q?trg+rdob0Gfpu4s2sqVbpNQIoCeRGi1xMolBZO7jEXxwqobJtaGtjBXML8MS?= =?iso-8859-2?q?Tpgha4qT+Ata6cvLKBnXjPVIX3rirSO7ofA1n01jNzXu86Zqn3IwIVt+V39s?= =?iso-8859-2?q?XIkeSiTzUDaHDHwWArslz9I87MRk7UgzKNQPFLIo8MFRw3KYvcR9hKA+3kCi?= =?iso-8859-2?q?wePwJn9OgF3vsJFINvCYKW9zqG9KeH8ewUt6yvqGTex/8NqVhcG5VvQw4Fuq?= =?iso-8859-2?q?EH3FwKmLQba+TgM95gIjISaDs+6BizSGT1In4o2eQmF1SIa64T6T7beMkMps?= =?iso-8859-2?q?tXEgZCkrSp2tO0aYHyqPsFrJeoc/I00ZRaZFFTcTGa28FWzbwdhNIbEXIFB2?= =?iso-8859-2?q?IVJsnbGgR6N/CiRVbaYhxuN1NpyXGRBih8Qz4RDTfv36vGrDyu2ydwO+oPAP?= =?iso-8859-2?q?45IM/8wCc/2RR97Rc/zG5aFua2goPaAbD1LO99i4hKPANNADfDo2YCI6w6/Q?= =?iso-8859-2?q?G2ndPvJK6vnTpJtfPWFsEAqpoyJliJTJWLWfjsHSKxjbQncoW30eUHNGNpqC?= =?iso-8859-2?q?7bvHb3lOz7V9zTVrkExMOelOXPncBo+ySfQdZmH1nYvUc8+8tmZ/uwGjxHlV?= =?iso-8859-2?q?vP4klv50vakeZaLh+e9IJAERNcfvc0Vzn4G51f6/3yl22VCXL54k94rRhWBh?= =?iso-8859-2?q?YYyZXMlWlzqtL8IZk+MrJLFziE77kxfTDt0YBGFKZMiWbGL/CnMLdYL4qsBY?= =?iso-8859-2?q?ZGH/EdNBWgxBQVQLLthULex9HO0nuQHKT0FgcXkjwc8hHM1rXT8ERoif+TDl?= =?iso-8859-2?q?ou+P6+UvnrDhL8ctPEW4tCWoCGQTG5E3ElfWrqsEjmbGYNb+z+HMelOO4bYd?= =?iso-8859-2?q?wZ/EqjD54JFMHzaM1dPIaGNYbaLPTZV5Q2dGKwSrAWliRkBuz8QIoDHG2Hno?= =?iso-8859-2?q?d77vO32Z6rYjlb6daXR/K1yykgsvnc2Tglr1mDFI0DYNulkG20dfnMt+1EQE?= =?iso-8859-2?q?Wkbkct/CaFQNq1+0PJK57+DVF4/i6az8QHpRZyDd7Se4m+30Q=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR83MB0923.EURPRD83.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-2?q?yPeNTrPB6OG/LwYqUJz+Gha?= =?iso-8859-2?q?awo7/pT+2/ydjp7EMHkPRdUqy0Xsv7NVBV4hSpzY7p9VTh1k8lPK5bw3541Q?= =?iso-8859-2?q?Kw2SA6IRVKD4aQUFRS558BV7ceuRh5XXE7a7eM4Fy4nvAiOgkLOKBoaCNmaQ?= =?iso-8859-2?q?zB9Ng5R6/9oK7YEsABjt2pijWbVKUVnJcGIkQb8+wOQQIuLwIVDAAiLalBBM?= =?iso-8859-2?q?olDgAoRRiTpJ2E39pTS3xbuh+RuzHAYZhjmAVCf48SdsTsM7ajNBJ/ukKrIX?= =?iso-8859-2?q?fZ/aGjMaEzPddWkAuQp4yLXU8vXqfsNjllzaHckKPYESx8+EYJ2hZ953xHDP?= =?iso-8859-2?q?n+JLixnRM0vjmbMUA3HJ623T06i4We3w8KTG9SPoXTUXgMluhgmCKSftuIMO?= =?iso-8859-2?q?km+bJK0Tftf32lZtvQYSikN5l0ohxF5sbuX+wsTW4ZWW89I5KhaDGgjjp96C?= =?iso-8859-2?q?hBJZwx2/zth9IAo1z+8MVIdZmkqhWuDijF/rMZEhJJOUo7nO7fwzVRnamaZM?= =?iso-8859-2?q?RbFXLGGSKDEcus5GCbX35kYuFqxCpp9DkRurnE0hOXelaUmj5TNg5q5XpIJ/?= =?iso-8859-2?q?dWTlTLkSM+A5GvuldJaEhBNsBJBu7XA+nG4D+GR6tfKg2p/N5cntCKY9fsRf?= =?iso-8859-2?q?/m94bo56S9Lvt4juZyKUVcJalfLm87jcJTM8Tyxg53Y8ccnngr50Jc4wtNbO?= =?iso-8859-2?q?PbB2DyCLqV0E4stle2nD6/rMa5fJlmenpNTyyVt3e92IvMvxL3jd19Q/KdEp?= =?iso-8859-2?q?gKWXVWNhoyZk7au/qADb0xVic+GmTt99DwGpXXYMs5ARi4kGmDcfbun9/FqM?= =?iso-8859-2?q?2EvakVIELHcb2uPSYRi0JoqxXvY5sf5TYPTIsPg9ORfWjAI/PPa50khadZs5?= =?iso-8859-2?q?qUdr5W1OU3FtxLG8XKSjivgkTj82PZJz4cuMRZRiO5npdVaqQsyaNI/5omFX?= =?iso-8859-2?q?94Al6I8M9mqUSPy0k8Nc5iC3qmjiMGjIAOzgAAXziozr+b3kuMJqlQwJRIbi?= =?iso-8859-2?q?acb4ab4BCw+sZUBAlkHQBIBCuAdNnO4p6vVZ5EE9qsSVWfZwcrd2KjpbjR1p?= =?iso-8859-2?q?4zjKBVlbeMlbLPRv8b6E5TLAg/o2YuduzVl6ahTvZJ4wWRryqLZkjAW39Gu8?= =?iso-8859-2?q?Z6AtPysxf1fKaB6SE3msQz+YckWx8UazF/1guDuP3dE27CsPpjeH0GF02U6V?= =?iso-8859-2?q?6Kcympk6I48SYBcXP9P6F302MeXc2N1qHZI15Sd7P40xRrfwkmYCOHKl4E8I?= =?iso-8859-2?q?O2f4M52SlmvDPbwlMetmeYlU12zUqF1yoYlzSXv5sw7FC6LwbFNx+usjbTPT?= =?iso-8859-2?q?oXrNkaLU8FCbKR+k3MGof/OETBF7CfaGdq7P5fPcz5AcMMeiHuEGf4mR6E02?= =?iso-8859-2?q?7HyGlKfCaxH2MRwB/e51SZhaA4VmWLHA+k5muYsk7jDNvcmyCLIAawWiCaN7?= =?iso-8859-2?q?odMec+GQVvV7wjfAv4MlgyRygyfy3KAcheIBrVejyPRwkbDaufsir+j2hzYM?= =?iso-8859-2?q?paONzczRUA7pUpNjIGVvRsfil9NHFelZx+diCIlLQEuF90H+6HSy5CwnoLOo?= =?iso-8859-2?q?XZp/D/e5+OYN2?= Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB9PR83MB0923.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 026bb83a-15fa-40a2-d20b-08ddcae83dfe X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2025 19:28:17.7269 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Ll9KtFCYyGT4k39v7s2KNXBw+IGCI/dJAkyjk5uFShdEb/vxABgIoV0Q0gv4P9doGSlqv83kSETjG/uGw/FyiNyOnvPdVnix0oAytjdwSWY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR83MB0791 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_NONE, TXREP 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: newlib@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Newlib mailing list <newlib.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/newlib>, <mailto:newlib-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/newlib/> List-Post: <mailto:newlib@sourceware.org> List-Help: <mailto:newlib-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/newlib>, <mailto:newlib-request@sourceware.org?subject=subscribe> From: Radek Barton via Newlib <newlib@sourceware.org> Reply-To: Radek Barton <radek.barton@microsoft.com> Errors-To: newlib-bounces~patchwork=sourceware.org@sourceware.org |
| Series |
[v2] newlib: libc: return back support for AArch64 ILP32
|
|
Commit Message
Radek Barton
July 24, 2025, 7:28 p.m. UTC
Hello. Thank you for testing. I missed that hunk, sorry. Radek --- From c6ead049bee2efc5355f734425efaaaf833a0a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Barto=C5=88?= <radek.barton@microsoft.com> Date: Thu, 24 Jul 2025 12:36:02 +0200 Subject: [PATCH v2] newlib: libc: return back support for AArch64 ILP32 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch is returning back support for AArch64 ILP32 ABI that was removed in de479a54e22e8fcb6262639a8e67fe8b00a27c37 commit but is needed to ensure source code compatibility with GCC 14. The change in newlib/libc/machine/aarch64/asmdefs.h makes it out-of-the-sync with the current upstream implementation in https://github.com/ARM-software/optimized-routines repository. Signed-off-by: Radek Bartoň <radek.barton@microsoft.com> --- newlib/libc/machine/aarch64/asmdefs.h | 48 +++++++++++++++++++------ newlib/libc/machine/aarch64/memchr.S | 2 ++ newlib/libc/machine/aarch64/memcmp.S | 4 +++ newlib/libc/machine/aarch64/memcpy.S | 3 ++ newlib/libc/machine/aarch64/memrchr.S | 1 + newlib/libc/machine/aarch64/memset.S | 3 ++ newlib/libc/machine/aarch64/strchr.S | 1 + newlib/libc/machine/aarch64/strchrnul.S | 1 + newlib/libc/machine/aarch64/strcmp.S | 2 ++ newlib/libc/machine/aarch64/strcpy.S | 2 ++ newlib/libc/machine/aarch64/strlen.S | 1 + newlib/libc/machine/aarch64/strncmp.S | 3 ++ newlib/libc/machine/aarch64/strnlen.S | 2 ++ newlib/libc/machine/aarch64/strrchr.S | 1 + 14 files changed, 64 insertions(+), 10 deletions(-)
Comments
Replying to this because the v2 post never showed up in my inbox. I pulled it from the list archives and can report that now there are no property warnings when linking and all aarch64 BSPs for RTEMS build and link fine. I am ok for someone to push it. Thanks. --joel On Thu, Jul 24, 2025 at 2:28 PM Radek Barton <radek.barton@microsoft.com> wrote: > Hello. > > Thank you for testing. I missed that hunk, sorry. > > Radek > > --- > From c6ead049bee2efc5355f734425efaaaf833a0a6b Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Radek=20Barto=C5=88?= <radek.barton@microsoft.com> > Date: Thu, 24 Jul 2025 12:36:02 +0200 > Subject: [PATCH v2] newlib: libc: return back support for AArch64 ILP32 > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > This patch is returning back support for AArch64 ILP32 ABI that was > removed in de479a54e22e8fcb6262639a8e67fe8b00a27c37 commit but is needed > to ensure source code compatibility with GCC 14. > > The change in newlib/libc/machine/aarch64/asmdefs.h makes it > out-of-the-sync with the current upstream implementation in > https://github.com/ARM-software/optimized-routines repository. > > Signed-off-by: Radek Bartoň <radek.barton@microsoft.com> > --- > newlib/libc/machine/aarch64/asmdefs.h | 48 +++++++++++++++++++------ > newlib/libc/machine/aarch64/memchr.S | 2 ++ > newlib/libc/machine/aarch64/memcmp.S | 4 +++ > newlib/libc/machine/aarch64/memcpy.S | 3 ++ > newlib/libc/machine/aarch64/memrchr.S | 1 + > newlib/libc/machine/aarch64/memset.S | 3 ++ > newlib/libc/machine/aarch64/strchr.S | 1 + > newlib/libc/machine/aarch64/strchrnul.S | 1 + > newlib/libc/machine/aarch64/strcmp.S | 2 ++ > newlib/libc/machine/aarch64/strcpy.S | 2 ++ > newlib/libc/machine/aarch64/strlen.S | 1 + > newlib/libc/machine/aarch64/strncmp.S | 3 ++ > newlib/libc/machine/aarch64/strnlen.S | 2 ++ > newlib/libc/machine/aarch64/strrchr.S | 1 + > 14 files changed, 64 insertions(+), 10 deletions(-) > > diff --git a/newlib/libc/machine/aarch64/asmdefs.h > b/newlib/libc/machine/aarch64/asmdefs.h > index 6c99fa704..2aaa459ee 100644 > --- a/newlib/libc/machine/aarch64/asmdefs.h > +++ b/newlib/libc/machine/aarch64/asmdefs.h > @@ -30,18 +30,32 @@ > #define FEATURE_1_PAC 2 > > /* Add a NT_GNU_PROPERTY_TYPE_0 note. */ > +#ifdef __ILP32__ > #define GNU_PROPERTY(type, value) \ > - .section .note.gnu.property, "a" SEP \ > - .p2align 3 SEP \ > - .word 4 SEP \ > - .word 16 SEP \ > - .word 5 SEP \ > - .asciz "GNU" SEP \ > - .word type SEP \ > - .word 4 SEP \ > - .word value SEP \ > - .word 0 SEP \ > + .section .note.gnu.property, "a"; \ > + .p2align 2; \ > + .word 4; \ > + .word 12; \ > + .word 5; \ > + .asciz "GNU"; \ > + .word type; \ > + .word 4; \ > + .word value; \ > .text > +#else > +#define GNU_PROPERTY(type, value) \ > + .section .note.gnu.property, "a"; \ > + .p2align 3; \ > + .word 4; \ > + .word 16; \ > + .word 5; \ > + .asciz "GNU"; \ > + .word type; \ > + .word 4; \ > + .word value; \ > + .word 0; \ > + .text > +#endif > > /* If set then the GNU Property Note section will be added to > mark objects to support BTI and PAC-RET. */ > @@ -88,4 +102,18 @@ GNU_PROPERTY (FEATURE_1_AND, > FEATURE_1_BTI|FEATURE_1_PAC) > > #define L(l) .L ## l > > +#ifdef __ILP32__ > + /* Sanitize padding bits of pointer arguments as per aapcs64 */ > +#define PTR_ARG(n) mov w##n, w##n > +#else > +#define PTR_ARG(n) > +#endif > + > +#ifdef __ILP32__ > + /* Sanitize padding bits of size arguments as per aapcs64 */ > +#define SIZE_ARG(n) mov w##n, w##n > +#else > +#define SIZE_ARG(n) > +#endif > + > #endif > diff --git a/newlib/libc/machine/aarch64/memchr.S > b/newlib/libc/machine/aarch64/memchr.S > index 074a004cf..a0f305e0f 100644 > --- a/newlib/libc/machine/aarch64/memchr.S > +++ b/newlib/libc/machine/aarch64/memchr.S > @@ -50,6 +50,8 @@ > */ > > ENTRY (memchr) > + PTR_ARG (0) > + SIZE_ARG (2) > /* Do not dereference srcin if no bytes to compare. */ > cbz cntin, L(zero_length) > /* > diff --git a/newlib/libc/machine/aarch64/memcmp.S > b/newlib/libc/machine/aarch64/memcmp.S > index 2a9c446bb..18874d321 100644 > --- a/newlib/libc/machine/aarch64/memcmp.S > +++ b/newlib/libc/machine/aarch64/memcmp.S > @@ -34,6 +34,10 @@ > > > ENTRY (memcmp) > + PTR_ARG (0) > + PTR_ARG (1) > + SIZE_ARG (2) > + > cmp limit, 16 > b.lo L(less16) > ldp data1, data3, [src1] > diff --git a/newlib/libc/machine/aarch64/memcpy.S > b/newlib/libc/machine/aarch64/memcpy.S > index 252d2452a..248e7843a 100644 > --- a/newlib/libc/machine/aarch64/memcpy.S > +++ b/newlib/libc/machine/aarch64/memcpy.S > @@ -58,6 +58,9 @@ > > ENTRY_ALIAS (memmove) > ENTRY (memcpy) > + PTR_ARG (0) > + PTR_ARG (1) > + SIZE_ARG (2) > add srcend, src, count > add dstend, dstin, count > cmp count, 128 > diff --git a/newlib/libc/machine/aarch64/memrchr.S > b/newlib/libc/machine/aarch64/memrchr.S > index 2525cf190..ba9915cc3 100644 > --- a/newlib/libc/machine/aarch64/memrchr.S > +++ b/newlib/libc/machine/aarch64/memrchr.S > @@ -45,6 +45,7 @@ > exactly which byte matched. */ > > ENTRY (memrchr) > + PTR_ARG (0) > add end, srcin, cntin > sub endm1, end, 1 > bic src, endm1, 15 > diff --git a/newlib/libc/machine/aarch64/memset.S > b/newlib/libc/machine/aarch64/memset.S > index 5bf4851f3..ca76439a9 100644 > --- a/newlib/libc/machine/aarch64/memset.S > +++ b/newlib/libc/machine/aarch64/memset.S > @@ -25,6 +25,9 @@ > #define zva_val x5 > > ENTRY (memset) > + PTR_ARG (0) > + SIZE_ARG (2) > + > dup v0.16B, valw > add dstend, dstin, count > > diff --git a/newlib/libc/machine/aarch64/strchr.S > b/newlib/libc/machine/aarch64/strchr.S > index a4e089b99..500d9aff2 100644 > --- a/newlib/libc/machine/aarch64/strchr.S > +++ b/newlib/libc/machine/aarch64/strchr.S > @@ -54,6 +54,7 @@ > /* Locals and temporaries. */ > > ENTRY (strchr) > + PTR_ARG (0) > /* Magic constant 0xc0300c03 to allow us to identify which lane > matches the requested byte. Even bits are set if the character > matches, odd bits if either the char is NUL or matches. */ > diff --git a/newlib/libc/machine/aarch64/strchrnul.S > b/newlib/libc/machine/aarch64/strchrnul.S > index 4d6093be7..ceaf4dca1 100644 > --- a/newlib/libc/machine/aarch64/strchrnul.S > +++ b/newlib/libc/machine/aarch64/strchrnul.S > @@ -50,6 +50,7 @@ > /* Locals and temporaries. */ > > ENTRY (strchrnul) > + PTR_ARG (0) > /* Magic constant 0x40100401 to allow us to identify which lane > matches the termination condition. */ > mov wtmp2, #0x0401 > diff --git a/newlib/libc/machine/aarch64/strcmp.S > b/newlib/libc/machine/aarch64/strcmp.S > index 1d85da432..691a1760e 100644 > --- a/newlib/libc/machine/aarch64/strcmp.S > +++ b/newlib/libc/machine/aarch64/strcmp.S > @@ -54,6 +54,8 @@ > > > ENTRY (strcmp) > + PTR_ARG (0) > + PTR_ARG (1) > sub off2, src2, src1 > mov zeroones, REP8_01 > and tmp, src1, 7 > diff --git a/newlib/libc/machine/aarch64/strcpy.S > b/newlib/libc/machine/aarch64/strcpy.S > index 1f5f70792..57c46f390 100644 > --- a/newlib/libc/machine/aarch64/strcpy.S > +++ b/newlib/libc/machine/aarch64/strcpy.S > @@ -55,6 +55,8 @@ > exactly which byte matched. */ > > ENTRY (STRCPY) > + PTR_ARG (0) > + PTR_ARG (1) > bic src, srcin, 15 > ld1 {vdata.16b}, [src] > cmeq vhas_nul.16b, vdata.16b, 0 > diff --git a/newlib/libc/machine/aarch64/strlen.S > b/newlib/libc/machine/aarch64/strlen.S > index a3345a3ab..68a6f357c 100644 > --- a/newlib/libc/machine/aarch64/strlen.S > +++ b/newlib/libc/machine/aarch64/strlen.S > @@ -78,6 +78,7 @@ > character, return the length, if not, continue in the main loop. */ > > ENTRY (strlen) > + PTR_ARG (0) > and tmp1, srcin, MIN_PAGE_SIZE - 1 > cmp tmp1, MIN_PAGE_SIZE - 32 > b.hi L(page_cross) > diff --git a/newlib/libc/machine/aarch64/strncmp.S > b/newlib/libc/machine/aarch64/strncmp.S > index 6b1994ef5..373695503 100644 > --- a/newlib/libc/machine/aarch64/strncmp.S > +++ b/newlib/libc/machine/aarch64/strncmp.S > @@ -58,6 +58,9 @@ > #endif > > ENTRY (strncmp) > + PTR_ARG (0) > + PTR_ARG (1) > + SIZE_ARG (2) > cbz limit, L(ret0) > eor tmp1, src1, src2 > mov zeroones, #REP8_01 > diff --git a/newlib/libc/machine/aarch64/strnlen.S > b/newlib/libc/machine/aarch64/strnlen.S > index dc9fcb2fd..091002e0b 100644 > --- a/newlib/libc/machine/aarch64/strnlen.S > +++ b/newlib/libc/machine/aarch64/strnlen.S > @@ -39,6 +39,8 @@ > identifies the first zero byte. */ > > ENTRY (strnlen) > + PTR_ARG (0) > + SIZE_ARG (1) > bic src, srcin, 15 > cbz cntin, L(nomatch) > ld1 {vdata.16b}, [src] > diff --git a/newlib/libc/machine/aarch64/strrchr.S > b/newlib/libc/machine/aarch64/strrchr.S > index 67013e39d..b0574228b 100644 > --- a/newlib/libc/machine/aarch64/strrchr.S > +++ b/newlib/libc/machine/aarch64/strrchr.S > @@ -58,6 +58,7 @@ > identify exactly which byte is causing the termination, and why. */ > > ENTRY (strrchr) > + PTR_ARG (0) > /* Magic constant 0x40100401 to allow us to identify which lane > matches the requested byte. Magic constant 0x80200802 used > similarly for NUL termination. */ > -- > 2.50.1.vfs.0.0 > >
Seeing as I am the one who had the issue and has confirmed the fix, I went ahead and pushed it. Given that it is Friday afternoon, I wanted to leave a build of all RTEMS tools going with the new hash. That's 26 tool chains for our development main -- 13 targets each for GCC 13 and GCC 15. Thankfully, we obsoleted 5 target architectures after our last release or that number would be even higher. Thanks. --joel On Fri, Jul 25, 2025 at 11:57 AM Joel Sherrill <joel.sherrill@gmail.com> wrote: > Replying to this because the v2 post never showed up in my inbox. > I pulled it from the list archives and can report that now there are no > property warnings when linking and all aarch64 BSPs for RTEMS build > and link fine. > > I am ok for someone to push it. > > Thanks. > > --joel > > On Thu, Jul 24, 2025 at 2:28 PM Radek Barton <radek.barton@microsoft.com> > wrote: > >> Hello. >> >> Thank you for testing. I missed that hunk, sorry. >> >> Radek >> >> --- >> From c6ead049bee2efc5355f734425efaaaf833a0a6b Mon Sep 17 00:00:00 2001 >> From: =?UTF-8?q?Radek=20Barto=C5=88?= <radek.barton@microsoft.com> >> Date: Thu, 24 Jul 2025 12:36:02 +0200 >> Subject: [PATCH v2] newlib: libc: return back support for AArch64 ILP32 >> MIME-Version: 1.0 >> Content-Type: text/plain; charset=UTF-8 >> Content-Transfer-Encoding: 8bit >> >> This patch is returning back support for AArch64 ILP32 ABI that was >> removed in de479a54e22e8fcb6262639a8e67fe8b00a27c37 commit but is needed >> to ensure source code compatibility with GCC 14. >> >> The change in newlib/libc/machine/aarch64/asmdefs.h makes it >> out-of-the-sync with the current upstream implementation in >> https://github.com/ARM-software/optimized-routines repository. >> >> Signed-off-by: Radek Bartoň <radek.barton@microsoft.com> >> --- >> newlib/libc/machine/aarch64/asmdefs.h | 48 +++++++++++++++++++------ >> newlib/libc/machine/aarch64/memchr.S | 2 ++ >> newlib/libc/machine/aarch64/memcmp.S | 4 +++ >> newlib/libc/machine/aarch64/memcpy.S | 3 ++ >> newlib/libc/machine/aarch64/memrchr.S | 1 + >> newlib/libc/machine/aarch64/memset.S | 3 ++ >> newlib/libc/machine/aarch64/strchr.S | 1 + >> newlib/libc/machine/aarch64/strchrnul.S | 1 + >> newlib/libc/machine/aarch64/strcmp.S | 2 ++ >> newlib/libc/machine/aarch64/strcpy.S | 2 ++ >> newlib/libc/machine/aarch64/strlen.S | 1 + >> newlib/libc/machine/aarch64/strncmp.S | 3 ++ >> newlib/libc/machine/aarch64/strnlen.S | 2 ++ >> newlib/libc/machine/aarch64/strrchr.S | 1 + >> 14 files changed, 64 insertions(+), 10 deletions(-) >> >> diff --git a/newlib/libc/machine/aarch64/asmdefs.h >> b/newlib/libc/machine/aarch64/asmdefs.h >> index 6c99fa704..2aaa459ee 100644 >> --- a/newlib/libc/machine/aarch64/asmdefs.h >> +++ b/newlib/libc/machine/aarch64/asmdefs.h >> @@ -30,18 +30,32 @@ >> #define FEATURE_1_PAC 2 >> >> /* Add a NT_GNU_PROPERTY_TYPE_0 note. */ >> +#ifdef __ILP32__ >> #define GNU_PROPERTY(type, value) \ >> - .section .note.gnu.property, "a" SEP \ >> - .p2align 3 SEP \ >> - .word 4 SEP \ >> - .word 16 SEP \ >> - .word 5 SEP \ >> - .asciz "GNU" SEP \ >> - .word type SEP \ >> - .word 4 SEP \ >> - .word value SEP \ >> - .word 0 SEP \ >> + .section .note.gnu.property, "a"; \ >> + .p2align 2; \ >> + .word 4; \ >> + .word 12; \ >> + .word 5; \ >> + .asciz "GNU"; \ >> + .word type; \ >> + .word 4; \ >> + .word value; \ >> .text >> +#else >> +#define GNU_PROPERTY(type, value) \ >> + .section .note.gnu.property, "a"; \ >> + .p2align 3; \ >> + .word 4; \ >> + .word 16; \ >> + .word 5; \ >> + .asciz "GNU"; \ >> + .word type; \ >> + .word 4; \ >> + .word value; \ >> + .word 0; \ >> + .text >> +#endif >> >> /* If set then the GNU Property Note section will be added to >> mark objects to support BTI and PAC-RET. */ >> @@ -88,4 +102,18 @@ GNU_PROPERTY (FEATURE_1_AND, >> FEATURE_1_BTI|FEATURE_1_PAC) >> >> #define L(l) .L ## l >> >> +#ifdef __ILP32__ >> + /* Sanitize padding bits of pointer arguments as per aapcs64 */ >> +#define PTR_ARG(n) mov w##n, w##n >> +#else >> +#define PTR_ARG(n) >> +#endif >> + >> +#ifdef __ILP32__ >> + /* Sanitize padding bits of size arguments as per aapcs64 */ >> +#define SIZE_ARG(n) mov w##n, w##n >> +#else >> +#define SIZE_ARG(n) >> +#endif >> + >> #endif >> diff --git a/newlib/libc/machine/aarch64/memchr.S >> b/newlib/libc/machine/aarch64/memchr.S >> index 074a004cf..a0f305e0f 100644 >> --- a/newlib/libc/machine/aarch64/memchr.S >> +++ b/newlib/libc/machine/aarch64/memchr.S >> @@ -50,6 +50,8 @@ >> */ >> >> ENTRY (memchr) >> + PTR_ARG (0) >> + SIZE_ARG (2) >> /* Do not dereference srcin if no bytes to compare. */ >> cbz cntin, L(zero_length) >> /* >> diff --git a/newlib/libc/machine/aarch64/memcmp.S >> b/newlib/libc/machine/aarch64/memcmp.S >> index 2a9c446bb..18874d321 100644 >> --- a/newlib/libc/machine/aarch64/memcmp.S >> +++ b/newlib/libc/machine/aarch64/memcmp.S >> @@ -34,6 +34,10 @@ >> >> >> ENTRY (memcmp) >> + PTR_ARG (0) >> + PTR_ARG (1) >> + SIZE_ARG (2) >> + >> cmp limit, 16 >> b.lo L(less16) >> ldp data1, data3, [src1] >> diff --git a/newlib/libc/machine/aarch64/memcpy.S >> b/newlib/libc/machine/aarch64/memcpy.S >> index 252d2452a..248e7843a 100644 >> --- a/newlib/libc/machine/aarch64/memcpy.S >> +++ b/newlib/libc/machine/aarch64/memcpy.S >> @@ -58,6 +58,9 @@ >> >> ENTRY_ALIAS (memmove) >> ENTRY (memcpy) >> + PTR_ARG (0) >> + PTR_ARG (1) >> + SIZE_ARG (2) >> add srcend, src, count >> add dstend, dstin, count >> cmp count, 128 >> diff --git a/newlib/libc/machine/aarch64/memrchr.S >> b/newlib/libc/machine/aarch64/memrchr.S >> index 2525cf190..ba9915cc3 100644 >> --- a/newlib/libc/machine/aarch64/memrchr.S >> +++ b/newlib/libc/machine/aarch64/memrchr.S >> @@ -45,6 +45,7 @@ >> exactly which byte matched. */ >> >> ENTRY (memrchr) >> + PTR_ARG (0) >> add end, srcin, cntin >> sub endm1, end, 1 >> bic src, endm1, 15 >> diff --git a/newlib/libc/machine/aarch64/memset.S >> b/newlib/libc/machine/aarch64/memset.S >> index 5bf4851f3..ca76439a9 100644 >> --- a/newlib/libc/machine/aarch64/memset.S >> +++ b/newlib/libc/machine/aarch64/memset.S >> @@ -25,6 +25,9 @@ >> #define zva_val x5 >> >> ENTRY (memset) >> + PTR_ARG (0) >> + SIZE_ARG (2) >> + >> dup v0.16B, valw >> add dstend, dstin, count >> >> diff --git a/newlib/libc/machine/aarch64/strchr.S >> b/newlib/libc/machine/aarch64/strchr.S >> index a4e089b99..500d9aff2 100644 >> --- a/newlib/libc/machine/aarch64/strchr.S >> +++ b/newlib/libc/machine/aarch64/strchr.S >> @@ -54,6 +54,7 @@ >> /* Locals and temporaries. */ >> >> ENTRY (strchr) >> + PTR_ARG (0) >> /* Magic constant 0xc0300c03 to allow us to identify which lane >> matches the requested byte. Even bits are set if the character >> matches, odd bits if either the char is NUL or matches. */ >> diff --git a/newlib/libc/machine/aarch64/strchrnul.S >> b/newlib/libc/machine/aarch64/strchrnul.S >> index 4d6093be7..ceaf4dca1 100644 >> --- a/newlib/libc/machine/aarch64/strchrnul.S >> +++ b/newlib/libc/machine/aarch64/strchrnul.S >> @@ -50,6 +50,7 @@ >> /* Locals and temporaries. */ >> >> ENTRY (strchrnul) >> + PTR_ARG (0) >> /* Magic constant 0x40100401 to allow us to identify which lane >> matches the termination condition. */ >> mov wtmp2, #0x0401 >> diff --git a/newlib/libc/machine/aarch64/strcmp.S >> b/newlib/libc/machine/aarch64/strcmp.S >> index 1d85da432..691a1760e 100644 >> --- a/newlib/libc/machine/aarch64/strcmp.S >> +++ b/newlib/libc/machine/aarch64/strcmp.S >> @@ -54,6 +54,8 @@ >> >> >> ENTRY (strcmp) >> + PTR_ARG (0) >> + PTR_ARG (1) >> sub off2, src2, src1 >> mov zeroones, REP8_01 >> and tmp, src1, 7 >> diff --git a/newlib/libc/machine/aarch64/strcpy.S >> b/newlib/libc/machine/aarch64/strcpy.S >> index 1f5f70792..57c46f390 100644 >> --- a/newlib/libc/machine/aarch64/strcpy.S >> +++ b/newlib/libc/machine/aarch64/strcpy.S >> @@ -55,6 +55,8 @@ >> exactly which byte matched. */ >> >> ENTRY (STRCPY) >> + PTR_ARG (0) >> + PTR_ARG (1) >> bic src, srcin, 15 >> ld1 {vdata.16b}, [src] >> cmeq vhas_nul.16b, vdata.16b, 0 >> diff --git a/newlib/libc/machine/aarch64/strlen.S >> b/newlib/libc/machine/aarch64/strlen.S >> index a3345a3ab..68a6f357c 100644 >> --- a/newlib/libc/machine/aarch64/strlen.S >> +++ b/newlib/libc/machine/aarch64/strlen.S >> @@ -78,6 +78,7 @@ >> character, return the length, if not, continue in the main loop. */ >> >> ENTRY (strlen) >> + PTR_ARG (0) >> and tmp1, srcin, MIN_PAGE_SIZE - 1 >> cmp tmp1, MIN_PAGE_SIZE - 32 >> b.hi L(page_cross) >> diff --git a/newlib/libc/machine/aarch64/strncmp.S >> b/newlib/libc/machine/aarch64/strncmp.S >> index 6b1994ef5..373695503 100644 >> --- a/newlib/libc/machine/aarch64/strncmp.S >> +++ b/newlib/libc/machine/aarch64/strncmp.S >> @@ -58,6 +58,9 @@ >> #endif >> >> ENTRY (strncmp) >> + PTR_ARG (0) >> + PTR_ARG (1) >> + SIZE_ARG (2) >> cbz limit, L(ret0) >> eor tmp1, src1, src2 >> mov zeroones, #REP8_01 >> diff --git a/newlib/libc/machine/aarch64/strnlen.S >> b/newlib/libc/machine/aarch64/strnlen.S >> index dc9fcb2fd..091002e0b 100644 >> --- a/newlib/libc/machine/aarch64/strnlen.S >> +++ b/newlib/libc/machine/aarch64/strnlen.S >> @@ -39,6 +39,8 @@ >> identifies the first zero byte. */ >> >> ENTRY (strnlen) >> + PTR_ARG (0) >> + SIZE_ARG (1) >> bic src, srcin, 15 >> cbz cntin, L(nomatch) >> ld1 {vdata.16b}, [src] >> diff --git a/newlib/libc/machine/aarch64/strrchr.S >> b/newlib/libc/machine/aarch64/strrchr.S >> index 67013e39d..b0574228b 100644 >> --- a/newlib/libc/machine/aarch64/strrchr.S >> +++ b/newlib/libc/machine/aarch64/strrchr.S >> @@ -58,6 +58,7 @@ >> identify exactly which byte is causing the termination, and why. */ >> >> ENTRY (strrchr) >> + PTR_ARG (0) >> /* Magic constant 0x40100401 to allow us to identify which lane >> matches the requested byte. Magic constant 0x80200802 used >> similarly for NUL termination. */ >> -- >> 2.50.1.vfs.0.0 >> >>
I will admit to pushing the local patch I had to revert it. I reverted my revert and then added Radek's again. I am building all RTEMS tool chains with the newlib upstream hash with no patches. This was needed whether I made a mistake or not as I had to switch our build over to the upstream with no patches. Sorry. --joel On Fri, Jul 25, 2025 at 12:07 PM Joel Sherrill <joel.sherrill@gmail.com> wrote: > Seeing as I am the one who had the issue and has confirmed the fix, > I went ahead and pushed it. > > Given that it is Friday afternoon, I wanted to leave a build of all RTEMS > tools going with the new hash. That's 26 tool chains for our development > main -- 13 targets each for GCC 13 and GCC 15. Thankfully, we obsoleted > 5 target architectures after our last release or that number would be even > higher. > > Thanks. > > --joel > > On Fri, Jul 25, 2025 at 11:57 AM Joel Sherrill <joel.sherrill@gmail.com> > wrote: > >> Replying to this because the v2 post never showed up in my inbox. >> I pulled it from the list archives and can report that now there are no >> property warnings when linking and all aarch64 BSPs for RTEMS build >> and link fine. >> >> I am ok for someone to push it. >> >> Thanks. >> >> --joel >> >> On Thu, Jul 24, 2025 at 2:28 PM Radek Barton <radek.barton@microsoft.com> >> wrote: >> >>> Hello. >>> >>> Thank you for testing. I missed that hunk, sorry. >>> >>> Radek >>> >>> --- >>> From c6ead049bee2efc5355f734425efaaaf833a0a6b Mon Sep 17 00:00:00 2001 >>> From: =?UTF-8?q?Radek=20Barto=C5=88?= <radek.barton@microsoft.com> >>> Date: Thu, 24 Jul 2025 12:36:02 +0200 >>> Subject: [PATCH v2] newlib: libc: return back support for AArch64 ILP32 >>> MIME-Version: 1.0 >>> Content-Type: text/plain; charset=UTF-8 >>> Content-Transfer-Encoding: 8bit >>> >>> This patch is returning back support for AArch64 ILP32 ABI that was >>> removed in de479a54e22e8fcb6262639a8e67fe8b00a27c37 commit but is needed >>> to ensure source code compatibility with GCC 14. >>> >>> The change in newlib/libc/machine/aarch64/asmdefs.h makes it >>> out-of-the-sync with the current upstream implementation in >>> https://github.com/ARM-software/optimized-routines repository. >>> >>> Signed-off-by: Radek Bartoň <radek.barton@microsoft.com> >>> --- >>> newlib/libc/machine/aarch64/asmdefs.h | 48 +++++++++++++++++++------ >>> newlib/libc/machine/aarch64/memchr.S | 2 ++ >>> newlib/libc/machine/aarch64/memcmp.S | 4 +++ >>> newlib/libc/machine/aarch64/memcpy.S | 3 ++ >>> newlib/libc/machine/aarch64/memrchr.S | 1 + >>> newlib/libc/machine/aarch64/memset.S | 3 ++ >>> newlib/libc/machine/aarch64/strchr.S | 1 + >>> newlib/libc/machine/aarch64/strchrnul.S | 1 + >>> newlib/libc/machine/aarch64/strcmp.S | 2 ++ >>> newlib/libc/machine/aarch64/strcpy.S | 2 ++ >>> newlib/libc/machine/aarch64/strlen.S | 1 + >>> newlib/libc/machine/aarch64/strncmp.S | 3 ++ >>> newlib/libc/machine/aarch64/strnlen.S | 2 ++ >>> newlib/libc/machine/aarch64/strrchr.S | 1 + >>> 14 files changed, 64 insertions(+), 10 deletions(-) >>> >>> diff --git a/newlib/libc/machine/aarch64/asmdefs.h >>> b/newlib/libc/machine/aarch64/asmdefs.h >>> index 6c99fa704..2aaa459ee 100644 >>> --- a/newlib/libc/machine/aarch64/asmdefs.h >>> +++ b/newlib/libc/machine/aarch64/asmdefs.h >>> @@ -30,18 +30,32 @@ >>> #define FEATURE_1_PAC 2 >>> >>> /* Add a NT_GNU_PROPERTY_TYPE_0 note. */ >>> +#ifdef __ILP32__ >>> #define GNU_PROPERTY(type, value) \ >>> - .section .note.gnu.property, "a" SEP \ >>> - .p2align 3 SEP \ >>> - .word 4 SEP \ >>> - .word 16 SEP \ >>> - .word 5 SEP \ >>> - .asciz "GNU" SEP \ >>> - .word type SEP \ >>> - .word 4 SEP \ >>> - .word value SEP \ >>> - .word 0 SEP \ >>> + .section .note.gnu.property, "a"; \ >>> + .p2align 2; \ >>> + .word 4; \ >>> + .word 12; \ >>> + .word 5; \ >>> + .asciz "GNU"; \ >>> + .word type; \ >>> + .word 4; \ >>> + .word value; \ >>> .text >>> +#else >>> +#define GNU_PROPERTY(type, value) \ >>> + .section .note.gnu.property, "a"; \ >>> + .p2align 3; \ >>> + .word 4; \ >>> + .word 16; \ >>> + .word 5; \ >>> + .asciz "GNU"; \ >>> + .word type; \ >>> + .word 4; \ >>> + .word value; \ >>> + .word 0; \ >>> + .text >>> +#endif >>> >>> /* If set then the GNU Property Note section will be added to >>> mark objects to support BTI and PAC-RET. */ >>> @@ -88,4 +102,18 @@ GNU_PROPERTY (FEATURE_1_AND, >>> FEATURE_1_BTI|FEATURE_1_PAC) >>> >>> #define L(l) .L ## l >>> >>> +#ifdef __ILP32__ >>> + /* Sanitize padding bits of pointer arguments as per aapcs64 */ >>> +#define PTR_ARG(n) mov w##n, w##n >>> +#else >>> +#define PTR_ARG(n) >>> +#endif >>> + >>> +#ifdef __ILP32__ >>> + /* Sanitize padding bits of size arguments as per aapcs64 */ >>> +#define SIZE_ARG(n) mov w##n, w##n >>> +#else >>> +#define SIZE_ARG(n) >>> +#endif >>> + >>> #endif >>> diff --git a/newlib/libc/machine/aarch64/memchr.S >>> b/newlib/libc/machine/aarch64/memchr.S >>> index 074a004cf..a0f305e0f 100644 >>> --- a/newlib/libc/machine/aarch64/memchr.S >>> +++ b/newlib/libc/machine/aarch64/memchr.S >>> @@ -50,6 +50,8 @@ >>> */ >>> >>> ENTRY (memchr) >>> + PTR_ARG (0) >>> + SIZE_ARG (2) >>> /* Do not dereference srcin if no bytes to compare. */ >>> cbz cntin, L(zero_length) >>> /* >>> diff --git a/newlib/libc/machine/aarch64/memcmp.S >>> b/newlib/libc/machine/aarch64/memcmp.S >>> index 2a9c446bb..18874d321 100644 >>> --- a/newlib/libc/machine/aarch64/memcmp.S >>> +++ b/newlib/libc/machine/aarch64/memcmp.S >>> @@ -34,6 +34,10 @@ >>> >>> >>> ENTRY (memcmp) >>> + PTR_ARG (0) >>> + PTR_ARG (1) >>> + SIZE_ARG (2) >>> + >>> cmp limit, 16 >>> b.lo L(less16) >>> ldp data1, data3, [src1] >>> diff --git a/newlib/libc/machine/aarch64/memcpy.S >>> b/newlib/libc/machine/aarch64/memcpy.S >>> index 252d2452a..248e7843a 100644 >>> --- a/newlib/libc/machine/aarch64/memcpy.S >>> +++ b/newlib/libc/machine/aarch64/memcpy.S >>> @@ -58,6 +58,9 @@ >>> >>> ENTRY_ALIAS (memmove) >>> ENTRY (memcpy) >>> + PTR_ARG (0) >>> + PTR_ARG (1) >>> + SIZE_ARG (2) >>> add srcend, src, count >>> add dstend, dstin, count >>> cmp count, 128 >>> diff --git a/newlib/libc/machine/aarch64/memrchr.S >>> b/newlib/libc/machine/aarch64/memrchr.S >>> index 2525cf190..ba9915cc3 100644 >>> --- a/newlib/libc/machine/aarch64/memrchr.S >>> +++ b/newlib/libc/machine/aarch64/memrchr.S >>> @@ -45,6 +45,7 @@ >>> exactly which byte matched. */ >>> >>> ENTRY (memrchr) >>> + PTR_ARG (0) >>> add end, srcin, cntin >>> sub endm1, end, 1 >>> bic src, endm1, 15 >>> diff --git a/newlib/libc/machine/aarch64/memset.S >>> b/newlib/libc/machine/aarch64/memset.S >>> index 5bf4851f3..ca76439a9 100644 >>> --- a/newlib/libc/machine/aarch64/memset.S >>> +++ b/newlib/libc/machine/aarch64/memset.S >>> @@ -25,6 +25,9 @@ >>> #define zva_val x5 >>> >>> ENTRY (memset) >>> + PTR_ARG (0) >>> + SIZE_ARG (2) >>> + >>> dup v0.16B, valw >>> add dstend, dstin, count >>> >>> diff --git a/newlib/libc/machine/aarch64/strchr.S >>> b/newlib/libc/machine/aarch64/strchr.S >>> index a4e089b99..500d9aff2 100644 >>> --- a/newlib/libc/machine/aarch64/strchr.S >>> +++ b/newlib/libc/machine/aarch64/strchr.S >>> @@ -54,6 +54,7 @@ >>> /* Locals and temporaries. */ >>> >>> ENTRY (strchr) >>> + PTR_ARG (0) >>> /* Magic constant 0xc0300c03 to allow us to identify which lane >>> matches the requested byte. Even bits are set if the >>> character >>> matches, odd bits if either the char is NUL or matches. */ >>> diff --git a/newlib/libc/machine/aarch64/strchrnul.S >>> b/newlib/libc/machine/aarch64/strchrnul.S >>> index 4d6093be7..ceaf4dca1 100644 >>> --- a/newlib/libc/machine/aarch64/strchrnul.S >>> +++ b/newlib/libc/machine/aarch64/strchrnul.S >>> @@ -50,6 +50,7 @@ >>> /* Locals and temporaries. */ >>> >>> ENTRY (strchrnul) >>> + PTR_ARG (0) >>> /* Magic constant 0x40100401 to allow us to identify which lane >>> matches the termination condition. */ >>> mov wtmp2, #0x0401 >>> diff --git a/newlib/libc/machine/aarch64/strcmp.S >>> b/newlib/libc/machine/aarch64/strcmp.S >>> index 1d85da432..691a1760e 100644 >>> --- a/newlib/libc/machine/aarch64/strcmp.S >>> +++ b/newlib/libc/machine/aarch64/strcmp.S >>> @@ -54,6 +54,8 @@ >>> >>> >>> ENTRY (strcmp) >>> + PTR_ARG (0) >>> + PTR_ARG (1) >>> sub off2, src2, src1 >>> mov zeroones, REP8_01 >>> and tmp, src1, 7 >>> diff --git a/newlib/libc/machine/aarch64/strcpy.S >>> b/newlib/libc/machine/aarch64/strcpy.S >>> index 1f5f70792..57c46f390 100644 >>> --- a/newlib/libc/machine/aarch64/strcpy.S >>> +++ b/newlib/libc/machine/aarch64/strcpy.S >>> @@ -55,6 +55,8 @@ >>> exactly which byte matched. */ >>> >>> ENTRY (STRCPY) >>> + PTR_ARG (0) >>> + PTR_ARG (1) >>> bic src, srcin, 15 >>> ld1 {vdata.16b}, [src] >>> cmeq vhas_nul.16b, vdata.16b, 0 >>> diff --git a/newlib/libc/machine/aarch64/strlen.S >>> b/newlib/libc/machine/aarch64/strlen.S >>> index a3345a3ab..68a6f357c 100644 >>> --- a/newlib/libc/machine/aarch64/strlen.S >>> +++ b/newlib/libc/machine/aarch64/strlen.S >>> @@ -78,6 +78,7 @@ >>> character, return the length, if not, continue in the main loop. */ >>> >>> ENTRY (strlen) >>> + PTR_ARG (0) >>> and tmp1, srcin, MIN_PAGE_SIZE - 1 >>> cmp tmp1, MIN_PAGE_SIZE - 32 >>> b.hi L(page_cross) >>> diff --git a/newlib/libc/machine/aarch64/strncmp.S >>> b/newlib/libc/machine/aarch64/strncmp.S >>> index 6b1994ef5..373695503 100644 >>> --- a/newlib/libc/machine/aarch64/strncmp.S >>> +++ b/newlib/libc/machine/aarch64/strncmp.S >>> @@ -58,6 +58,9 @@ >>> #endif >>> >>> ENTRY (strncmp) >>> + PTR_ARG (0) >>> + PTR_ARG (1) >>> + SIZE_ARG (2) >>> cbz limit, L(ret0) >>> eor tmp1, src1, src2 >>> mov zeroones, #REP8_01 >>> diff --git a/newlib/libc/machine/aarch64/strnlen.S >>> b/newlib/libc/machine/aarch64/strnlen.S >>> index dc9fcb2fd..091002e0b 100644 >>> --- a/newlib/libc/machine/aarch64/strnlen.S >>> +++ b/newlib/libc/machine/aarch64/strnlen.S >>> @@ -39,6 +39,8 @@ >>> identifies the first zero byte. */ >>> >>> ENTRY (strnlen) >>> + PTR_ARG (0) >>> + SIZE_ARG (1) >>> bic src, srcin, 15 >>> cbz cntin, L(nomatch) >>> ld1 {vdata.16b}, [src] >>> diff --git a/newlib/libc/machine/aarch64/strrchr.S >>> b/newlib/libc/machine/aarch64/strrchr.S >>> index 67013e39d..b0574228b 100644 >>> --- a/newlib/libc/machine/aarch64/strrchr.S >>> +++ b/newlib/libc/machine/aarch64/strrchr.S >>> @@ -58,6 +58,7 @@ >>> identify exactly which byte is causing the termination, and why. */ >>> >>> ENTRY (strrchr) >>> + PTR_ARG (0) >>> /* Magic constant 0x40100401 to allow us to identify which lane >>> matches the requested byte. Magic constant 0x80200802 used >>> similarly for NUL termination. */ >>> -- >>> 2.50.1.vfs.0.0 >>> >>>
diff --git a/newlib/libc/machine/aarch64/asmdefs.h b/newlib/libc/machine/aarch64/asmdefs.h index 6c99fa704..2aaa459ee 100644 --- a/newlib/libc/machine/aarch64/asmdefs.h +++ b/newlib/libc/machine/aarch64/asmdefs.h @@ -30,18 +30,32 @@ #define FEATURE_1_PAC 2 /* Add a NT_GNU_PROPERTY_TYPE_0 note. */ +#ifdef __ILP32__ #define GNU_PROPERTY(type, value) \ - .section .note.gnu.property, "a" SEP \ - .p2align 3 SEP \ - .word 4 SEP \ - .word 16 SEP \ - .word 5 SEP \ - .asciz "GNU" SEP \ - .word type SEP \ - .word 4 SEP \ - .word value SEP \ - .word 0 SEP \ + .section .note.gnu.property, "a"; \ + .p2align 2; \ + .word 4; \ + .word 12; \ + .word 5; \ + .asciz "GNU"; \ + .word type; \ + .word 4; \ + .word value; \ .text +#else +#define GNU_PROPERTY(type, value) \ + .section .note.gnu.property, "a"; \ + .p2align 3; \ + .word 4; \ + .word 16; \ + .word 5; \ + .asciz "GNU"; \ + .word type; \ + .word 4; \ + .word value; \ + .word 0; \ + .text +#endif /* If set then the GNU Property Note section will be added to mark objects to support BTI and PAC-RET. */ @@ -88,4 +102,18 @@ GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI|FEATURE_1_PAC) #define L(l) .L ## l +#ifdef __ILP32__ + /* Sanitize padding bits of pointer arguments as per aapcs64 */ +#define PTR_ARG(n) mov w##n, w##n +#else +#define PTR_ARG(n) +#endif + +#ifdef __ILP32__ + /* Sanitize padding bits of size arguments as per aapcs64 */ +#define SIZE_ARG(n) mov w##n, w##n +#else +#define SIZE_ARG(n) +#endif + #endif diff --git a/newlib/libc/machine/aarch64/memchr.S b/newlib/libc/machine/aarch64/memchr.S index 074a004cf..a0f305e0f 100644 --- a/newlib/libc/machine/aarch64/memchr.S +++ b/newlib/libc/machine/aarch64/memchr.S @@ -50,6 +50,8 @@ */ ENTRY (memchr) + PTR_ARG (0) + SIZE_ARG (2) /* Do not dereference srcin if no bytes to compare. */ cbz cntin, L(zero_length) /* diff --git a/newlib/libc/machine/aarch64/memcmp.S b/newlib/libc/machine/aarch64/memcmp.S index 2a9c446bb..18874d321 100644 --- a/newlib/libc/machine/aarch64/memcmp.S +++ b/newlib/libc/machine/aarch64/memcmp.S @@ -34,6 +34,10 @@ ENTRY (memcmp) + PTR_ARG (0) + PTR_ARG (1) + SIZE_ARG (2) + cmp limit, 16 b.lo L(less16) ldp data1, data3, [src1] diff --git a/newlib/libc/machine/aarch64/memcpy.S b/newlib/libc/machine/aarch64/memcpy.S index 252d2452a..248e7843a 100644 --- a/newlib/libc/machine/aarch64/memcpy.S +++ b/newlib/libc/machine/aarch64/memcpy.S @@ -58,6 +58,9 @@ ENTRY_ALIAS (memmove) ENTRY (memcpy) + PTR_ARG (0) + PTR_ARG (1) + SIZE_ARG (2) add srcend, src, count add dstend, dstin, count cmp count, 128 diff --git a/newlib/libc/machine/aarch64/memrchr.S b/newlib/libc/machine/aarch64/memrchr.S index 2525cf190..ba9915cc3 100644 --- a/newlib/libc/machine/aarch64/memrchr.S +++ b/newlib/libc/machine/aarch64/memrchr.S @@ -45,6 +45,7 @@ exactly which byte matched. */ ENTRY (memrchr) + PTR_ARG (0) add end, srcin, cntin sub endm1, end, 1 bic src, endm1, 15 diff --git a/newlib/libc/machine/aarch64/memset.S b/newlib/libc/machine/aarch64/memset.S index 5bf4851f3..ca76439a9 100644 --- a/newlib/libc/machine/aarch64/memset.S +++ b/newlib/libc/machine/aarch64/memset.S @@ -25,6 +25,9 @@ #define zva_val x5 ENTRY (memset) + PTR_ARG (0) + SIZE_ARG (2) + dup v0.16B, valw add dstend, dstin, count diff --git a/newlib/libc/machine/aarch64/strchr.S b/newlib/libc/machine/aarch64/strchr.S index a4e089b99..500d9aff2 100644 --- a/newlib/libc/machine/aarch64/strchr.S +++ b/newlib/libc/machine/aarch64/strchr.S @@ -54,6 +54,7 @@ /* Locals and temporaries. */ ENTRY (strchr) + PTR_ARG (0) /* Magic constant 0xc0300c03 to allow us to identify which lane matches the requested byte. Even bits are set if the character matches, odd bits if either the char is NUL or matches. */ diff --git a/newlib/libc/machine/aarch64/strchrnul.S b/newlib/libc/machine/aarch64/strchrnul.S index 4d6093be7..ceaf4dca1 100644 --- a/newlib/libc/machine/aarch64/strchrnul.S +++ b/newlib/libc/machine/aarch64/strchrnul.S @@ -50,6 +50,7 @@ /* Locals and temporaries. */ ENTRY (strchrnul) + PTR_ARG (0) /* Magic constant 0x40100401 to allow us to identify which lane matches the termination condition. */ mov wtmp2, #0x0401 diff --git a/newlib/libc/machine/aarch64/strcmp.S b/newlib/libc/machine/aarch64/strcmp.S index 1d85da432..691a1760e 100644 --- a/newlib/libc/machine/aarch64/strcmp.S +++ b/newlib/libc/machine/aarch64/strcmp.S @@ -54,6 +54,8 @@ ENTRY (strcmp) + PTR_ARG (0) + PTR_ARG (1) sub off2, src2, src1 mov zeroones, REP8_01 and tmp, src1, 7 diff --git a/newlib/libc/machine/aarch64/strcpy.S b/newlib/libc/machine/aarch64/strcpy.S index 1f5f70792..57c46f390 100644 --- a/newlib/libc/machine/aarch64/strcpy.S +++ b/newlib/libc/machine/aarch64/strcpy.S @@ -55,6 +55,8 @@ exactly which byte matched. */ ENTRY (STRCPY) + PTR_ARG (0) + PTR_ARG (1) bic src, srcin, 15 ld1 {vdata.16b}, [src] cmeq vhas_nul.16b, vdata.16b, 0 diff --git a/newlib/libc/machine/aarch64/strlen.S b/newlib/libc/machine/aarch64/strlen.S index a3345a3ab..68a6f357c 100644 --- a/newlib/libc/machine/aarch64/strlen.S +++ b/newlib/libc/machine/aarch64/strlen.S @@ -78,6 +78,7 @@ character, return the length, if not, continue in the main loop. */ ENTRY (strlen) + PTR_ARG (0) and tmp1, srcin, MIN_PAGE_SIZE - 1 cmp tmp1, MIN_PAGE_SIZE - 32 b.hi L(page_cross) diff --git a/newlib/libc/machine/aarch64/strncmp.S b/newlib/libc/machine/aarch64/strncmp.S index 6b1994ef5..373695503 100644 --- a/newlib/libc/machine/aarch64/strncmp.S +++ b/newlib/libc/machine/aarch64/strncmp.S @@ -58,6 +58,9 @@ #endif ENTRY (strncmp) + PTR_ARG (0) + PTR_ARG (1) + SIZE_ARG (2) cbz limit, L(ret0) eor tmp1, src1, src2 mov zeroones, #REP8_01 diff --git a/newlib/libc/machine/aarch64/strnlen.S b/newlib/libc/machine/aarch64/strnlen.S index dc9fcb2fd..091002e0b 100644 --- a/newlib/libc/machine/aarch64/strnlen.S +++ b/newlib/libc/machine/aarch64/strnlen.S @@ -39,6 +39,8 @@ identifies the first zero byte. */ ENTRY (strnlen) + PTR_ARG (0) + SIZE_ARG (1) bic src, srcin, 15 cbz cntin, L(nomatch) ld1 {vdata.16b}, [src] diff --git a/newlib/libc/machine/aarch64/strrchr.S b/newlib/libc/machine/aarch64/strrchr.S index 67013e39d..b0574228b 100644 --- a/newlib/libc/machine/aarch64/strrchr.S +++ b/newlib/libc/machine/aarch64/strrchr.S @@ -58,6 +58,7 @@ identify exactly which byte is causing the termination, and why. */ ENTRY (strrchr) + PTR_ARG (0) /* Magic constant 0x40100401 to allow us to identify which lane matches the requested byte. Magic constant 0x80200802 used similarly for NUL termination. */