diff options
Diffstat (limited to 'sys/lib/libkern/arch')
-rw-r--r-- | sys/lib/libkern/arch/amd64/strlen.S | 17 | ||||
-rw-r--r-- | sys/lib/libkern/arch/i386/strlen.S | 21 |
2 files changed, 0 insertions, 38 deletions
diff --git a/sys/lib/libkern/arch/amd64/strlen.S b/sys/lib/libkern/arch/amd64/strlen.S deleted file mode 100644 index e4d20696d8e..00000000000 --- a/sys/lib/libkern/arch/amd64/strlen.S +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Written by J.T. Conklin <jtc@netbsd.org>. - * Public domain. - * Adapted for NetBSD/x86_64 by Frank van der Linden <fvdl@wasabisystems.com> - */ - -#include <machine/asm.h> - -ENTRY(strlen) - cld /* set search forward */ - xorl %eax,%eax /* set search for null terminator */ - movq $-1,%rcx /* set search for lots of characters */ - repne /* search! */ - scasb - notq %rcx /* get length by taking complement */ - leaq -1(%rcx),%rax /* and subtracting one */ - ret diff --git a/sys/lib/libkern/arch/i386/strlen.S b/sys/lib/libkern/arch/i386/strlen.S deleted file mode 100644 index 9d668c8ec12..00000000000 --- a/sys/lib/libkern/arch/i386/strlen.S +++ /dev/null @@ -1,21 +0,0 @@ -/* $OpenBSD: strlen.S,v 1.2 1996/09/27 06:47:51 mickey Exp $ */ - -/* - * Written by J.T. Conklin <jtc@netbsd.org>. - * Public domain. - */ - -#include <machine/asm.h> - -ENTRY(strlen) - pushl %edi - movl 8(%esp),%edi /* string address */ - cld /* set search forward */ - xorl %eax,%eax /* set search for null terminator */ - movl $-1,%ecx /* set search for lots of characters */ - repne /* search! */ - scasb - notl %ecx /* get length by taking complement */ - leal -1(%ecx),%eax /* and subtracting one */ - popl %edi - ret |