--- zzzz-none-000/linux-3.10.107/arch/x86/boot/string.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/x86/boot/string.c 2021-02-04 17:41:59.000000000 +0000 @@ -12,7 +12,16 @@ * Very basic string functions */ -#include "boot.h" +#include +#include "ctype.h" + +int memcmp(const void *s1, const void *s2, size_t len) +{ + u8 diff; + asm("repe; cmpsb; setnz %0" + : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len)); + return diff; +} int strcmp(const char *str1, const char *str2) { @@ -21,7 +30,7 @@ int delta = 0; while (*s1 || *s2) { - delta = *s2 - *s1; + delta = *s1 - *s2; if (delta) return delta; s1++;