opnsense-src/lib/libc/aarch64/string/strcat.c
Getz Mikalsen 79287d783c 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
2025-01-10 16:02:40 +01:00

20 lines
344 B
C

/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2024 Getz Mikalsen <getz@FreeBSD.org>
*/
#include <string.h>
#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);
}