From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org, leif.lindholm@linaro.org
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH 3/3] ArmPkg: remove LoadConstantXxx() asm macros
Date: Fri, 28 Oct 2016 12:42:54 +0100 [thread overview]
Message-ID: <1477654974-5598-4-git-send-email-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <1477654974-5598-1-git-send-email-ard.biesheuvel@linaro.org>
This is ancient cruft that is no longer used, so remove it.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
ArmPkg/Include/AsmMacroIoLib.h | 33 --------------------
ArmPkg/Include/AsmMacroIoLib.inc | 10 ------
ArmPkg/Include/AsmMacroIoLibV8.h | 30 ------------------
3 files changed, 73 deletions(-)
diff --git a/ArmPkg/Include/AsmMacroIoLib.h b/ArmPkg/Include/AsmMacroIoLib.h
index 936e01e3388f..16d2a307291c 100644
--- a/ArmPkg/Include/AsmMacroIoLib.h
+++ b/ArmPkg/Include/AsmMacroIoLib.h
@@ -19,39 +19,6 @@
#ifndef __MACRO_IO_LIB_H__
#define __MACRO_IO_LIB_H__
-#if defined(__APPLE__)
-
-//
-// ldr reg, =expr does not work with current Apple tool chain. So do the work our selves
-//
-
-// load _Reg with _Data
-#define LoadConstantToReg(_Data, _Reg) \
- ldr _Reg, [pc, #0] ; \
- b 1f ; \
- .long (_Data) ; \
-1:
-
-#elif defined (__GNUC__)
-
-#define LoadConstantToReg(Data, Reg) \
- ldr Reg, =Data
-
-#else
-
-//
-// Use ARM assembly macros, form armasam
-//
-// Less magic in the macros if ldr reg, =expr works
-//
-
-// load _Reg with _Data
-
-
-#define LoadConstantToReg(Data, Reg) LoadConstantToRegMacro Data, Reg
-
-#endif
-
#define _ASM_FUNC(Name, Section) \
.global Name ; \
.section #Section, "ax" ; \
diff --git a/ArmPkg/Include/AsmMacroIoLib.inc b/ArmPkg/Include/AsmMacroIoLib.inc
index 4bc3146fb399..ce7a1488daea 100644
--- a/ArmPkg/Include/AsmMacroIoLib.inc
+++ b/ArmPkg/Include/AsmMacroIoLib.inc
@@ -17,16 +17,6 @@
MACRO
- LoadConstantMacro $Data
- ldr r0, =($Data)
- MEND
-
- MACRO
- LoadConstantToRegMacro $Data, $Reg
- ldr $Reg, =($Data)
- MEND
-
- MACRO
adrll $Reg, $Symbol
add $Reg, pc, #-8
RELOC R_ARM_ALU_PC_G0_NC, $Symbol
diff --git a/ArmPkg/Include/AsmMacroIoLibV8.h b/ArmPkg/Include/AsmMacroIoLibV8.h
index e9285f78e7d6..db43d3b52e5a 100644
--- a/ArmPkg/Include/AsmMacroIoLibV8.h
+++ b/ArmPkg/Include/AsmMacroIoLibV8.h
@@ -42,36 +42,6 @@
cbnz SAFE_XREG, 1f ;\
b . ;// We should never get here
-#if defined(__clang__)
-
-// load x0 with _Data
-#define LoadConstant(_Data) \
- ldr x0, 1f ; \
- b 2f ; \
-.align(8) ; \
-1: \
- .8byte (_Data) ; \
-2:
-
-// load _Reg with _Data
-#define LoadConstantToReg(_Data, _Reg) \
- ldr _Reg, 1f ; \
- b 2f ; \
-.align(8) ; \
-1: \
- .8byte (_Data) ; \
-2:
-
-#elif defined (__GNUC__)
-
-#define LoadConstant(Data) \
- ldr x0, =Data
-
-#define LoadConstantToReg(Data, Reg) \
- ldr Reg, =Data
-
-#endif // __GNUC__
-
#define _ASM_FUNC(Name, Section) \
.global Name ; \
.section #Section, "ax" ; \
--
2.7.4
next prev parent reply other threads:[~2016-10-28 11:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-28 11:42 [PATCH 0/3] ArmPkg/ArmPlatformPkg: some cleanups Ard Biesheuvel
2016-10-28 11:42 ` [PATCH 1/3] ArmPkg RVCT: add ADRL/LDRL macro equivalents Ard Biesheuvel
2016-10-28 15:21 ` Leif Lindholm
2016-10-28 11:42 ` [PATCH 2/3] ArmPlatformPkg/PrePi RVCT: use relative reference to mSystemMemoryEnd Ard Biesheuvel
2016-10-28 15:21 ` Leif Lindholm
2016-10-28 11:42 ` Ard Biesheuvel [this message]
2016-10-28 15:21 ` [PATCH 3/3] ArmPkg: remove LoadConstantXxx() asm macros Leif Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1477654974-5598-4-git-send-email-ard.biesheuvel@linaro.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox