diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:13 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:13 -0800 |
commit | 1767f908af327fa388b1c66883760ad851267013 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /libc/arch-x86/string/memchr.S | |
parent | a799b53f10e5a6fd51fef4436cfb7ec99836a516 (diff) | |
download | bionic-1767f908af327fa388b1c66883760ad851267013.zip bionic-1767f908af327fa388b1c66883760ad851267013.tar.gz bionic-1767f908af327fa388b1c66883760ad851267013.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'libc/arch-x86/string/memchr.S')
-rw-r--r-- | libc/arch-x86/string/memchr.S | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/libc/arch-x86/string/memchr.S b/libc/arch-x86/string/memchr.S deleted file mode 100644 index d6bcbe6..0000000 --- a/libc/arch-x86/string/memchr.S +++ /dev/null @@ -1,26 +0,0 @@ -/* $OpenBSD: memchr.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */ -/* - * Written by J.T. Conklin <jtc@netbsd.org>. - * Public domain. - */ - -#include <machine/asm.h> - -ENTRY(memchr) - pushl %edi - movl 8(%esp),%edi /* string address */ - movl 12(%esp),%eax /* set character to search for */ - movl 16(%esp),%ecx /* set length of search */ - testl %ecx,%ecx /* test for len == 0 */ - jz L1 - cld /* set search forward */ - repne /* search! */ - scasb - jne L1 /* scan failed, return null */ - leal -1(%edi),%eax /* adjust result of scan */ - popl %edi - ret - .align 2,0x90 -L1: xorl %eax,%eax - popl %edi - ret |