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    INCLUDE AsmMacroExport.inc
18
19;
20;UINT32
21;EFIAPI
22;__aeabi_uwrite4 (
23;  IN UINT32 Data,
24;  IN VOID   *Pointer
25;  );
26;
27;
28 RVCT_ASM_EXPORT __aeabi_uwrite4
29    mov     r2, r0, lsr #8
30    strb    r0, [r1]
31    strb    r2, [r1, #1]
32    mov     r2, r0, lsr #16
33    strb    r2, [r1, #2]
34    mov     r2, r0, lsr #24
35    strb    r2, [r1, #3]
36    bx      lr
37
38;
39;UINT64
40;EFIAPI
41;__aeabi_uwrite8 (
42;  IN UINT64 Data,    //r0-r1
43;  IN VOID   *Pointer //r2
44;  );
45;
46;
47 RVCT_ASM_EXPORT __aeabi_uwrite8
48    mov     r3, r0, lsr #8
49    strb    r0, [r2]
50    strb    r3, [r2, #1]
51    mov     r3, r0, lsr #16
52    strb    r3, [r2, #2]
53    mov     r3, r0, lsr #24
54    strb    r3, [r2, #3]
55
56    mov     r3, r1, lsr #8
57    strb    r1, [r2, #4]
58    strb    r3, [r2, #5]
59    mov     r3, r1, lsr #16
60    strb    r3, [r2, #6]
61    mov     r3, r1, lsr #24
62    strb    r3, [r2, #7]
63    bx      lr
64
65    END
66
67