From nobody Fri Jan 10 15:03:52 2025 X-Original-To: dev-commits-src-main@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 4YV4fx3wqDz5kTWN; Fri, 10 Jan 2025 15:03:53 +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 4YV4fw6TWLz4wqq; Fri, 10 Jan 2025 15:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736521432; 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=gQ+zqNQcQxtOgPlwVoyInds2yvlAqj19yIp0h+/W72c=; b=DYqGa9zyz/gWLqbBVdEKkvR1XDlGtFVcc9tWu2zEp7Sd2SSGKSIP/eL/qeSbrs31WSVCDD zt5uPZdWEGedGhFfFeDM55aSnzwK4L80cb3QTU5uYv1It5YzkHSFm0LJ7i8AmEPcNkVCHu Pmpm6oXoORgD+mHzF93+XOtiwbThRhY5ojpv0GvIG1qt5f5GoulXVj5drTmWDLiu41Xi5K nPdtHJzceKfb/GUJz3kvihxQei1whxxdcOQLEbySIbvNbyFUILJP6fNHERy4LPbmXdZ0Ct xXQB3GPKTd5BbiPLfXpFWoLpNF2ClCmx4Va+D43zOJKLtPLLUfBNXzjg7t6QAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736521432; 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=gQ+zqNQcQxtOgPlwVoyInds2yvlAqj19yIp0h+/W72c=; b=BxT/E4BpzOW8EuoRAroSJZUMNVJua2EGz0ChwqNxDeGbYVLQcpShVchQXQ3jtnZoWTvd7e USEfWvN12HfaSIlQID4QalqpY5iPUFU4EtoDNSLJ2Hvl2W4HRvZnjhGHdMk8O8NTyIoLBN vjP7uTc+CIqQipRLqYFcmqORh0iAM/NC/K0zUuf7gKYYN12mxddQWnk0y8DV2pnYTyLY1S w80inf2573pgeqh7l/zVv4tqatiFOA/PS8ZicrXo7gI1k3qZisExwJ2YsioV3DxOCIoDpr K1xSGkeIqfU1TM72bS1zaSzYfPuqlJzANkx0Jd+NxSXh6kSJUhHqklxVc+a7qg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736521432; a=rsa-sha256; cv=none; b=vSeNVMMUN99Kcq0TzyrKe+dDJvil8nuZZeuDQ5eaAOeiJxAQ6GUuMi3wyg7ZVNVSJhPdDe j7lOhvhAUHKiG7mg/qrbR+RFmfayMfJKt5p6SW1cg2BpQ0q+90jJd0crPoyIi7ufE0T9g0 zhylYm9hjFoHzGQ7VHWTEvj7oEtXNQYZPmJ81kVzsWRYUDDxKaolrDpw+0ozV6SGY2KXrz kUvrQ6TufGVqEd800YR4ZHs10NC+H5sCPtc1QEyAVjgzln5YXMi3d039C356Ms/QE7scv6 0f840r/wpdmV39v0f+wBl2JGv09niiD4hSsQTt2lezURH97QbY0amjBt0yc26A== 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 4YV4fw63MCz1XX; Fri, 10 Jan 2025 15:03:52 +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 50AF3q4f057107; Fri, 10 Jan 2025 15:03:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50AF3qP8057104; Fri, 10 Jan 2025 15:03:52 GMT (envelope-from git) Date: Fri, 10 Jan 2025 15:03:52 GMT Message-Id: <202501101503.50AF3qP8057104@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: 79287d783c72 - main - lib/libc/aarch64/string: strcat enable use of SIMD List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 79287d783c72f95eb47c26dbfdfca279086e16a9 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=79287d783c72f95eb47c26dbfdfca279086e16a9 commit 79287d783c72f95eb47c26dbfdfca279086e16a9 Author: Getz Mikalsen AuthorDate: 2024-08-26 18:14:15 +0000 Commit: Robert Clausecker CommitDate: 2025-01-10 15:02:40 +0000 lib/libc/aarch64/string: strcat enable use of SIMD Call into SIMD strlen and stpcpy for an optimized strcat. Port of D42600 for amd64. Tested by: fuz (exprun) Reviewed by: fuz, emaste Sponsored by: Google LLC (GSoC 2024) PR: 281175 Differential Revision: https://reviews.freebsd.org/D46417 --- lib/libc/aarch64/string/Makefile.inc | 3 ++- lib/libc/aarch64/string/strcat.c | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/lib/libc/aarch64/string/Makefile.inc b/lib/libc/aarch64/string/Makefile.inc index 996a2fd45bc0..0b2974947389 100644 --- a/lib/libc/aarch64/string/Makefile.inc +++ b/lib/libc/aarch64/string/Makefile.inc @@ -25,7 +25,8 @@ MDSRCS+= \ strspn.S \ strcspn.S \ strpbrk.c \ - strsep.c + strsep.c \ + strcat.c # # Add the above functions. Generate an asm file that includes the needed diff --git a/lib/libc/aarch64/string/strcat.c b/lib/libc/aarch64/string/strcat.c new file mode 100644 index 000000000000..c70875be1c1a --- /dev/null +++ b/lib/libc/aarch64/string/strcat.c @@ -0,0 +1,20 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Getz Mikalsen +*/ + +#include + +#undef strcat /* _FORTIFY_SOURCE */ + +char * +strcat(char * __restrict s, const char * __restrict append) +{ + char *save = s; + + /* call into SIMD optimized functions */ + stpcpy(s + strlen(s), append); + + return(save); +}