From 906e8ce4691d4c5ea088f840b645a2cbdbafe095 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Mon, 10 Aug 2015 07:54:39 +0000 Subject: 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 Reviewed-by: Leif Lindholm Tested-by: Leif Lindholm git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18192 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPkg/Drivers/ArmGic/GicV3/AArch64/ArmGicV3.S | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ArmPkg/Drivers') 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 +#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 -- cgit v1.2.3