diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 04:29:00 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-09 04:29:00 -0500 |
| commit | 9caafa6c8686e319cf4d5f3757b3972c6c522b7c (patch) | |
| tree | b38979b835b5d22e681b175d0b98a3c7560d9c59 /include/asm-mips/string.h | |
| parent | 51e9f2ff83df6b1c81c5c44f4486c68ed87aa20e (diff) | |
| parent | cac0e8e8bb2e7a086643bdd00c41d900a79bb4fa (diff) | |
Merge branch 'upstream-fixes'
Diffstat (limited to 'include/asm-mips/string.h')
| -rw-r--r-- | include/asm-mips/string.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/include/asm-mips/string.h b/include/asm-mips/string.h index 5a06f6d13899..907da600fddd 100644 --- a/include/asm-mips/string.h +++ b/include/asm-mips/string.h | |||
| @@ -141,26 +141,4 @@ extern void *memcpy(void *__to, __const__ void *__from, size_t __n); | |||
| 141 | #define __HAVE_ARCH_MEMMOVE | 141 | #define __HAVE_ARCH_MEMMOVE |
| 142 | extern void *memmove(void *__dest, __const__ void *__src, size_t __n); | 142 | extern void *memmove(void *__dest, __const__ void *__src, size_t __n); |
| 143 | 143 | ||
| 144 | #ifdef CONFIG_32BIT | ||
| 145 | #define __HAVE_ARCH_MEMSCAN | ||
| 146 | static __inline__ void *memscan(void *__addr, int __c, size_t __size) | ||
| 147 | { | ||
| 148 | char *__end = (char *)__addr + __size; | ||
| 149 | unsigned char __uc = (unsigned char) __c; | ||
| 150 | |||
| 151 | __asm__(".set\tpush\n\t" | ||
| 152 | ".set\tnoat\n\t" | ||
| 153 | ".set\treorder\n\t" | ||
| 154 | "1:\tbeq\t%0,%1,2f\n\t" | ||
| 155 | "addiu\t%0,1\n\t" | ||
| 156 | "lbu\t$1,-1(%0)\n\t" | ||
| 157 | "bne\t$1,%z4,1b\n" | ||
| 158 | "2:\t.set\tpop" | ||
| 159 | : "=r" (__addr), "=r" (__end) | ||
| 160 | : "0" (__addr), "1" (__end), "Jr" (__uc)); | ||
| 161 | |||
| 162 | return __addr; | ||
| 163 | } | ||
| 164 | #endif /* CONFIG_32BIT */ | ||
| 165 | |||
| 166 | #endif /* _ASM_STRING_H */ | 144 | #endif /* _ASM_STRING_H */ |
