wdenk | 591dda5 | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 1 | #ifndef __ASM_I386_STRING_H |
| 2 | #define __ASM_I386_STRING_H |
| 3 | |
| 4 | /* |
| 5 | * We don't do inline string functions, since the |
| 6 | * optimised inline asm versions are not small. |
| 7 | */ |
Graeme Russ | 2fe2a97 | 2008-09-07 07:08:42 +1000 | [diff] [blame] | 8 | #undef __HAVE_ARCH_STRNCPY |
| 9 | extern char *strncpy(char *__dest, __const__ char *__src, __kernel_size_t __n); |
wdenk | 591dda5 | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 10 | |
wdenk | 67ff36c | 2002-11-19 23:01:07 +0000 | [diff] [blame] | 11 | #undef __HAVE_ARCH_STRRCHR |
Heinrich Schuchardt | 7245476 | 2019-01-23 02:42:39 +0100 | [diff] [blame] | 12 | extern char *strrchr(const char *s, int c); |
wdenk | 591dda5 | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 13 | |
wdenk | 67ff36c | 2002-11-19 23:01:07 +0000 | [diff] [blame] | 14 | #undef __HAVE_ARCH_STRCHR |
Heinrich Schuchardt | 7245476 | 2019-01-23 02:42:39 +0100 | [diff] [blame] | 15 | extern char *strchr(const char *s, int c); |
| 16 | |
Simon Glass | 200626c | 2023-05-04 16:50:52 -0600 | [diff] [blame] | 17 | /* |
| 18 | * Our assembly routines do not work on in 64-bit mode and we don't do a lot of |
| 19 | * copying in SPL, so code size is more important there. |
| 20 | */ |
| 21 | #if defined(CONFIG_SPL_BUILD) || !IS_ENABLED(CONFIG_X86_32BIT_INIT) |
Heinrich Schuchardt | 7245476 | 2019-01-23 02:42:39 +0100 | [diff] [blame] | 22 | |
| 23 | #undef __HAVE_ARCH_MEMCPY |
| 24 | extern void *memcpy(void *, const void *, __kernel_size_t); |
| 25 | |
| 26 | #undef __HAVE_ARCH_MEMMOVE |
| 27 | extern void *memmove(void *, const void *, __kernel_size_t); |
| 28 | |
| 29 | #undef __HAVE_ARCH_MEMSET |
| 30 | extern void *memset(void *, int, __kernel_size_t); |
| 31 | |
| 32 | #else |
wdenk | 591dda5 | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 33 | |
Graeme Russ | 1dd0b70 | 2011-12-27 22:46:39 +1100 | [diff] [blame] | 34 | #define __HAVE_ARCH_MEMCPY |
Heinrich Schuchardt | 7245476 | 2019-01-23 02:42:39 +0100 | [diff] [blame] | 35 | extern void *memcpy(void *, const void *, __kernel_size_t); |
wdenk | 591dda5 | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 36 | |
Simon Glass | 889111c | 2016-10-05 20:42:10 -0600 | [diff] [blame] | 37 | #define __HAVE_ARCH_MEMMOVE |
Heinrich Schuchardt | 7245476 | 2019-01-23 02:42:39 +0100 | [diff] [blame] | 38 | extern void *memmove(void *, const void *, __kernel_size_t); |
wdenk | 591dda5 | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 39 | |
Gabe Black | 0e49905 | 2011-11-14 14:47:18 +0000 | [diff] [blame] | 40 | #define __HAVE_ARCH_MEMSET |
Heinrich Schuchardt | 7245476 | 2019-01-23 02:42:39 +0100 | [diff] [blame] | 41 | extern void *memset(void *, int, __kernel_size_t); |
| 42 | |
| 43 | #endif /* CONFIG_X86_64 */ |
| 44 | |
| 45 | #undef __HAVE_ARCH_MEMCHR |
| 46 | extern void *memchr(const void *, int, __kernel_size_t); |
wdenk | 591dda5 | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 47 | |
wdenk | 67ff36c | 2002-11-19 23:01:07 +0000 | [diff] [blame] | 48 | #undef __HAVE_ARCH_MEMZERO |
wdenk | 591dda5 | 2002-11-18 00:14:45 +0000 | [diff] [blame] | 49 | extern void memzero(void *ptr, __kernel_size_t n); |
| 50 | |
| 51 | #endif |