[1/2] arm: Only use the .fpu directive on ELF

Message ID 1468873760-18844-1-git-send-email-martin@martin.st
State Superseded
Headers show

Commit Message

Martin Storsjö July 18, 2016, 8:29 p.m.
This directive doesn't have any effect on other targets,
and clang doesn't support it, when targeting COFF (windows).
binutils on the other hand supports it for all targets.
---
 libavutil/arm/asm.S           | 4 ++--
 tests/checkasm/arm/checkasm.S | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Luca Barbato July 19, 2016, 4:10 a.m. | #1
On 18/07/16 22:29, Martin Storsjö wrote:
> This directive doesn't have any effect on other targets,
> and clang doesn't support it, when targeting COFF (windows).
> binutils on the other hand supports it for all targets.
> ---
>  libavutil/arm/asm.S           | 4 ++--
>  tests/checkasm/arm/checkasm.S | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)

Sure.
Janne Grunau July 19, 2016, 7:35 a.m. | #2
On 2016-07-18 23:29:19 +0300, Martin Storsjö wrote:
> This directive doesn't have any effect on other targets,
> and clang doesn't support it, when targeting COFF (windows).
> binutils on the other hand supports it for all targets.

not strictly opposed to this but testing it in configure like .func 
might the better option. I think both clang and binutils support it for 
mach-o.

Janne

Patch

diff --git a/libavutil/arm/asm.S b/libavutil/arm/asm.S
index 943c1ce..e3b43f3 100644
--- a/libavutil/arm/asm.S
+++ b/libavutil/arm/asm.S
@@ -54,11 +54,11 @@  ELF     .object_arch    armv4
 #endif
 
 #if   HAVE_NEON
-        .fpu            neon
+ELF     .fpu            neon
 ELF     .eabi_attribute 10, 0           @ suppress Tag_FP_arch
 ELF     .eabi_attribute 12, 0           @ suppress Tag_Advanced_SIMD_arch
 #elif HAVE_VFP
-        .fpu            vfp
+ELF     .fpu            vfp
 ELF     .eabi_attribute 10, 0           @ suppress Tag_FP_arch
 #endif
 
diff --git a/tests/checkasm/arm/checkasm.S b/tests/checkasm/arm/checkasm.S
index ab53d0a..b4922c7 100644
--- a/tests/checkasm/arm/checkasm.S
+++ b/tests/checkasm/arm/checkasm.S
@@ -24,7 +24,7 @@ 
 
 /* override fpu so that NEON instructions are rejected */
 #if HAVE_VFP
-.fpu            vfp
+ELF     .fpu            vfp
 ELF     .eabi_attribute 10, 0           @ suppress Tag_FP_arch
 #endif