]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/compiler-rt/lib/arm/aeabi_memset.S
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / compiler-rt / lib / arm / aeabi_memset.S
1 //===-- aeabi_memset.S - EABI memset 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_memset(void *dest, size_t n, int c) { memset(dest, c, n); }
13 //  void __aeabi_memclr(void *dest, size_t n) { __aeabi_memset(dest, n, 0); }
14
15         .align 2
16 DEFINE_COMPILERRT_FUNCTION(__aeabi_memset)
17         mov     r3, r1
18         mov     r1, r2
19         mov     r2, r3
20         b       memset
21
22 DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memset4, __aeabi_memset)
23 DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memset8, __aeabi_memset)
24         
25 DEFINE_COMPILERRT_FUNCTION(__aeabi_memclr)
26         mov     r2, r1
27         mov     r1, #0
28         b       memset
29
30 DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memclr4, __aeabi_memclr)
31 DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memclr8, __aeabi_memclr)
32