opnsense-src/lib/libc
Robert Clausecker 3a19fcb9fd lib/libc/amd64/string: add strncmp scalar, baseline implementation
The scalar implementation is fairly straightforward and merely unrolled
four times.  The baseline implementation closely follows D41971 with
appropriate extensions and extra code paths to pay attention to string
length.

Performance is quite good.  We beat both glibc (except for very long
strings, but they likely use AVX which we don't) and Bionic (except for
medium-sized aligned strings, where we are still in the same ballpark).

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/D42122

(cherry picked from commit 14289e973f5c941e4502cc2b11265e4b3072839a)
2024-01-24 20:39:25 +01:00
..
aarch64 libc: don't needlessly add vfork.o to NOASM 2024-01-02 16:58:54 +00:00
amd64 lib/libc/amd64/string: add strncmp scalar, baseline implementation 2024-01-24 20:39:25 +01:00
arm libc: rename arm and i386 Ovfork.S to vfork.S 2024-01-02 16:58:42 +00:00
capability libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
compat-43 libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
csu libc: Purge unneeded cdefs.h 2023-11-26 21:20:09 -07:00
db libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
gdtoa libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
gen Fix "version introduced" in numerous manual pages 2024-01-15 10:20:56 -05:00
gmon libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
i386 libc: rename arm and i386 Ovfork.S to vfork.S 2024-01-02 16:58:42 +00:00
iconv libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
include libc: Purge unneeded cdefs.h 2023-11-26 21:20:09 -07:00
inet libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
isc libc: Purge unneeded cdefs.h 2023-11-26 21:20:09 -07:00
locale libc: remove some obsolete VCS data 2023-12-13 23:08:50 +00:00
md Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
nameser libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
net resolv: Add a required include to resolv.h 2024-01-15 19:33:59 +09:00
nls libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
posix1e libc: correct some memory leaks in acl_to_text(3) and acl_to_text_np(3) 2023-12-20 10:29:55 +02:00
powerpc libc: centralize a few numeric symbols 2023-12-13 22:08:14 +00:00
powerpc64 libc: centralize a few numeric symbols 2023-12-13 22:08:14 +00:00
powerpcspe libc/<arch>/sys/Makefile.inc: remove cruft 2023-12-13 22:08:13 +00:00
quad libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
regex libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
resolv libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
riscv libc: don't needlessly add vfork.o to NOASM 2024-01-02 16:58:54 +00:00
rpc libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
secure libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
softfloat libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
stdio libc: remove some obsolete VCS data 2023-12-13 23:08:50 +00:00
stdlib strfmon.c: Use the restrict keyword directly 2023-12-16 06:17:51 +02:00
stdtime libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
string libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
sys sigfastblock.2: Fix a typo in the manual page 2024-01-23 07:43:27 +01:00
tests lib/libc/tests/string: add unit tests for strncmp(3) 2024-01-24 20:39:25 +01:00
uuid libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
x86 pkru.3: Fix a typo in the manual page 2024-01-23 07:43:42 +01:00
xdr libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
yp libc: Remove empty comments in Symbol.map 2023-12-13 22:08:13 +00:00
libc.ldscript Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
libc_nossp.ldscript Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
Makefile lib{c,lzma,z}: remove -DSYMBOL_VERSIONING from CFLAGS 2023-12-13 22:08:13 +00:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend.options Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Versions.def Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00