mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
lib/libc/aarch64/string: add bcopy & bzero wrapper
This patch enabled usage of SIMD enhanced functions to implement bcopy and bzero. Tested by: fuz (exprun) Reviewed by: fuz, emaste Sponsored by: Google LLC (GSoC 2024) PR: 281175 Differential Revision: https://reviews.freebsd.org/D46459
This commit is contained in:
parent
3863fec1ce
commit
79e01e7e64
3 changed files with 31 additions and 1 deletions
|
|
@ -30,7 +30,9 @@ MDSRCS+= \
|
|||
memccpy.S \
|
||||
strncat.c \
|
||||
strlcat.c \
|
||||
strlen.S
|
||||
strlen.S \
|
||||
bcopy.c \
|
||||
bzero.c
|
||||
|
||||
#
|
||||
# Add the above functions. Generate an asm file that includes the needed
|
||||
|
|
|
|||
14
lib/libc/aarch64/string/bcopy.c
Normal file
14
lib/libc/aarch64/string/bcopy.c
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/*-
|
||||
* Public domain.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#undef bcopy /* _FORTIFY_SOURCE */
|
||||
|
||||
void
|
||||
bcopy(const void *src, void *dst, size_t len)
|
||||
{
|
||||
|
||||
memmove(dst, src, len);
|
||||
}
|
||||
14
lib/libc/aarch64/string/bzero.c
Normal file
14
lib/libc/aarch64/string/bzero.c
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/*-
|
||||
* Public domain.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#undef bzero /* _FORTIFY_SOURCE */
|
||||
|
||||
void
|
||||
bzero(void *b, size_t len)
|
||||
{
|
||||
|
||||
memset(b, 0, len);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue