[libc-commits] [PATCH] D74397: [libc] Adding memcpy implementation for x86_64
Fangrui Song via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Feb 11 22:34:38 PST 2020
MaskRay added inline comments.
================
Comment at: libc/src/string/memcpy_x86_64.cpp:16
+static void CopyRepMovsb(char *dst, const char *src, size_t count) {
+ LIBC_INLINE_ASM("rep movsb" : "+c"(count), "+S"(src), "+D"(dst) : : "memory");
+}
----------------
`LIBC_INLINE_ASM` does not improve readability.
`asm volatile`
Any reason using constraint modifier `+`? It adds two operands, one input and one output. Just use `"D"(dst), "S"(src), "c"(count)`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74397/new/
https://reviews.llvm.org/D74397
More information about the libc-commits
mailing list