]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/CompilerIntrinsicsLib/Arm/mullu.asm
Add some missing 64-bit math functions for gcc
[mirror_edk2.git] / ArmPkg / Library / CompilerIntrinsicsLib / Arm / mullu.asm
CommitLineData
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
16 EXPORT __ARM_ll_mullu
17 EXPORT __aeabi_lmul
18
19 AREA Math, CODE, READONLY
20
21;
22;INT64
23;EFIAPI
24;__aeabi_lmul (
25; IN INT64 Multiplicand
26; IN INT32 Multiplier
27; );
28;
29__ARM_ll_mullu
30 mov r3, #0
31// Make upper part of INT64 Multiplier 0 and use __aeabi_lmul
32
33;
34;INT64
35;EFIAPI
36;__aeabi_lmul (
37; IN INT64 Multiplicand
38; IN INT64 Multiplier
39; );
40;
41__aeabi_lmul
42 stmdb sp!, {lr}
43 mov lr, r0
44 umull r0, ip, r2, lr
45 mla r1, r2, r1, ip
46 mla r1, r3, lr, r1
47 ldmia sp!, {pc}
48
49 END