opnsense-src/lib/libc/amd64/string
Robert Clausecker 8803f01e93 lib/libc/amd64/string/memcmp.S: add baseline implementation
This changeset adds a baseline implementation of memcmp and bcmp
for amd64. The same code is used for both functions with conditional
code were the behaviour differs (we need more precise output for the
memcmp case).

FreeBSD documents that memcmp returns the difference between the
mismatching characters. Slightly faster code would be possible could
we relax this requirement to the ISO/IEC 9899:1999 requirement of
merely returning a negative/positive integer or zero.

Performance is better than bionic and glibc, except for long strings
were the two are 13% faster. This could be because they use SSE4
ptest which we cannot use in a baseline kernel.

Sponsored by:	The FreeBSD Foundation
Approved by:	mjg
Differential Revision:	https://reviews.freebsd.org/D41442
2023-08-21 21:19:46 +02:00
..
amd64_archlevel.c lib/libc/amd64: add archlevel-based simd dispatch framework 2023-08-04 01:53:43 +03:00
bcmp.S amd64: bring back asm bcmp, shared with memcmp 2022-03-26 09:10:03 +00:00
bcopy.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
bzero.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
Makefile.inc lib/libc/amd64/string/stpcpy.S: add baseline implementation 2023-08-21 20:59:38 +02:00
memcmp.S lib/libc/amd64/string/memcmp.S: add baseline implementation 2023-08-21 21:19:46 +02:00
memcpy.S Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
memmove.S Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
memset.S Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
stpcpy.S lib/libc/amd64/string/stpcpy.S: add baseline implementation 2023-08-21 20:59:38 +02:00
strcat.S Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
strchrnul.S lib/libc/amd64/string/strchrnul.S: fix wrong indentation 2023-08-07 14:03:28 +02:00
strcmp.S Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
strcpy.c Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00
strlen.S Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:42 -06:00