]>
Commit | Line | Data |
---|---|---|
3402aac7 | 1 | //------------------------------------------------------------------------------\r |
1e57a462 | 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 | \r | |
1e57a462 | 16 | EXTERN __aeabi_uldivmod\r |
3402aac7 | 17 | \r |
efda1775 | 18 | INCLUDE AsmMacroExport.inc\r |
1e57a462 | 19 | \r |
20 | ;\r | |
21 | ;UINT32\r | |
22 | ;EFIAPI\r | |
23 | ;__aeabi_uidivmode (\r | |
24 | ; IN UINT32 Dividen\r | |
25 | ; IN UINT32 Divisor\r | |
26 | ; );\r | |
27 | ;\r | |
28 | \r | |
efda1775 | 29 | RVCT_ASM_EXPORT __aeabi_ldivmod\r |
1e57a462 | 30 | PUSH {r4,lr}\r |
31 | ASRS r4,r1,#1\r | |
32 | EOR r4,r4,r3,LSR #1\r | |
33 | BPL L_Test1\r | |
34 | RSBS r0,r0,#0\r | |
35 | RSC r1,r1,#0\r | |
36 | L_Test1\r | |
37 | TST r3,r3\r | |
38 | BPL L_Test2\r | |
39 | RSBS r2,r2,#0\r | |
40 | RSC r3,r3,#0\r | |
41 | L_Test2\r | |
42 | BL __aeabi_uldivmod ;\r | |
43 | TST r4,#0x40000000\r | |
44 | BEQ L_Test3\r | |
45 | RSBS r0,r0,#0\r | |
46 | RSC r1,r1,#0\r | |
47 | L_Test3\r | |
48 | TST r4,#0x80000000\r | |
49 | BEQ L_Exit\r | |
50 | RSBS r2,r2,#0\r | |
51 | RSC r3,r3,#0\r | |
52 | L_Exit\r | |
53 | POP {r4,pc}\r | |
3402aac7 | 54 | \r |
1e57a462 | 55 | END\r |
56 | \r | |
57 | \r |