[edk2-devel] [PATCH v3 5/7] ArmPkg/ArmLib ARM: set .fpu to let Clang 7 assemble ArmV7Support.S

Ard Biesheuvel ard.biesheuvel at linaro.org
Fri May 31 12:49:56 UTC 2019


Clang 7 complains about the vmsr instruction in ArmV7Support.S,
which is only available on cores that implement some flavour of
VFP. So set the .fpu to NEON like we do in some other places.

Acked-by: Laszlo Ersek <lersek at redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
---
 ArmPkg/Library/ArmLib/Arm/ArmV7Support.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S b/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
index 16c56f72e973..4925f6628e1e 100644
--- a/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
+++ b/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
@@ -262,6 +262,8 @@ ASM_FUNC(ArmEnableVFP)
 #ifndef __clang__
   mcr     p10,#0x7,r0,c8,c0,#0
 #else
+  # Set the FPU model so Clang does not choke on the next instruction
+  .fpu    neon
   vmsr    fpexc, r0
 #endif
   bx      lr
-- 
2.20.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#41740): https://edk2.groups.io/g/devel/message/41740
Mute This Topic: https://groups.io/mt/31879992/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list