diff options
author | zhichang.yuan <zhichang.yuan@linaro.org> | 2014-04-28 13:11:33 +0800 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2014-05-23 15:16:59 +0100 |
commit | 192c4d902f19b66902d7aacc19e9b169bebfb2e5 (patch) | |
tree | 8ab658ea4456b0ccec55e95c2aee40aed028936f /arch/arm64/include | |
parent | d875c9b3724083cd2629cd8507e424cd3716cd28 (diff) | |
download | op-kernel-dev-192c4d902f19b66902d7aacc19e9b169bebfb2e5.zip op-kernel-dev-192c4d902f19b66902d7aacc19e9b169bebfb2e5.tar.gz |
arm64: lib: Implement optimized string compare routines
This patch, based on Linaro's Cortex Strings library, adds
an assembly optimized strcmp() and strncmp() functions.
Signed-off-by: Zhichang Yuan <zhichang.yuan@linaro.org>
Signed-off-by: Deepak Saxena <dsaxena@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/string.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/string.h b/arch/arm64/include/asm/string.h index 3a43305..6133f49 100644 --- a/arch/arm64/include/asm/string.h +++ b/arch/arm64/include/asm/string.h @@ -22,6 +22,12 @@ extern char *strrchr(const char *, int c); #define __HAVE_ARCH_STRCHR extern char *strchr(const char *, int c); +#define __HAVE_ARCH_STRCMP +extern int strcmp(const char *, const char *); + +#define __HAVE_ARCH_STRNCMP +extern int strncmp(const char *, const char *, __kernel_size_t); + #define __HAVE_ARCH_MEMCPY extern void *memcpy(void *, const void *, __kernel_size_t); |