can't get_block(NO_DEV) any more
[minix.git] / common / lib / libc / arch / x86_64 / string / bcmp.S
blob03671a8e8e284a22749ded48ab1e3b49249ef05e
1 #include <machine/asm.h>
3 #if defined(LIBC_SCCS)
4         RCSID("$NetBSD: bcmp.S,v 1.2 2007/11/12 18:41:59 ad Exp $")
5 #endif
7 ENTRY(bcmp)
8         xorl    %eax,%eax               /* clear return value */
10         movq    %rdx,%rcx               /* compare by words */
11         shrq    $3,%rcx
12         repe
13         cmpsq
14         jne     L1
16         movq    %rdx,%rcx               /* compare remainder by bytes */
17         andq    $7,%rcx
18         repe
19         cmpsb
20         je      L2
22 L1:     incl    %eax
23 L2:     ret