blob: e83c5fd4dbb35729e1ae6d9637396a84a35c627e [file] [log] [blame]
Anton Korobeynikovb047b042012-01-30 10:21:23 +00001//===-- 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 Golin2931b212016-07-13 14:01:15 +000014 .syntax unified
Saleem Abdulrasool310874a2014-05-12 15:23:37 +000015 .p2align 2
Anton Korobeynikovb047b042012-01-30 10:21:23 +000016DEFINE_COMPILERRT_FUNCTION(__aeabi_memcpy)
Weiming Zhaoe58bb5d2017-11-09 17:32:57 +000017#ifdef USE_THUMB_1
18 push {r7, lr}
19 bl memcpy
20 pop {r7, pc}
21#else
Anton Korobeynikovb047b042012-01-30 10:21:23 +000022 b memcpy
Weiming Zhaoe58bb5d2017-11-09 17:32:57 +000023#endif
Joerg Sonnenberger171e9cf2014-01-24 14:33:42 +000024END_COMPILERRT_FUNCTION(__aeabi_memcpy)
Anton Korobeynikovb047b042012-01-30 10:21:23 +000025
26DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy4, __aeabi_memcpy)
27DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy8, __aeabi_memcpy)
Saleem Abdulrasool590e85b2016-06-22 22:09:42 +000028
29NO_EXEC_STACK_DIRECTIVE
30