[libc] Switch to new implementation of mem* functions
authorGuillaume Chatelet <gchatelet@google.com>
Mon, 24 Oct 2022 13:10:53 +0000 (13:10 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Tue, 25 Oct 2022 10:49:34 +0000 (10:49 +0000)
commit02841488138160f9064f334a833d4bf3e80385c6
tree45278b1d7a4550173c470cff14b34392a5264170
parent791fe26d758173e569d26d831b36ee8527e1a766
[libc] Switch to new implementation of mem* functions

The new framework makes it explicit which processor feature is being
used and allows for easier per platform customization:
 - ARM cpu now uses trivial implementations to reduce code size.
 - Memcmp, Bcmp and Memmove have been optimized for x86
 - Bcmp has been optimized for aarch64.

This is a reland of https://reviews.llvm.org/D135134 (b3f1d58)

Differential Revision: https://reviews.llvm.org/D136595
13 files changed:
libc/src/stdio/printf_core/string_writer.cpp
libc/src/string/bcmp.cpp
libc/src/string/memcmp.cpp
libc/src/string/memcpy.cpp
libc/src/string/memmove.cpp
libc/src/string/memory_utils/bcmp_implementations.h
libc/src/string/memory_utils/bzero_implementations.h
libc/src/string/memory_utils/memcmp_implementations.h
libc/src/string/memory_utils/memcpy_implementations.h
libc/src/string/memory_utils/memset_implementations.h
libc/src/string/memory_utils/op_x86.h
libc/src/string/mempcpy.cpp
libc/src/string/memset.cpp