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

Leif Lindholm leif.lindholm at linaro.org
Fri Dec 21 09:58:03 PST 2018


On Thu, Dec 20, 2018 at 08:16:53PM +0100, Ard Biesheuvel wrote:
> 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.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
> ---
>  ArmPkg/Library/ArmLib/Arm/ArmV7Support.S | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S b/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
> index 281499b46cbc..1808962ee3e2 100644
> --- a/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
> +++ b/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
> @@ -268,6 +268,7 @@ ASM_FUNC(ArmEnableVFP)
>  #ifndef __clang__
>    mcr     p10,#0x7,r0,c8,c0,#0
>  #else
> +  .fpu    neon
>    vmsr    fpexc, r0
>  #endif

No objection from me. But I would point out that the special clang
filtering here could possibly be dropped.

I mean, theoretically someone could have an even older binutils, but
Linaro GCC 4.8-2013.05 will happily assemble the clang side of this
conditional.

/
    Leif


More information about the edk2-devel mailing list