diff mbox series

[FFmpeg-devel,1/2] avutil/x86/intreadwrite: Add ability to detect whether MMX code is used

Message ID AS8P250MB07444CED33F8E1BBAFF2E4F58F409@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 29c4c0886d143790fcbeddbe40a23dfc6f56345c
Headers show
Series [FFmpeg-devel,1/2] avutil/x86/intreadwrite: Add ability to detect whether MMX code is used | expand

Checks

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

Commit Message

Andreas Rheinhardt Sept. 8, 2022, 1:19 p.m. UTC
It can be used to call emms_c() only when needed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavutil/x86/intreadwrite.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Andreas Rheinhardt Sept. 9, 2022, 1:26 p.m. UTC | #1
Andreas Rheinhardt:
> It can be used to call emms_c() only when needed.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavutil/x86/intreadwrite.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavutil/x86/intreadwrite.h b/libavutil/x86/intreadwrite.h
> index 4061d19231..40f375b013 100644
> --- a/libavutil/x86/intreadwrite.h
> +++ b/libavutil/x86/intreadwrite.h
> @@ -29,6 +29,8 @@
>  
>  #if !HAVE_FAST_64BIT && defined(__MMX__)
>  
> +#define FF_COPY_SWAP_ZERO_USES_MMX
> +
>  #define AV_COPY64 AV_COPY64
>  static av_always_inline void AV_COPY64(void *d, const void *s)
>  {

Will apply this patchset tomorrow unless there are objections.

- Andreas
diff mbox series

Patch

diff --git a/libavutil/x86/intreadwrite.h b/libavutil/x86/intreadwrite.h
index 4061d19231..40f375b013 100644
--- a/libavutil/x86/intreadwrite.h
+++ b/libavutil/x86/intreadwrite.h
@@ -29,6 +29,8 @@ 
 
 #if !HAVE_FAST_64BIT && defined(__MMX__)
 
+#define FF_COPY_SWAP_ZERO_USES_MMX
+
 #define AV_COPY64 AV_COPY64
 static av_always_inline void AV_COPY64(void *d, const void *s)
 {