| 1 | //===-- aeabi_memmove.S - EABI memmove implementation --------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===---------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "../assembly.h" |
| 10 | |
| 11 | // void __aeabi_memmove(void *dest, void *src, size_t n) { memmove(dest, src, n); } |
| 12 | |
| 13 | .p2align 2 |
| 14 | DEFINE_COMPILERRT_FUNCTION(__aeabi_memmove) |
| 15 | #ifdef USE_THUMB_1 |
| 16 | push {r7, lr} |
| 17 | bl memmove |
| 18 | pop {r7, pc} |
| 19 | #else |
| 20 | #if defined(__ARM_FEATURE_BTI_DEFAULT) |
| 21 | bti |
| 22 | #endif |
| 23 | b memmove |
| 24 | #endif |
| 25 | END_COMPILERRT_FUNCTION(__aeabi_memmove) |
| 26 | |
| 27 | DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memmove4, __aeabi_memmove) |
| 28 | DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memmove8, __aeabi_memmove) |
| 29 | |
| 30 | NO_EXEC_STACK_DIRECTIVE |
| 31 | |
| 32 | |