[reland][libc] Switch to new implementation of mem* functions
authorGuillaume Chatelet <gchatelet@google.com>
Wed, 2 Nov 2022 09:03:58 +0000 (09:03 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Wed, 2 Nov 2022 09:09:46 +0000 (09:09 +0000)
commit67437dd0147e92fe601ef76d17dbbf171f638580
treecbeed6f9ba8a592f7816432fd31d2de00b1ce0ed
parent17c9d4dfeeb99795d2c176035eb06cd75d70dda6
[reland][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, 028414881381)

Reviewed By: courbet

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