diff --git a/include/arch/arc/arcprc.h b/include/arch/arc/arcprc.h index 84ab102ed88..3d5c2939c7c 100644 --- a/include/arch/arc/arcprc.h +++ b/include/arch/arc/arcprc.h @@ -59,9 +59,6 @@ extern "C" { #define TICK_EVENT 0 -#define k_memcpy memcpy -#define k_memset memset - #ifdef __cplusplus } #endif diff --git a/include/arch/arm/ARMprc.h b/include/arch/arm/ARMprc.h index 50c75d8eb22..fa8d2446562 100644 --- a/include/arch/arm/ARMprc.h +++ b/include/arch/arm/ARMprc.h @@ -55,9 +55,6 @@ extern "C" { #define OCTET_TO_SIZEOFUNIT(X) (X) #define SIZEOFUNIT_TO_OCTET(X) (X) -#define k_memcpy memcpy -#define k_memset memset - #ifdef __cplusplus } #endif diff --git a/include/arch/x86/asm_inline_gcc.h b/include/arch/x86/asm_inline_gcc.h index 943a1ff9652..2df97715383 100644 --- a/include/arch/x86/asm_inline_gcc.h +++ b/include/arch/x86/asm_inline_gcc.h @@ -390,73 +390,5 @@ static inline inline __attribute__((always_inline)) return retLong; } - -/******************************************************** - * - * k_memcpy - copy memory area - * - * Copy _n bytes from source _s to destination _d - * - * RETURNS: N/A - * - * \NOMANUAL - */ - -static inline void k_memcpy(void *_d, const void *_s, size_t _n) -{ - /* _d & _s must be aligned to use movsl. */ -#ifndef CONFIG_UNALIGNED_WRITE_UNSUPPORTED - if ((_n&3) == 0) { - /* _n is multiple of words, much more efficient to do word moves */ - _n >>= 2; - __asm__ volatile ("rep movsl" : - "+D" (_d), "+S" (_s), "+c" (_n) : - : - "cc", "memory"); - } else -#endif /* CONFIG_UNALIGNED_WRITE_UNSUPPORTED */ - { - __asm__ volatile ("rep movsb" : - "+D" (_d), "+S" (_s), "+c" (_n) : - : - "cc", "memory"); - } -} - - -/******************************************************** - * - * k_memset - set memory area - * - * Set _n bytes in the area _d to value _v - * - * RETURNS: N/A - * - * \NOMANUAL - */ - -static inline void k_memset(void *_d, int _v, size_t _n) -{ - /* _d must be aligned to use stosl. */ -#ifndef CONFIG_UNALIGNED_WRITE_UNSUPPORTED - if ((_n&3) == 0) { - /* _n is multiple of words, much more efficient to do word stores */ - _n >>= 2; - _v |= _v<<8; - _v |= _v<<16; - __asm__ volatile ("rep stosl" : - "+D" (_d), "+c" (_n) : - "a" (_v) : - "cc", "memory"); - } else -#endif /* CONFIG_UNALIGNED_WRITE_UNSUPPORTED */ - { - __asm__ volatile ("rep stosb" : - "+D" (_d), "+c" (_n) : - "a" (_v) : - "cc", "memory"); - } -} - #endif /* _ASMLANGUAGE */ #endif /* _ASM_INLINE_GCC_PUBLIC_GCC_H */