]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/compiler-rt/lib/arm/aeabi_uidivmod.S
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / compiler-rt / lib / arm / aeabi_uidivmod.S
1 //===-- aeabi_uidivmod.S - EABI uidivmod 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 // struct { unsigned quot, unsigned rem}
13 //        __aeabi_uidivmod(unsigned numerator, unsigned denominator) {
14 //   unsigned rem, quot;
15 //   quot = __udivmodsi4(numerator, denominator, &rem);
16 //   return {quot, rem};
17 // }
18
19         .syntax unified
20         .align 2
21 DEFINE_COMPILERRT_FUNCTION(__aeabi_uidivmod)
22         push    { lr }
23         sub     sp, sp, #4
24         mov     r2, sp
25         bl      SYMBOL_NAME(__udivmodsi4)
26         ldr     r1, [sp]
27         add     sp, sp, #4
28         pop     { pc }