diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-01-18 10:42:18 +0100 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-02-11 15:30:35 +0100 |
commit | 5210d1e6889c8183ecad269e86e2d9c524015b5f (patch) | |
tree | 77fcc0cfb1853c553eaf58a271256f13b860a528 /arch/arc/include/asm/string.h | |
parent | ARC: Spinlock/rwlock/mutex primitives (diff) | |
download | linux-5210d1e6889c8183ecad269e86e2d9c524015b5f.tar.xz linux-5210d1e6889c8183ecad269e86e2d9c524015b5f.zip |
ARC: String library
Hand optimised asm code for ARC700 pipeline.
Originally written/optimized by Joern Rennecke
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Joern Rennecke <joern.rennecke@embecosm.com>
Diffstat (limited to 'arch/arc/include/asm/string.h')
-rw-r--r-- | arch/arc/include/asm/string.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arc/include/asm/string.h b/arch/arc/include/asm/string.h new file mode 100644 index 000000000000..87676c8f1412 --- /dev/null +++ b/arch/arc/include/asm/string.h @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * vineetg: May 2011 + * -We had half-optimised memset/memcpy, got better versions of those + * -Added memcmp, strchr, strcpy, strcmp, strlen + * + * Amit Bhor: Codito Technologies 2004 + */ + +#ifndef _ASM_ARC_STRING_H +#define _ASM_ARC_STRING_H + +#include <linux/types.h> + +#ifdef __KERNEL__ + +#define __HAVE_ARCH_MEMSET +#define __HAVE_ARCH_MEMCPY +#define __HAVE_ARCH_MEMCMP +#define __HAVE_ARCH_STRCHR +#define __HAVE_ARCH_STRCPY +#define __HAVE_ARCH_STRCMP +#define __HAVE_ARCH_STRLEN + +extern void *memset(void *ptr, int, __kernel_size_t); +extern void *memcpy(void *, const void *, __kernel_size_t); +extern void memzero(void *ptr, __kernel_size_t n); +extern int memcmp(const void *, const void *, __kernel_size_t); +extern char *strchr(const char *s, int c); +extern char *strcpy(char *dest, const char *src); +extern int strcmp(const char *cs, const char *ct); +extern __kernel_size_t strlen(const char *); + +#endif /* __KERNEL__ */ +#endif /* _ASM_ARC_STRING_H */ |