]>
Commit | Line | Data |
---|---|---|
2ef2b01e A |
1 | #------------------------------------------------------------------------------ |
2 | # | |
3 | # Copyright (c) 2008-2009 Apple Inc. All rights reserved. | |
4 | # | |
5 | # All rights reserved. This program and the accompanying materials | |
6 | # are licensed and made available under the terms and conditions of the BSD License | |
7 | # which accompanies this distribution. The full text of the license may be found at | |
8 | # http://opensource.org/licenses/bsd-license.php | |
9 | # | |
10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, | |
11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | |
12 | # | |
13 | #------------------------------------------------------------------------------ | |
14 | ||
15 | .text | |
16 | .align 2 | |
17 | .globl ___muldi3 | |
18 | ___muldi3: | |
19 | @ args = 0, pretend = 0, frame = 8 | |
20 | @ frame_needed = 1, uses_anonymous_args = 0 | |
21 | stmfd sp!, {r4, r5, r6, r7, lr} | |
22 | add r7, sp, #12 | |
23 | stmfd sp!, {r8, r10, r11} | |
24 | ldr r11, L4 | |
25 | mov r4, r0, lsr #16 | |
26 | and r8, r0, r11 | |
27 | and ip, r2, r11 | |
28 | mul lr, ip, r8 | |
29 | mul ip, r4, ip | |
30 | sub sp, sp, #8 | |
31 | add r10, ip, lr, lsr #16 | |
32 | and ip, r10, r11 | |
33 | and lr, lr, r11 | |
34 | mov r6, r2, lsr #16 | |
35 | str r4, [sp, #4] | |
36 | add r4, lr, ip, asl #16 | |
37 | mul ip, r8, r6 | |
38 | mov r5, r10, lsr #16 | |
39 | add r10, ip, r4, lsr #16 | |
40 | and ip, r10, r11 | |
41 | and lr, r4, r11 | |
42 | add r4, lr, ip, asl #16 | |
43 | mul r0, r3, r0 | |
44 | add ip, r5, r10, lsr #16 | |
45 | ldr r5, [sp, #4] | |
46 | mla r0, r2, r1, r0 | |
47 | mla r5, r6, r5, ip | |
48 | mov r10, r4 | |
49 | add r11, r0, r5 | |
50 | mov r1, r11 | |
51 | mov r0, r4 | |
52 | sub sp, r7, #24 | |
53 | ldmfd sp!, {r8, r10, r11} | |
54 | ldmfd sp!, {r4, r5, r6, r7, pc} | |
55 | .p2align 2 | |
56 | L5: | |
57 | .align 2 | |
58 | L4: | |
59 | .long 65535 |