]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Include/AsmMacroIoLib.inc
MdeModulePkg/FaultTolerantWriteDxe: implement standalone MM version
[mirror_edk2.git] / ArmPkg / Include / AsmMacroIoLib.inc
1 ;%HEADER%
2 ;/** @file
3 ; Macros to work around lack of Apple support for LDR register, =expr
4 ;
5 ; Copyright (c) 2009, Apple Inc. All rights reserved.<BR>
6 ; Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
7 ;
8 ; This program and the accompanying materials
9 ; are licensed and made available under the terms and conditions of the BSD License
10 ; which accompanies this distribution. The full text of the license may be found at
11 ; http://opensource.org/licenses/bsd-license.php
12 ;
13 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 ;
16 ;**/
17
18
19 MACRO
20 adrll $Reg, $Symbol
21 add $Reg, pc, #-8
22 RELOC R_ARM_ALU_PC_G0_NC, $Symbol
23 add $Reg, $Reg, #-4
24 RELOC R_ARM_ALU_PC_G1_NC, $Symbol
25 add $Reg, $Reg, #0
26 RELOC R_ARM_ALU_PC_G2, $Symbol
27 MEND
28
29 MACRO
30 ldrl $Reg, $Symbol
31 add $Reg, pc, #-8
32 RELOC R_ARM_ALU_PC_G0_NC, $Symbol
33 add $Reg, $Reg, #-4
34 RELOC R_ARM_ALU_PC_G1_NC, $Symbol
35 ldr $Reg, [$Reg, #0]
36 RELOC R_ARM_LDR_PC_G2, $Symbol
37 MEND
38
39 END