diff options
author | 2012-01-17 21:31:19 +0000 | |
---|---|---|
committer | 2012-01-17 21:31:19 +0000 | |
commit | bec961c0e40131e83f0a7d848075a8cd951c1c00 (patch) | |
tree | f0cde15bcac6f5b61662da98034af7faadcfe634 /sys/lib/libkern/arch/amd64 | |
parent | Fix trailing whitespace. (diff) | |
download | wireguard-openbsd-bec961c0e40131e83f0a7d848075a8cd951c1c00.tar.xz wireguard-openbsd-bec961c0e40131e83f0a7d848075a8cd951c1c00.zip |
Remove assembly version of strlen from i386 and amd64, where it's
up to 3 times slower than the C code most of the time. This was
brought up by DragonflyBSD guys initially.
ok deraadt, guenther. miod will not miss it.
Diffstat (limited to 'sys/lib/libkern/arch/amd64')
-rw-r--r-- | sys/lib/libkern/arch/amd64/strlen.S | 17 |
1 files changed, 0 insertions, 17 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 |