repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
can't get_block(NO_DEV) any more
[minix.git]
/
common
/
lib
/
libc
/
arch
/
x86_64
/
string
/
bcmp.S
blob
03671a8e8e284a22749ded48ab1e3b49249ef05e
1
#include <machine/asm.h>
2
3
#if defined(LIBC_SCCS)
4
RCSID("$NetBSD: bcmp.S,v 1.2 2007/11/12 18:41:59 ad Exp $")
5
#endif
6
7
ENTRY(bcmp)
8
xorl %eax,%eax /* clear return value */
9
10
movq %rdx,%rcx /* compare by words */
11
shrq $3,%rcx
12
repe
13
cmpsq
14
jne L1
15
16
movq %rdx,%rcx /* compare remainder by bytes */
17
andq $7,%rcx
18
repe
19
cmpsb
20
je L2
21
22
L1: incl %eax
23
L2: ret