/* * Copyright (c) 2019 Actions Semi Co., Inc. * * SPDX-License-Identifier: Apache-2.0 */ /* poriting from newlib */ #ifndef __UVISION_VERSION #include /* Support the alias for the __aeabi_memset which may assume memory alignment. */ void __aeabi_memset4 (void *dest, size_t n, int c) __attribute__ ((alias ("__aeabi_memset"))); void __aeabi_memset8 (void *dest, size_t n, int c) __attribute__ ((alias ("__aeabi_memset"))); /* Support the routine __aeabi_memset. Can't alias to memset because it's not defined in the same translation unit. */ void __aeabi_memset (void *dest, size_t n, int c) { /*Note that relative to ANSI memset, __aeabi_memset hase the order of its second and third arguments reversed. */ memset (dest, c, n); } /* Support the alias for the __aeabi_memclr which may assume memory alignment. */ void __aeabi_memclr4 (void *dest, size_t n) __attribute__ ((alias ("__aeabi_memclr"))); void __aeabi_memclr8 (void *dest, size_t n) __attribute__ ((alias ("__aeabi_memclr"))); /* Support the routine __aeabi_memclr. */ void __aeabi_memclr (void *dest, size_t n) { extern void __aeabi_memset (void *dest, size_t n, int c); __aeabi_memset (dest, n, 0); } /* Support the alias for the __aeabi_memcpy which may assume memory alignment. */ void __aeabi_memcpy4 (void *dest, const void *source, size_t n) __attribute__ ((alias ("__aeabi_memcpy"))); void __aeabi_memcpy8 (void *dest, const void *source, size_t n) __attribute__ ((alias ("__aeabi_memcpy"))); /* Support the routine __aeabi_memcpy. Can't alias to memcpy because it's not defined in the same translation unit. */ void __aeabi_memcpy (void *dest, const void *source, size_t n) { memcpy (dest, source, n); } #endif