From 6d2449c1f5fb7ff18faaa08a4ac6b38709ea1e30 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Tue, 15 Dec 2015 15:02:07 +0000 Subject: [PATCH] ArmPkg/ArmV7Lib: add CLANG alternative for FPEXC access The open coded access to co-processor #10 to set FPEXC is not supported by the CLANG assembler, but the architecturally correct VMSR instruction is not supported by older binutils. So keep the former unless __clang__ is defined. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19282 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S index 7de1b11ef8..50c760f335 100644 --- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S +++ b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S @@ -298,7 +298,11 @@ ASM_PFX(ArmEnableVFP): isb # Set EN bit in FPEXC. The Advanced SIMD and VFP extensions are enabled and operate normally. mov r0, #0x40000000 +#ifndef __clang__ mcr p10,#0x7,r0,c8,c0,#0 +#else + vmsr fpexc, r0 +#endif bx lr ASM_PFX(ArmCallWFI):