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