Daniel Boulby | b3ec516 | 2022-10-21 17:38:24 +0100 | [diff] [blame] | 1 | //===-- aeabi_memcpy.S - EABI memcpy 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_memcpy(void *dest, void *src, size_t n) { memcpy(dest, src, n); } |
| 12 | |
| 13 | .syntax unified |
| 14 | .p2align 2 |
| 15 | DEFINE_COMPILERRT_FUNCTION(__aeabi_memcpy) |
| 16 | #ifdef USE_THUMB_1 |
| 17 | push {r7, lr} |
| 18 | bl memcpy |
| 19 | pop {r7, pc} |
| 20 | #else |
| 21 | b memcpy |
| 22 | #endif |
| 23 | END_COMPILERRT_FUNCTION(__aeabi_memcpy) |
| 24 | |
| 25 | DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy4, __aeabi_memcpy) |
| 26 | DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy8, __aeabi_memcpy) |
| 27 | |
| 28 | NO_EXEC_STACK_DIRECTIVE |
| 29 | |