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

Ard Biesheuvel posted 7 patches 6 years, 6 months ago
Only 5 patches received!
There is a newer version of this series
[edk2-devel] [PATCH v2 7/7] ArmPkg/ArmLib ARM: set .fpu to let Clang 7 assemble ArmV7Support.S
Posted by Ard Biesheuvel 6 years, 6 months ago
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.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
Note that the !clang alternative does not assembler for Clang-7 either
so this is probably the most straightforward approach.

 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 16c56f72e973..b5a6b9ea487d 100644
--- a/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
+++ b/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
@@ -262,6 +262,7 @@ ASM_FUNC(ArmEnableVFP)
 #ifndef __clang__
   mcr     p10,#0x7,r0,c8,c0,#0
 #else
+  .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 (#41431): https://edk2.groups.io/g/devel/message/41431
Mute This Topic: https://groups.io/mt/31813773/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH v2 7/7] ArmPkg/ArmLib ARM: set .fpu to let Clang 7 assemble ArmV7Support.S
Posted by Philippe Mathieu-Daudé 6 years, 6 months ago
Hi Ard,

On 5/27/19 10:51 PM, 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.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> Note that the !clang alternative does not assembler for Clang-7 either
> so this is probably the most straightforward approach.
> 
>  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 16c56f72e973..b5a6b9ea487d 100644
> --- a/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
> +++ b/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
> @@ -262,6 +262,7 @@ ASM_FUNC(ArmEnableVFP)
>  #ifndef __clang__
>    mcr     p10,#0x7,r0,c8,c0,#0
>  #else
> +  .fpu    neon

If possible, can you add a short '@ reason why ...' comment on the same
line, previous to push this?

Regardless:
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>

>    vmsr    fpexc, r0
>  #endif
>    bx      lr
> 

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

View/Reply Online (#41671): https://edk2.groups.io/g/devel/message/41671
Mute This Topic: https://groups.io/mt/31813773/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-