Kernel  |  3.4

下载     查看原文件
C++程序  |  12行  |  211 B
#include "misc.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;
}

#include "../string.c"