]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Library/CompilerIntrinsicsLib/Arm/uread.asm
ARM Packages: Removed trailing spaces
[mirror_edk2.git] / ArmPkg / Library / CompilerIntrinsicsLib / Arm / uread.asm
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
16
17 EXPORT __aeabi_uread4
18 EXPORT __aeabi_uread8
19
20 AREA Uread4, CODE, READONLY
21
22 ;
23 ;UINT32
24 ;EFIAPI
25 ;__aeabi_uread4 (
26 ; IN VOID *Pointer
27 ; );
28 ;
29 __aeabi_uread4
30 ldrb r1, [r0]
31 ldrb r2, [r0, #1]
32 ldrb r3, [r0, #2]
33 ldrb r0, [r0, #3]
34 orr r1, r1, r2, lsl #8
35 orr r1, r1, r3, lsl #16
36 orr r0, r1, r0, lsl #24
37 bx lr
38
39 ;
40 ;UINT64
41 ;EFIAPI
42 ;__aeabi_uread8 (
43 ; IN VOID *Pointer
44 ; );
45 ;
46 __aeabi_uread8
47 mov r3, r0
48
49 ldrb r1, [r3]
50 ldrb r2, [r3, #1]
51 orr r1, r1, r2, lsl #8
52 ldrb r2, [r3, #2]
53 orr r1, r1, r2, lsl #16
54 ldrb r0, [r3, #3]
55 orr r0, r1, r0, lsl #24
56
57 ldrb r1, [r3, #4]
58 ldrb r2, [r3, #5]
59 orr r1, r1, r2, lsl #8
60 ldrb r2, [r3, #6]
61 orr r1, r1, r2, lsl #16
62 ldrb r2, [r3, #7]
63 orr r1, r1, r2, lsl #24
64
65 bx lr
66 END