summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-08-10 07:54:39 +0000
committerabiesheuvel <abiesheuvel@Edk2>2015-08-10 07:54:39 +0000
commit906e8ce4691d4c5ea088f840b645a2cbdbafe095 (patch)
treeb9e07c6e0ed122ed5682dc8e670f9f4b3cf195a9 /ArmPkg
parent21d0e75065eabe7a6bd9e4b92af54f070258a79b (diff)
downloadedk2-platforms-906e8ce4691d4c5ea088f840b645a2cbdbafe095.tar.xz
ArmPkg/GicV3: use GICv3 generic sysreg names only for GNU as
The GNU assembler extends the generic notation for IMPLEMENTATION DEFINED system registers to support any system register, so that system registers defined by newer versions of the architecture can still be used by older versions of the toolchain. Clang before v3.6 supports the generic notation, but does not support this extension, nor does it need to in the particular case of the GICv3 support code, since it knows the GICv3 registers by their architectural names. So only redefine their real names to their generic aliases if we are not using clang. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18192 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Drivers/ArmGic/GicV3/AArch64/ArmGicV3.S10
1 files changed, 10 insertions, 0 deletions
diff --git a/ArmPkg/Drivers/ArmGic/GicV3/AArch64/ArmGicV3.S b/ArmPkg/Drivers/ArmGic/GicV3/AArch64/ArmGicV3.S
index c30ae76d94..f1c227f2c4 100644
--- a/ArmPkg/Drivers/ArmGic/GicV3/AArch64/ArmGicV3.S
+++ b/ArmPkg/Drivers/ArmGic/GicV3/AArch64/ArmGicV3.S
@@ -13,6 +13,14 @@
#include <AsmMacroIoLibV8.h>
+#if !defined(__clang__)
+
+//
+// Clang versions before v3.6 do not support the GNU extension that allows
+// system registers outside of the IMPLEMENTATION DEFINED range to be specified
+// using the generic notation below. However, clang knows these registers by
+// their architectural names, so it has no need for these aliases anyway.
+//
#define ICC_SRE_EL1 S3_0_C12_C12_5
#define ICC_SRE_EL2 S3_4_C12_C9_5
#define ICC_SRE_EL3 S3_6_C12_C12_5
@@ -22,6 +30,8 @@
#define ICC_PMR_EL1 S3_0_C4_C6_0
#define ICC_BPR1_EL1 S3_0_C12_C12_3
+#endif
+
.text
.align 2