diff mbox series

[FFmpeg-devel] lavu/x86: remove GCC 4.4- stuff

Message ID 20240607164937.19536-1-remi@remlab.net
State New
Headers show
Series [FFmpeg-devel] lavu/x86: remove GCC 4.4- stuff | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Rémi Denis-Courmont June 7, 2024, 4:49 p.m. UTC
Since the C11 support is required, those GCC versions can no longer be
supported anyhow.
---
 libavutil/x86/bswap.h | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

Comments

Marcus B Spencer June 7, 2024, 6:05 p.m. UTC | #1
On Friday, June 7th, 2024 at 11:49 AM, Rémi Denis-Courmont <remi@remlab.net> wrote:

>
>
> Since the C11 support is required, those GCC versions can no longer be
> supported anyhow.
> ---
> libavutil/x86/bswap.h | 13 ++-----------
> 1 file changed, 2 insertions(+), 11 deletions(-)

Public headers are required to be C99 compatible.

`bswap.h` is a public header because it is in the `libavutil/Makefile`'s `HEADERS` variable.

Sources:
https://ffmpeg.org/developer.html#Language
https://ffmpeg.org/developer.html#Library-public-interfaces
Rémi Denis-Courmont June 7, 2024, 6:11 p.m. UTC | #2
Le perjantaina 7. kesäkuuta 2024, 21.05.50 EEST marcus a écrit :
> On Friday, June 7th, 2024 at 11:49 AM, Rémi Denis-Courmont <remi@remlab.net> 
wrote:
> > Since the C11 support is required, those GCC versions can no longer be
> > supported anyhow.
> > ---
> > libavutil/x86/bswap.h | 13 ++-----------
> > 1 file changed, 2 insertions(+), 11 deletions(-)
> 
> Public headers are required to be C99 compatible.

Yes? And... ?
Andreas Rheinhardt June 7, 2024, 6:42 p.m. UTC | #3
marcus:
> 
> 
> 
> 
> 
> On Friday, June 7th, 2024 at 11:49 AM, Rémi Denis-Courmont <remi@remlab.net> wrote:
> 
>>
>>
>> Since the C11 support is required, those GCC versions can no longer be
>> supported anyhow.
>> ---
>> libavutil/x86/bswap.h | 13 ++-----------
>> 1 file changed, 2 insertions(+), 11 deletions(-)
> 
> Public headers are required to be C99 compatible.
> 
> `bswap.h` is a public header because it is in the `libavutil/Makefile`'s `HEADERS` variable.
> 

libavutil/bswap.h is public, libavutil/x86/bswap.h is not.

- Andreas
diff mbox series

Patch

diff --git a/libavutil/x86/bswap.h b/libavutil/x86/bswap.h
index b2f18b6c93..1ce9dcfc65 100644
--- a/libavutil/x86/bswap.h
+++ b/libavutil/x86/bswap.h
@@ -57,16 +57,7 @@  static inline uint64_t av_const av_bswap64(uint64_t x)
 
 #elif HAVE_INLINE_ASM
 
-#if AV_GCC_VERSION_AT_MOST(4,0)
-#define av_bswap16 av_bswap16
-static av_always_inline av_const unsigned av_bswap16(unsigned x)
-{
-    __asm__("rorw $8, %w0" : "+r"(x));
-    return x;
-}
-#endif /* AV_GCC_VERSION_AT_MOST(4,0) */
-
-#if AV_GCC_VERSION_AT_MOST(4,4) || defined(__INTEL_COMPILER)
+#ifdef __INTEL_COMPILER
 #define av_bswap32 av_bswap32
 static av_always_inline av_const uint32_t av_bswap32(uint32_t x)
 {
@@ -82,7 +73,7 @@  static inline uint64_t av_const av_bswap64(uint64_t x)
     return x;
 }
 #endif
-#endif /* AV_GCC_VERSION_AT_MOST(4,4) */
+#endif /* __INTEL_COMPILER */
 
 #endif /* HAVE_INLINE_ASM */
 #endif /* AVUTIL_X86_BSWAP_H */