diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-06-06 15:17:08 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-06-06 15:17:08 +0000 |
commit | dc632dd8afc596ce816945369ff6793b2fafa171 (patch) | |
tree | 14afb37e743fb9b24195bbbc2a535b832809a251 /xen/include/asm-x86/string.h | |
parent | 0ecaac059db50e2fe79dcb71a6ce255cb69742ba (diff) | |
download | xen-dc632dd8afc596ce816945369ff6793b2fafa171.tar.gz xen-dc632dd8afc596ce816945369ff6793b2fafa171.tar.bz2 xen-dc632dd8afc596ce816945369ff6793b2fafa171.zip |
bitkeeper revision 1.1684 (42a468f4PvUu-iWAyhHxfE-JnhHVYw)
Remove strrchr/strnlen/memscan from x86-specific string.h. They are not
used so not worth optimising (strnlen is used only in vsprintf which is
not performance critical).
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/asm-x86/string.h')
-rw-r--r-- | xen/include/asm-x86/string.h | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/xen/include/asm-x86/string.h b/xen/include/asm-x86/string.h index 6ab83cf53d..83d1fbb583 100644 --- a/xen/include/asm-x86/string.h +++ b/xen/include/asm-x86/string.h @@ -136,23 +136,6 @@ static inline char *strchr(const char *s, int c) return __res; } -#define __HAVE_ARCH_STRRCHR -static inline char *strrchr(const char *s, int c) -{ - long d0, d1; - register char *__res; - __asm__ __volatile__ ( - " mov %%al,%%ah \n" - "1: lodsb \n" - " cmp %%ah,%%al \n" - " jne 2f \n" - " lea -1(%1),%0 \n" - "2: test %%al,%%al \n" - " jne 1b \n" - : "=g" (__res), "=&S" (d0), "=&a" (d1) : "0" (0), "1" (s), "2" (c) ); - return __res; -} - #define __HAVE_ARCH_STRLEN static inline size_t strlen(const char *s) { @@ -321,24 +304,6 @@ static inline void *__constant_c_memset(void *s, unsigned long c, size_t count) return s; } -#define __HAVE_ARCH_STRNLEN -static inline size_t strnlen(const char *s, size_t count) -{ - long d0; - register int __res; - __asm__ __volatile__ ( - " jmp 2f \n" - "1: cmpb $0,(%3) \n" - " je 3f \n" - " inc %3 \n" - "2: dec %1 \n" - " jns 1b \n" - "3: subl %2,%0 \n" - : "=a" (__res), "=&d" (d0) - : "c" ((int)(long)s), "0" (s), "1" (count) ); - return __res; -} - /* * This looks horribly ugly, but the compiler can optimize it totally, * as we by now know that both pattern and count is constant.. @@ -427,19 +392,4 @@ static always_inline void *__constant_c_and_count_memset( __constant_c_x_memset((s),(MEMSET_PATTERN_MUL*(unsigned char)(c)),(count)) : \ __var_x_memset((s),(c),(count))) -#define __HAVE_ARCH_MEMSCAN -static inline void *memscan(void *addr, int c, size_t size) -{ - if ( size == 0 ) - return addr; - __asm__ ( - " repnz; scasb \n" - " jnz 1f \n" - " dec %0 \n" - "1: \n" - : "=D" (addr), "=c" (size) - : "0" (addr), "1" (size), "a" (c) ); - return addr; -} - #endif /* __X86_STRING_H__ */ |