1 // SPDX-License-Identifier: GPL-2.0-only
5 * Override the "basic" built-in string helpers so that they can be used in
6 * guest code. KVM selftests don't support dynamic loading in guest code and
7 * will jump into the weeds if the compiler decides to insert an out-of-line
10 int memcmp(const void *cs, const void *ct, size_t count)
12 const unsigned char *su1, *su2;
15 for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) {
16 if ((res = *su1 - *su2) != 0)
22 void *memcpy(void *dest, const void *src, size_t count)
32 void *memset(void *s, int c, size_t count)