| Message ID | GV4PR83MB0941E525894BB08010DE642A925EA@GV4PR83MB0941.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 97E65385841D for <patchwork@sourceware.org>; Thu, 24 Jul 2025 11:04:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97E65385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1753355093; bh=uB3b+K0VWl5o9nU6coRDvwMQoZt/enXg35DDJoRwToM=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=MFx8/4brBJNZx5LYHwpJgH98/vQq81ZfikG+IifKQqLeqxQM9U8MmbUeTgqf7OBEJ g+LaMfBCm/8XC7zYVnahNdsBD+X60V6oRWgt8bOX+J8qJvBSTbEh5to/MGyMT52s+g IHu7+3k66jG01tIrLUanfIaEXnd4ZHDdkRvy3ePQ= X-Original-To: newlib@sourceware.org Delivered-To: newlib@sourceware.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2119.outbound.protection.outlook.com [40.107.22.119]) by sourceware.org (Postfix) with ESMTPS id 75D2A3858D33 for <newlib@sourceware.org>; Thu, 24 Jul 2025 11:04:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 75D2A3858D33 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 75D2A3858D33 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1753355060; cv=pass; b=X32Q5ml7NL5+MklZePLmfsJ8z/LvM5n93jnKPa33lizki6i91+V8/VlQzRzJf779EnkBc6Znywu/Ws0D2chQ/ZXA211efw7rvrCVwFhquzyP8zVd90iEmzISBlVSFR4D3Uue6wQLBlWYnXo7FV79nGUGceutuHb+Gclp+ZC0Tjc= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1753355060; c=relaxed/simple; bh=5BcIwp4m0R+25fn8UWSQbF1bMm+ik8YpFpq5OyaRWCs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=eCIJi9NrMaAvbwM+UfyhkwFoWorAin2KvBcOkOLCRFkIcqUI1+xE2aQ/ySZaG/4Xq+RoQe9saB2tet5SUpxKzCx7Qu+Sb4i3DUW6qGCZLShX0Q7zKvzGasRHJQWA/N3CwEdhOIOLxoHyFR09yoyXNU3HEANzCTdDbbdl9J20DPY= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75D2A3858D33 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=p0d+1iSR3T5abNqO+iQyrPi6yKlFsHJmDU+vFkUIX+cQHUkgvwQxTH+JnDF8jCs9/8c28d2wDoJ8HgVMGI8Tc4fx0d77KXr9vqvK63RU6nyNslTGhdP3B9n7MS28kZTdjbjxTp+3I4KZESxV7op87cvDBsATPd0yAW22RUmKDmQeH7e4HIsrTvO/bxO3+0A0Ezk24NmeiB4ehZRLOotC3EMfPaRRl4zw8nWBt6rSvtUBXuIsUcGKeul52rgtNd+FiblOuXBYdb/mngyA4y7w+xlIT35Oqvt/ZmQSCnnhi0JrayCLRv3YjOzk/LDG9JFXoWX96sEwDJTtg8HHh0LXyA== 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=5w04X5saKA2OwSrXlq/aRLSMD5eBASYdVf50GhA8u0Y=; b=XM8osT47ukaWbI9NGcrsmxD3rZgsDynTnUsU+F+ZX3kMhZUsfI8MFETucTwjq8wUAyXVdqYDqJamV5yfRCaP7Kz9eEliGb6jN2RduTAdpCtanbkwVP9gJOhIcHUo9Dri+3KbtXXTCgwMBtf/HjdLeMIVhdUpNi6RH7Nc+/i2WE9L6IerBzA/8ycKCzFJo16j1EwejFCJCZ4mYVAfNnNIcbWcqHajJDHUB4/nICxvxisSrATlNoc/j8vzB4uN1eJJ7aig6YAuH5sEg4nKWERHdMfrP18+gjx98cbreyUDxEiQRoWaXW7EPIpqtTGRfAdl7Q2cxTM7ZBqWEWm1Zku1ZQ== 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 GV4PR83MB0941.EURPRD83.prod.outlook.com (2603:10a6:150:27e::22) by PA6PR83MB0645.EURPRD83.prod.outlook.com (2603:10a6:102:3d7::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8964.6; Thu, 24 Jul 2025 11:04:17 +0000 Received: from GV4PR83MB0941.EURPRD83.prod.outlook.com ([fe80::db38:300c:f561:a48a]) by GV4PR83MB0941.EURPRD83.prod.outlook.com ([fe80::db38:300c:f561:a48a%3]) with mapi id 15.20.8964.019; Thu, 24 Jul 2025 11:04:17 +0000 To: Newlib <newlib@sourceware.org> CC: "joel.sherrill@gmail.com" <joel.sherrill@gmail.com>, "Richard Earnshaw (lists)" <richard.earnshaw@arm.com> Subject: [PATCH] newlib: libc: return back support for AArch64 ILP32 Thread-Topic: [PATCH] newlib: libc: return back support for AArch64 ILP32 Thread-Index: AQHb/IplXSj5bFNEuUeGVEx6Li68Sg== Date: Thu, 24 Jul 2025 11:04:17 +0000 Message-ID: <GV4PR83MB0941E525894BB08010DE642A925EA@GV4PR83MB0941.EURPRD83.prod.outlook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes 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-24T11:04:16.281Z; 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: GV4PR83MB0941:EE_|PA6PR83MB0645:EE_ x-ms-office365-filtering-correlation-id: 035c7bf8-54e5-47d3-f51d-08ddcaa1d525 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|1800799024|376014|366016|4053099003|38070700018; x-microsoft-antispam-message-info: =?iso-8859-2?q?D56NiufTN3w+q9k/y6acR2IVrZ?= =?iso-8859-2?q?LnuH/G5pGpZr2mF/j6ITrIEtRF+Of3ROG/vFkJdWYlWx/a/GD+t/MbnyRfUe?= =?iso-8859-2?q?H70FjLlxAFAmgpKWQ91brUMkcKK/nBEpID7+yx0Cgzwenngj3Sw07MoEOzBa?= =?iso-8859-2?q?VXidTOKd8mFwDMCbkxkEZf9f3e8Xh0ubZhFRHtKuOVjfaatVlrUSRz37o0iI?= =?iso-8859-2?q?iCG3R86/DVxAOsu0s0QucPImiZyu+p4OPBUGoaK++nY5F4+GLyub5w2nZQIY?= =?iso-8859-2?q?R2JzogHGy55uv7h8V7TfV37yymU1MlK+/iYPiR+5QaS/r+OSiC4gEzb838W0?= =?iso-8859-2?q?quJeHQ0SATpAQNm8Ao/MnfslUW7uq1GSOlU7UmKATHzEGoem3IlrZgdKXo5U?= =?iso-8859-2?q?c8C2RwpzqTvivmU9kZnNgTet2pa/MFj/ZV0to2UEpeAbhZlmPxx5zJKy1fge?= =?iso-8859-2?q?OtV6iZT4WWhEhWWY8D13p5tBu1Vb8AQRtxh3Ql3UCY8Bwkq070upGOZEZjkf?= =?iso-8859-2?q?z+ixM0rYZtXgj0A0gjH/1+btO9Mc5sFXxm7fcXOJEwiZQKQNjhF1Ii2Iq288?= =?iso-8859-2?q?8/CgUYKjG7r0EBodM8qmDbpSkEr+3+rBDHDQ72sxLLw05eRc1EFM6AgP5fjD?= =?iso-8859-2?q?KG255SPkV2CqU1GudB3i8Tfuh1l1WZRsZDfr5eFLRKABllQWtutd01+R778R?= =?iso-8859-2?q?O7kjB2uTBES4xLHe5Gnu2+blmI6JsKZfz7p1CQ2Gptpfyng70wCKEjfIK5n+?= =?iso-8859-2?q?Dgx60CQT87AbNYTkMK7GoD9cVfRPiSXEuC/7DxX/iNt2kc8/Nf8xg75VAs10?= =?iso-8859-2?q?JRA6xiYPiNIWHLIR+r+HYRFMKEqrfAgtIq8QXUSgDkizvNkqYuQlvvXHPN+q?= =?iso-8859-2?q?f1TezVSDES6Te4g3L7Nb2EHcZ1jVMpdKMjAoulq4mISE5qjWdSzEylkFhV73?= =?iso-8859-2?q?BJf+BqrVONbF7ihjmZGuQLVxohypoaMoRDGvpOl/y8Maay7JLq57UzWGuHNu?= =?iso-8859-2?q?RJGDVU61RPgKZ8uh9w/zncUBmb/Q/ejS/90HvWff2FV21Gt696n7SRaR6sf9?= =?iso-8859-2?q?DNjNCq5Bz6ZmjIejcCbXN60J6gypKVF8cjq8Fmgxfcf0XJ8f4B5Thw7Hs4uP?= =?iso-8859-2?q?Y04OUj446GRbW3PJ55L20zGYFsdr0Loh5f92hbH9/T8D/u+iVQFnjePQovsK?= =?iso-8859-2?q?Mg99TOz9QgIMldTWmFGQWlGwbi9awqksvQ/jq2DNmmeFkee7PO8cEvlEB3Bt?= =?iso-8859-2?q?NPCCp0+XxpSMCVqUhXFNJXM6zUXvRDnyUw1B5/kyc9zk/TwDRFfiEGSUyXbB?= =?iso-8859-2?q?FChW61zOJb/i0PFzXp8NdC0EFvaW4V+mE+k9FgLGHQEN4uLc3HJOPiojiykq?= =?iso-8859-2?q?8KqCKlquIAgLqmjIxE6T7mS6Gd7RMi0ma199EmmCGaDUUYExhzdj5NhNT5Mh?= =?iso-8859-2?q?ja/2r88zB0Z53AZkxR2yIdYdEMP3yW5JfExXk4Y3AczrDQ4QvOKp+IQ6QRO6?= =?iso-8859-2?q?7lC/ErsYe6rhrIsYHZzMCA7Mri6dsh9IMZW33Zt1G4qv07x8A=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV4PR83MB0941.EURPRD83.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(4053099003)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-2?q?hdMGHt8EKYQscx/tzXtdLDZ?= =?iso-8859-2?q?oT6vdq4rydCW/02RzAgYhvH4p5hGi03P5QgnE5IgqnX0UBJ3ttrud+aI+6Yv?= =?iso-8859-2?q?OhF2L8TbYCLC0/toP/GHmpJFRHntgQEy33gZrkIiDZi2M83CP2D3SF7umjhK?= =?iso-8859-2?q?HiRzwzR5qsflHQ29gb398VsEl3KozL2l4p/5DCsD5UeCiVMHej6HE1H3e/AM?= =?iso-8859-2?q?1s5Yd8DcclPk+Wk8dDac/edPL03zALMZ0Z2MNxLYPY7UORbM7hbaoZuR0fZN?= =?iso-8859-2?q?IpbEiMHJzp9ml2Ja5vHYBfQ2G7xzpkhdPpoIAh+iYt6stQs7dSlavArSzeat?= =?iso-8859-2?q?vMjz4Ng1FiG8GF57Z6QoIBtTXdaAx5ngErFDjlXhIIPGeFmNaBkCfJZNENXJ?= =?iso-8859-2?q?G2OjEn/OpVrnr/GNWdtg3PHkrFuv78zZvmTYA9CGHPu/BAM3dziCIVNJ8Pj0?= =?iso-8859-2?q?98Kqhb1L/a8lU4hWlO2sfSZCZKtasJesagV6oMy0Cl+AjY6bgcCusojCBUCf?= =?iso-8859-2?q?g7eFc+/6POvZlFlsRPgQtjEWuqo5sOu96JbUGqiwR5LNyWhUn3JDfyajO88T?= =?iso-8859-2?q?J9idgr44lCqsr9iSATmFeSRAbzyRknd0c4Wz4PFPCzgrmuoP1x4G+LOmSVNx?= =?iso-8859-2?q?+tspctunjuynAoGCKBTCsSbD3EY2i1niYVUAmxGfnfnL5Exkg6FoK33intSJ?= =?iso-8859-2?q?5IOOj/Q85e19PIkqCheGXI2mblc6l1tdMwKZSJrvOzFbNt37CIKOh4rylEtn?= =?iso-8859-2?q?vuiTbYZ6kmjyll5/5kls3FB5Qao1eU7z149WsrkoNhxXjAojQS9XrS/4bAk1?= =?iso-8859-2?q?jqqHNC2No/76zdi/x3E5LNcA4PlFAUkB9FqZSzSp1ifmUxr84bd6OXGrknUy?= =?iso-8859-2?q?yKrb6mLLAwrxqV9nRac4xAbYu4Bw22rs/wdZLbTws2MK2njDlhH9jpEXx7S6?= =?iso-8859-2?q?1GArbWsFzWoE5IGVXMpZSTjOIaczFzsOaQjx2JEA2zc65T63cFCFuHhjShLb?= =?iso-8859-2?q?YrRRQIeq3WF/u3ZT76/g1INey/5fqaBgY/9dGQ2zeztrFBy4c8rdDJNDalaK?= =?iso-8859-2?q?bJxlU5aYyK6IVBgAhSFjp+hSi85FPDRIuTL6U3BOkvkiz0RnrBT7/mIcu0RB?= =?iso-8859-2?q?0rdSbXsLdeggV5Ly9VUWdopAHbFWkuv1q55u0FuCKalrk5yb3Xpsvk/56VBs?= =?iso-8859-2?q?7A3PPUyuxI/BhTPwVZEYNpvE73Y/Y96wwqc+obBTFoWJXDvQ55E++mZPR8GY?= =?iso-8859-2?q?8u5bYHF5YQjEMGqooMWPGT2pHwCuVqNaXlW8BlsjlsvsvLYs95rGqF07P2/7?= =?iso-8859-2?q?9gl60/G5vVNNNRwwQ+wXJSnRNbVbnJdQL8FZCf/LsfjyFGdUbfbU1NI9GcKV?= =?iso-8859-2?q?f2Q1vwOccWAOZcPYehP5R0G8gYOqo24JxAZiciSFav+rGQVwruyivVzdcBNx?= =?iso-8859-2?q?DUScWP9eqkRscvKxvA0zsvBlFHYDdcRl2EbtLtiLg5h3oad85AZAGmN+AWK6?= =?iso-8859-2?q?uNIBcdgItIdGIA3u5KeFcqm3Y/zIfbSkI1UiVT7bRJFfre46Xz2awQ+4ASdc?= =?iso-8859-2?q?Ampv91uI204a9?= Content-Type: multipart/mixed; boundary="_002_GV4PR83MB0941E525894BB08010DE642A925EAGV4PR83MB0941EURP_" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: GV4PR83MB0941.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 035c7bf8-54e5-47d3-f51d-08ddcaa1d525 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2025 11:04:17.0759 (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: Gnf+qoqYr+ShYmBw7l+0XKKDb6I8q8YQuZl7ftcOxPqp+yjWS4O2fw4xsnTF8Fk6lsWosbhlBl+ehCr1N601ZpYf6MIzsGpZgMikRq/Bc7E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA6PR83MB0645 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, 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 |
newlib: libc: return back support for AArch64 ILP32
|
|
Commit Message
Radek Barton
July 24, 2025, 11:04 a.m. UTC
Hello. As discussed at https://sourceware.org/pipermail/newlib/2025/022045.html, sending a patch reverting removal of AArch64 ILP32 ABI support. Radek --- From 0b67661adf790719d91f1ee8be3a737316dfc4d6 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] 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 | 14 ++++++++++++++ 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, 40 insertions(+)
Comments
Joel, can you please test? Thanks, Corinna On Jul 24 11:04, Radek Barton via Newlib wrote: > Hello. > > As discussed at https://sourceware.org/pipermail/newlib/2025/022045.html, sending a patch reverting removal of AArch64 ILP32 ABI support. > > Radek > > --- > >From 0b67661adf790719d91f1ee8be3a737316dfc4d6 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] 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 | 14 ++++++++++++++ > 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, 40 insertions(+) > > diff --git a/newlib/libc/machine/aarch64/asmdefs.h b/newlib/libc/machine/aarch64/asmdefs.h > index 6c99fa704..cf156a5a8 100644 > --- a/newlib/libc/machine/aarch64/asmdefs.h > +++ b/newlib/libc/machine/aarch64/asmdefs.h > @@ -88,4 +88,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 >
Yes. I will test. It may be tomorrow before results pop out. Also ip32 is still in GCC 15. It is not the usual --enable-obsolete as the nios2 requires in gcc 14. You needed to add -Wno-error=deprecated to the target CFLAGS. Different but works fine. Thanks. --joel On Thu, Jul 24, 2025 at 6:07 AM Corinna Vinschen <vinschen@redhat.com> wrote: > Joel, can you please test? > > > Thanks, > Corinna > > > On Jul 24 11:04, Radek Barton via Newlib wrote: > > Hello. > > > > As discussed at https://sourceware.org/pipermail/newlib/2025/022045.html, > sending a patch reverting removal of AArch64 ILP32 ABI support. > > > > Radek > > > > --- > > >From 0b67661adf790719d91f1ee8be3a737316dfc4d6 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] 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 | 14 ++++++++++++++ > > 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, 40 insertions(+) > > > > diff --git a/newlib/libc/machine/aarch64/asmdefs.h > b/newlib/libc/machine/aarch64/asmdefs.h > > index 6c99fa704..cf156a5a8 100644 > > --- a/newlib/libc/machine/aarch64/asmdefs.h > > +++ b/newlib/libc/machine/aarch64/asmdefs.h > > @@ -88,4 +88,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 > > > > >
This is not quite right. This warning appears a LOT -- >4000 times linking tests for one RTEMS BSP. /home/joel/rtems-work/tools/next-gcc15/bin/../lib/gcc/aarch64-rtems7/15.1.0/../../../../aarch64-rtems7/bin/ld: warning: /home/joel/rtems-work/tools/next-gcc15/bin/../lib/gcc/aarch64-rtems7/15.1.0/../../../../aarch64-rtems7/lib/ilp32/nooa/a53/fix835769/fix843419/libc.a(libc_a-memcmp.o): corrupt GNU_PROPERTY_TYPE (5) size: 0x10 The original patch had changes to the definition of GNU_PROPERTY() which are not reverted by your current patch. FWIW I am in the process of updating the RTEMS "next" tools to GCC 15 and tracking this issue as https://gitlab.rtems.org/rtems/tools/rtems-source-builder/-/issues/115. The RSB builds RTEMS tool chains from source and sometimes we attach patches to issues to make them available before they show up upstream. When this works out of the box from newlib git, I will close that issue and just change the recipe to use a hash with the fix. Anyway, I turned this around quicker than I thought so if you get another one, I can try it this afternoon. --joel --joel On Thu, Jul 24, 2025 at 9:41 AM Joel Sherrill <joel.sherrill@gmail.com> wrote: > Yes. I will test. It may be tomorrow before results pop out. > > Also ip32 is still in GCC 15. It is not the usual --enable-obsolete as the > nios2 > requires in gcc 14. You needed to add -Wno-error=deprecated to the > target > CFLAGS. Different but works fine. > > Thanks. > > --joel > > On Thu, Jul 24, 2025 at 6:07 AM Corinna Vinschen <vinschen@redhat.com> > wrote: > >> Joel, can you please test? >> >> >> Thanks, >> Corinna >> >> >> On Jul 24 11:04, Radek Barton via Newlib wrote: >> > Hello. >> > >> > As discussed at >> https://sourceware.org/pipermail/newlib/2025/022045.html, sending a >> patch reverting removal of AArch64 ILP32 ABI support. >> > >> > Radek >> > >> > --- >> > >From 0b67661adf790719d91f1ee8be3a737316dfc4d6 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] 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 | 14 ++++++++++++++ >> > 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, 40 insertions(+) >> > >> > diff --git a/newlib/libc/machine/aarch64/asmdefs.h >> b/newlib/libc/machine/aarch64/asmdefs.h >> > index 6c99fa704..cf156a5a8 100644 >> > --- a/newlib/libc/machine/aarch64/asmdefs.h >> > +++ b/newlib/libc/machine/aarch64/asmdefs.h >> > @@ -88,4 +88,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..cf156a5a8 100644 --- a/newlib/libc/machine/aarch64/asmdefs.h +++ b/newlib/libc/machine/aarch64/asmdefs.h @@ -88,4 +88,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. */