[libc-commits] [libc] [libc][c23] add memset_explicit (PR #83577)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Wed Mar 6 09:03:46 PST 2024
================
@@ -36,8 +36,16 @@
namespace LIBC_NAMESPACE {
+template <bool OPAQUE_VALUE = false>
LIBC_INLINE static void inline_memset(void *dst, uint8_t value, size_t count) {
+#if LIBC_TARGET_ARCH_IS_AARCH64
+ // The AArch64 implementation has an additional template parameter. It
+ // may uses dc zva to zero memory.
+ LIBC_SRC_STRING_MEMORY_UTILS_MEMSET<OPAQUE_VALUE>(reinterpret_cast<Ptr>(dst),
+ value, count);
+#else
LIBC_SRC_STRING_MEMORY_UTILS_MEMSET(reinterpret_cast<Ptr>(dst), value, count);
+#endif
----------------
nickdesaulniers wrote:
remove this hunk
https://github.com/llvm/llvm-project/pull/83577
More information about the libc-commits
mailing list