2 * include/asm-s390/string.h
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
9 #ifndef _S390_STRING_H_
10 #define _S390_STRING_H_
14 #ifndef _LINUX_TYPES_H
15 #include <linux/types.h>
18 #define __HAVE_ARCH_MEMCHR
19 #define __HAVE_ARCH_MEMCPY
20 #define __HAVE_ARCH_MEMSET
21 #define __HAVE_ARCH_STRCAT
22 #define __HAVE_ARCH_STRCMP
23 #define __HAVE_ARCH_STRCPY
24 #define __HAVE_ARCH_STRLEN
25 #define __HAVE_ARCH_STRNCPY
27 #undef __HAVE_ARCH_MEMMOVE
28 #undef __HAVE_ARCH_STRNICMP
29 #undef __HAVE_ARCH_STRNCAT
30 #undef __HAVE_ARCH_STRNCMP
31 #undef __HAVE_ARCH_STRCHR
32 #undef __HAVE_ARCH_STRRCHR
33 #undef __HAVE_ARCH_STRNLEN
34 #undef __HAVE_ARCH_STRSPN
35 #undef __HAVE_ARCH_STRPBRK
36 #undef __HAVE_ARCH_STRTOK
37 #undef __HAVE_ARCH_BCOPY
38 #undef __HAVE_ARCH_MEMCMP
39 #undef __HAVE_ARCH_MEMSCAN
40 #undef __HAVE_ARCH_STRSTR
42 extern void *memset(void *, int, size_t);
44 extern inline void * memchr(const void * cs
,int c
,size_t count
)
48 __asm__
__volatile__ (" lr 0,%2\n"
55 : "=a" (ptr
) : "a" (cs
), "d" (c
), "d" (count
)
60 extern __inline__
char *strcpy(char *dest
, const char *src
)
64 __asm__
__volatile__ (" sr 0,0\n"
67 : "+&a" (dest
), "+&a" (src
) :
68 : "cc", "memory", "0" );
72 extern __inline__
size_t strlen(const char *s
)
76 __asm__
__volatile__ (" sr 0,0\n"
82 : "=&a" (len
) : "a" (s
)
87 extern __inline__
char *strcat(char *dest
, const char *src
)
91 __asm__
__volatile__ (" sr 0,0\n"
98 : "+&a" (dest
), "+&a" (src
) :
99 : "cc", "memory", "0" );
104 #endif /* __KERNEL__ */
106 #endif /* __S390_STRING_H_ */