• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#------------------------------------------------------------------------------
2#
3# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
4#
5# 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#include <AsmMacroIoLib.h>
16
17ASM_FUNC(__muldi3)
18  stmfd  sp!, {r4, r5, r6, r7, lr}
19  add  r7, sp, #12
20  stmfd  sp!, {r8, r10, r11}
21  ldr  r11, L4
22  mov  r4, r0, lsr #16
23  and  r8, r0, r11
24  and  ip, r2, r11
25  mul  lr, ip, r8
26  mul  ip, r4, ip
27  sub  sp, sp, #8
28  add  r10, ip, lr, lsr #16
29  and  ip, r10, r11
30  and  lr, lr, r11
31  mov  r6, r2, lsr #16
32  str  r4, [sp, #4]
33  add  r4, lr, ip, asl #16
34  mul  ip, r8, r6
35  mov  r5, r10, lsr #16
36  add  r10, ip, r4, lsr #16
37  and  ip, r10, r11
38  and  lr, r4, r11
39  add  r4, lr, ip, asl #16
40  mul  r0, r3, r0
41  add  ip, r5, r10, lsr #16
42  ldr  r5, [sp, #4]
43  mla  r0, r2, r1, r0
44  mla  r5, r6, r5, ip
45  mov  r10, r4
46  add  r11, r0, r5
47  mov  r1, r11
48  mov  r0, r4
49  sub  sp, r7, #24
50  ldmfd  sp!, {r8, r10, r11}
51  ldmfd  sp!, {r4, r5, r6, r7, pc}
52  .p2align 2
53L5:
54  .align 2
55L4:
56  .long  65535
57