From nobody Fri Jan 10 15:04:01 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YV4g62cSKz5kTTt; Fri, 10 Jan 2025 15:04:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YV4g60q31z4wy1; Fri, 10 Jan 2025 15:04:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736521442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jaTV/88/eHdxliRuONA3EfyOHL8w+2xPqqVZcKlRWcY=; b=I3B2wFoVnv781/iEMPpgpm/uaeZHbXR0f/UwZV+UR5epG4RS6KN0PJ4cb9fZK8E6iu4VvB UPG6WCU/v5Y054rFM+fu5WQEsYm+AOQbagXCz1RKya0ZbsHqNzPg5YqhZrPzMYc0Hke27M JwsczKTSof2gMjUwUVp6qBQiOrGpvy/NjufxIwTFQq92Qokpb+YLUSvZxDLXhAxt9c2poH 4/+HIM5au4mklVquxkkOgQmVTob+ve+so2cDFhbvJblcJPZ9V76W6NuuOh+But8r233eAg 57VM8tjBHxsQ7+0evaXXpW/SImYRxla0VsMWieMHLSUXhpLriN9xrsmndjq77Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736521442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jaTV/88/eHdxliRuONA3EfyOHL8w+2xPqqVZcKlRWcY=; b=mAWt/K6mECEQS5BqMpXw7/oWfrLRQQYYzxNMVBoyE1AlLLEvglAARxh2Fzr27BuHGrh7Ml rLziXT+qzJaaoJxg3TnlvYNo9TgZ7LX4Lv/Uov+0fASnsjec3bMJxaynRAhXwRYtrUezTL Hjp+zyTjWGD1TlNvgLCuM42TJ2hFXXZ6tGsj34D12nDfMSoSu5DtGJsIZCDp+sZ4lQq6su XsW9MUmjWA/2P4IYVYcoOSYiUwyV/NyPZZV+IX3+qHIzl9VzT96zbH8R0fWrG13SGgnNL3 beL/xmeH/ka6gkM2Ry9kLDdnRe0wHW/83pW5ItBbTi+/githL5dpcGS4VoI9zQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736521442; a=rsa-sha256; cv=none; b=Ue7XKUj2OBnbpYf54W+KOOGXiM4eQ7JXOIrPUNamPRQHToMSS7Pm1qZO4aHwjTDMLR/FBY FX14XZ3fD//9IlAwDbgsrDpH9BBayeAbeozuGzuQ1Pr4ljl0SKqXdTwxHiR2WN2HD3AoL4 YoM4LVsz+VE3+jwLhYHQ6MVpMRKXJ2vrYoDGXp2oc1AgZJkf0TwlZuMk8LTxP6ppXRg0Ap wYCAmA5SdqlAvmM83vdz7PlUahtsCAkSuIE/O5lAcq3W9hlzsJwYJn31QHJYtZfIJPo43r skt6z68j1DgdZb4lHxCA+hqs9RSfHKURM59iX9GZI5L6oxbDNrBl9yQXAxhLFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YV4g60CCCz2TQ; Fri, 10 Jan 2025 15:04:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50AF41ie057459; Fri, 10 Jan 2025 15:04:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50AF41GA057456; Fri, 10 Jan 2025 15:04:01 GMT (envelope-from git) Date: Fri, 10 Jan 2025 15:04:01 GMT Message-Id: <202501101504.50AF41GA057456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 79e01e7e643c - main - lib/libc/aarch64/string: add bcopy & bzero wrapper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 79e01e7e643c9337d8d6046b6db7df674475a099 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=79e01e7e643c9337d8d6046b6db7df674475a099 commit 79e01e7e643c9337d8d6046b6db7df674475a099 Author: Getz Mikalsen AuthorDate: 2024-08-28 13:13:45 +0000 Commit: Robert Clausecker CommitDate: 2025-01-10 15:02:40 +0000 lib/libc/aarch64/string: add bcopy & bzero wrapper This patch enabled usage of SIMD enhanced functions to implement bcopy and bzero. Tested by: fuz (exprun) Reviewed by: fuz, emaste Sponsored by: Google LLC (GSoC 2024) PR: 281175 Differential Revision: https://reviews.freebsd.org/D46459 --- lib/libc/aarch64/string/Makefile.inc | 4 +++- lib/libc/aarch64/string/bcopy.c | 14 ++++++++++++++ lib/libc/aarch64/string/bzero.c | 14 ++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/lib/libc/aarch64/string/Makefile.inc b/lib/libc/aarch64/string/Makefile.inc index 7325b54d9716..752cc6d9900b 100644 --- a/lib/libc/aarch64/string/Makefile.inc +++ b/lib/libc/aarch64/string/Makefile.inc @@ -30,7 +30,9 @@ MDSRCS+= \ memccpy.S \ strncat.c \ strlcat.c \ - strlen.S + strlen.S \ + bcopy.c \ + bzero.c # # Add the above functions. Generate an asm file that includes the needed diff --git a/lib/libc/aarch64/string/bcopy.c b/lib/libc/aarch64/string/bcopy.c new file mode 100644 index 000000000000..0dee529fb9df --- /dev/null +++ b/lib/libc/aarch64/string/bcopy.c @@ -0,0 +1,14 @@ +/*- + * Public domain. + */ + +#include + +#undef bcopy /* _FORTIFY_SOURCE */ + +void +bcopy(const void *src, void *dst, size_t len) +{ + + memmove(dst, src, len); +} diff --git a/lib/libc/aarch64/string/bzero.c b/lib/libc/aarch64/string/bzero.c new file mode 100644 index 000000000000..d82f3061865b --- /dev/null +++ b/lib/libc/aarch64/string/bzero.c @@ -0,0 +1,14 @@ +/*- + * Public domain. + */ + +#include + +#undef bzero /* _FORTIFY_SOURCE */ + +void +bzero(void *b, size_t len) +{ + + memset(b, 0, len); +}