[FFmpeg-devel] [PATCH 3/5] [inline assembly] prepares for mmx clobbers akin to xmm

Michael Niedermayer michael at niedermayer.cc
Thu Apr 23 00:18:09 EEST 2020


On Wed, Apr 22, 2020 at 07:49:16PM +0200, frederic.recoules at univ-grenoble-alpes.fr wrote:
> From: Frédéric Recoules <frederic.recoules at orange.fr>
> 
> ---
>  configure           |  4 ++++
>  libavutil/x86/asm.h | 20 ++++++++++++++++++++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/configure b/configure
> index 6533b43250..ddfea5ccfa 100755
> --- a/configure
> +++ b/configure
> @@ -2275,6 +2275,7 @@ TOOLCHAIN_FEATURES="
>      symver_gnu_asm
>      vfp_args
>      xform_asm
> +    mmx_clobbers
>      xmm_clobbers
>  "
>  
> @@ -5917,6 +5918,9 @@ EOF
>      check_inline_asm ebx_available '""::"b"(0)' &&
>          check_inline_asm ebx_available '"":::"%ebx"'
>  
> +    # check whether mmx clobbers are supported
> +    check_inline_asm mmx_clobbers '"":::"%mm0"'
> +
>      # check whether xmm clobbers are supported
>      check_inline_asm xmm_clobbers '"":::"%xmm0"'
>  
> diff --git a/libavutil/x86/asm.h b/libavutil/x86/asm.h
> index 9bff42d628..bb3c13f5c1 100644
> --- a/libavutil/x86/asm.h
> +++ b/libavutil/x86/asm.h
> @@ -79,6 +79,26 @@ typedef int x86_reg;
>  #    define BROKEN_RELOCATIONS 1
>  #endif
>  
> +/*
> + * If gcc is not set to support mmx (-mmmx) it will not accept mmx registers
> + * in the clobber list for inline asm. MMX_CLOBBERS takes a list of mmx
> + * registers to be marked as clobbered and evaluates to nothing if they are
> + * not supported, or to the list itself if they are supported. Since a clobber
> + * list may not be empty, XMM_CLOBBERS_ONLY should be used if the mmx
                            ^^^^
typo

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200422/1d7cf147/attachment.sig>


More information about the ffmpeg-devel mailing list