Annotation of sys/lib/libkern/arch/amd64/bcmp.S, Revision 1.1
1.1 ! nbrk 1: #include <machine/asm.h>
! 2:
! 3: #if defined(LIBC_SCCS)
! 4: RCSID("$NetBSD: bcmp.S,v 1.1 2001/06/19 00:22:45 fvdl Exp $")
! 5: #endif
! 6:
! 7: ENTRY(bcmp)
! 8: xorl %eax,%eax /* clear return value */
! 9: cld /* set compare direction forward */
! 10:
! 11: movq %rdx,%rcx /* compare by words */
! 12: shrq $3,%rcx
! 13: repe
! 14: cmpsq
! 15: jne L1
! 16:
! 17: movq %rdx,%rcx /* compare remainder by bytes */
! 18: andq $7,%rcx
! 19: repe
! 20: cmpsb
! 21: je L2
! 22:
! 23: L1: incl %eax
! 24: L2: ret
CVSweb