[libc] New version of the mem* framework
authorGuillaume Chatelet <gchatelet@google.com>
Fri, 14 Oct 2022 12:42:34 +0000 (12:42 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Fri, 14 Oct 2022 12:42:54 +0000 (12:42 +0000)
commit9721687835a7df5da0c9482cf684c11b8ba97f75
treec83ed6b14aec725071137fdd4bdb82cacaa595b8
parent5a859432f31716f780cd662741864ef1a77fc28a
[libc] New version of the mem* framework

This version is more composable and also simpler at the expense of being more explicit and more verbose. It also provides minimal implementations for ARM platforms.

Codegen can be checked here https://godbolt.org/z/x19zvE59v

Differential Revision: https://reviews.llvm.org/D135134
26 files changed:
libc/src/stdio/printf_core/string_writer.cpp
libc/src/string/bcmp.cpp
libc/src/string/memcmp.cpp
libc/src/string/memmove.cpp
libc/src/string/memory_utils/CMakeLists.txt
libc/src/string/memory_utils/README.md [new file with mode: 0644]
libc/src/string/memory_utils/bcmp_implementations.h
libc/src/string/memory_utils/elements.h [deleted file]
libc/src/string/memory_utils/elements_aarch64.h [deleted file]
libc/src/string/memory_utils/elements_x86.h [deleted file]
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_aarch64.h [new file with mode: 0644]
libc/src/string/memory_utils/op_builtin.h [new file with mode: 0644]
libc/src/string/memory_utils/op_generic.h [new file with mode: 0644]
libc/src/string/memory_utils/op_x86.h [new file with mode: 0644]
libc/src/string/memory_utils/utils.h
libc/src/string/memset.cpp
libc/test/src/string/bcmp_test.cpp
libc/test/src/string/memmove_test.cpp
libc/test/src/string/memory_utils/CMakeLists.txt
libc/test/src/string/memory_utils/elements_test.cpp [deleted file]
libc/test/src/string/memory_utils/memory_access_test.cpp [deleted file]
libc/test/src/string/memory_utils/utils_test.cpp
utils/bazel/llvm-project-overlay/libc/BUILD.bazel