Anton Korobeynikov | b047b04 | 2012-01-30 10:21:23 +0000 | [diff] [blame] | 1 | //===-- aeabi_memcpy.S - EABI memcpy implementation -----------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "../assembly.h" |
| 11 | |
| 12 | // void __aeabi_memcpy(void *dest, void *src, size_t n) { memcpy(dest, src, n); } |
| 13 | |
Renato Golin | 2931b21 | 2016-07-13 14:01:15 +0000 | [diff] [blame] | 14 | .syntax unified |
Saleem Abdulrasool | 310874a | 2014-05-12 15:23:37 +0000 | [diff] [blame] | 15 | .p2align 2 |
Anton Korobeynikov | b047b04 | 2012-01-30 10:21:23 +0000 | [diff] [blame] | 16 | DEFINE_COMPILERRT_FUNCTION(__aeabi_memcpy) |
Weiming Zhao | e58bb5d | 2017-11-09 17:32:57 +0000 | [diff] [blame] | 17 | #ifdef USE_THUMB_1 |
| 18 | push {r7, lr} |
| 19 | bl memcpy |
| 20 | pop {r7, pc} |
| 21 | #else |
Anton Korobeynikov | b047b04 | 2012-01-30 10:21:23 +0000 | [diff] [blame] | 22 | b memcpy |
Weiming Zhao | e58bb5d | 2017-11-09 17:32:57 +0000 | [diff] [blame] | 23 | #endif |
Joerg Sonnenberger | 171e9cf | 2014-01-24 14:33:42 +0000 | [diff] [blame] | 24 | END_COMPILERRT_FUNCTION(__aeabi_memcpy) |
Anton Korobeynikov | b047b04 | 2012-01-30 10:21:23 +0000 | [diff] [blame] | 25 | |
| 26 | DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy4, __aeabi_memcpy) |
| 27 | DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy8, __aeabi_memcpy) |
Saleem Abdulrasool | 590e85b | 2016-06-22 22:09:42 +0000 | [diff] [blame] | 28 | |
| 29 | NO_EXEC_STACK_DIRECTIVE |
| 30 | |