]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Library/CompilerIntrinsicsLib/Arm/uldivmod.c
ArmPkg: Rectify file modes
[mirror_edk2.git] / ArmPkg / Library / CompilerIntrinsicsLib / Arm / uldivmod.c
1 /** @file
2
3 Copyright (c) 2008 - 2010, 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 "Llvm_int_lib.h"
16 #include <Library/BaseLib.h>
17
18
19 UINT32 __udivsi3(UINT32 n, UINT32 d);
20 UINT32 __umodsi3(UINT32 a, UINT32 b);
21
22
23 UINT64
24 __aeabi_uidivmod(unsigned numerator, unsigned denominator)
25 {
26 UINT64 Return;
27
28 Return = __udivsi3 (numerator, denominator);
29 Return |= LShiftU64 (__umodsi3 (numerator, denominator), 32);
30
31 return Return;
32 }
33
34 unsigned
35 __aeabi_uidiv (unsigned n, unsigned d)
36 {
37 return __udivsi3 (n, d);
38 }
39
40
41
42
43