]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/CompilerIntrinsicsLib/Arm/muldi3.S
ARM Packages: Fixed line endings
[mirror_edk2.git] / ArmPkg / Library / CompilerIntrinsicsLib / Arm / muldi3.S
CommitLineData
1e57a462 1#------------------------------------------------------------------------------ \r
2#\r
3# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
4#\r
5# This program and the accompanying materials\r
6# are licensed and made available under the terms and conditions of the BSD License\r
7# which accompanies this distribution. The full text of the license may be found at\r
8# http://opensource.org/licenses/bsd-license.php\r
9#\r
10# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12#\r
13#------------------------------------------------------------------------------\r
14\r
15 .text\r
16 .align 2\r
17 GCC_ASM_EXPORT(__muldi3)\r
18\r
19ASM_PFX(__muldi3):\r
20 stmfd sp!, {r4, r5, r6, r7, lr}\r
21 add r7, sp, #12\r
22 stmfd sp!, {r8, r10, r11}\r
23 ldr r11, L4\r
24 mov r4, r0, lsr #16\r
25 and r8, r0, r11\r
26 and ip, r2, r11\r
27 mul lr, ip, r8\r
28 mul ip, r4, ip\r
29 sub sp, sp, #8\r
30 add r10, ip, lr, lsr #16\r
31 and ip, r10, r11\r
32 and lr, lr, r11\r
33 mov r6, r2, lsr #16\r
34 str r4, [sp, #4]\r
35 add r4, lr, ip, asl #16\r
36 mul ip, r8, r6\r
37 mov r5, r10, lsr #16\r
38 add r10, ip, r4, lsr #16\r
39 and ip, r10, r11\r
40 and lr, r4, r11\r
41 add r4, lr, ip, asl #16\r
42 mul r0, r3, r0\r
43 add ip, r5, r10, lsr #16\r
44 ldr r5, [sp, #4]\r
45 mla r0, r2, r1, r0\r
46 mla r5, r6, r5, ip\r
47 mov r10, r4\r
48 add r11, r0, r5\r
49 mov r1, r11\r
50 mov r0, r4\r
51 sub sp, r7, #24\r
52 ldmfd sp!, {r8, r10, r11}\r
53 ldmfd sp!, {r4, r5, r6, r7, pc}\r
54 .p2align 2\r
55L5:\r
56 .align 2\r
57L4:\r
58 .long 65535\r