aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/amd64/string/Makefile.inc
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2023-10-30 03:15:46 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2023-12-25 13:55:42 +0000
commit90253d49db09a9b1490c448d05314f3e4bbfa468 (patch)
treecea888fc40f4aca09bfa683f480ea6344ea3e4fa /lib/libc/amd64/string/Makefile.inc
parent6fa9e7d8737548ef93c573387ce62402c368d486 (diff)
lib/libc/amd64/string: add stpncpy scalar, baseline implementation
This was surprisingly annoying to get right, despite being such a simple function. A scalar implementation is also provided, it just calls into our optimised memchr(), memcpy(), and memset() routines to carry out its job. I'm quite happy with the performance. glibc only beats us for very long strings, likely due to the use of AVX-512. The scalar implementation just calls into our optimised memchr(), memcpy(), and memset() routines, so it has a high overhead to begin with but then performs ok for the amount of effort that went into it. Still beats the old C code, except for very short strings. Sponsored by: The FreeBSD Foundation Tested by: developers@, exp-run Approved by: mjg MFC after: 1 month MFC to: stable/14 PR: 275785 Differential Revision: https://reviews.freebsd.org/D42519
Diffstat (limited to 'lib/libc/amd64/string/Makefile.inc')
-rw-r--r--lib/libc/amd64/string/Makefile.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/amd64/string/Makefile.inc b/lib/libc/amd64/string/Makefile.inc
index ee396f98eccc..cc8b0e825e3e 100644
--- a/lib/libc/amd64/string/Makefile.inc
+++ b/lib/libc/amd64/string/Makefile.inc
@@ -7,6 +7,7 @@ MDSRCS+= \
memmove.S \
memset.S \
stpcpy.S \
+ stpncpy.S \
strcat.S \
strchrnul.S \
strcmp.S \