From patchwork Sat Apr 4 10:32:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?FR=C3=89D=C3=89RIC_RECOULES?= X-Patchwork-Id: 18634 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 95AD8448BCC for ; Sat, 4 Apr 2020 13:32:19 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7124C68B210; Sat, 4 Apr 2020 13:32:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from zm-mta-out-3.u-ga.fr (zm-mta-out-3.u-ga.fr [152.77.200.56]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C2800689E53 for ; Sat, 4 Apr 2020 13:32:13 +0300 (EEST) Received: from zm-mta-out.u-ga.fr (zm-mta-out.u-ga.fr [152.77.200.53]) by zm-mta-out-3.u-ga.fr (Postfix) with ESMTP id 4F78A41107; Sat, 4 Apr 2020 12:32:13 +0200 (CEST) Received: from zm-mbx06.u-ga.fr (zm-mbx06.u-ga.fr [152.77.200.20]) by zm-mta-out.u-ga.fr (Postfix) with ESMTP id 4897C807FA; Sat, 4 Apr 2020 12:32:13 +0200 (CEST) Date: Sat, 4 Apr 2020 12:32:13 +0200 (CEST) From: =?utf-8?b?RlLDiUTDiVJJQw==?= RECOULES To: ffmpeg-devel Message-ID: <993105619.3741455.1585996333278.JavaMail.zimbra@univ-grenoble-alpes.fr> MIME-Version: 1.0 X-Originating-IP: [46.193.2.18] X-Mailer: Zimbra 8.8.15_GA_3918 (ZimbraWebClient - FF72 (Linux)/8.8.15_GA_3895) Thread-Index: lQGg1N8vcT2dsjFAYgirzWQeFX19sA== Thread-Topic: x86 inline assembly compliance X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH 1/5] x86 inline assembly compliance X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Richard Bonichon , =?utf-8?q?S=C3=A9bastien?= Bardin Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" [inline assembly] prepares for contiguous assembly statements merging --- libavcodec/x86/inline_asm.h | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/libavcodec/x86/inline_asm.h b/libavcodec/x86/inline_asm.h index 0198746719..6ead73ac33 100644 --- a/libavcodec/x86/inline_asm.h +++ b/libavcodec/x86/inline_asm.h @@ -23,13 +23,15 @@ #include "constants.h" -#define MOVQ_WONE(regd) \ - __asm__ volatile ( \ - "pcmpeqd %%" #regd ", %%" #regd " \n\t" \ - "psrlw $15, %%" #regd ::) +#define MOVQ_WONE_TPL(regd) \ + "pcmpeqd %%"#regd", %%"#regd" \n\t" \ + "psrlw $15, %%" #regd" \n\t" +#define MOVQ_WONE(regd) __asm__ volatile (MOVQ_WONE_TPL(regd) ::) #define JUMPALIGN() __asm__ volatile (".p2align 3"::) -#define MOVQ_ZERO(regd) __asm__ volatile ("pxor %%"#regd", %%"#regd ::) + +#define MOVQ_ZERO_TPL(regd) "pxor %%"#regd", %%"#regd" \n\t" +#define MOVQ_ZERO(regd) __asm__ volatile (MOVQ_ZERO_TPL(regd) ::) #define MOVQ_BFE(regd) \ __asm__ volatile ( \ @@ -37,17 +39,20 @@ "paddb %%"#regd", %%"#regd" \n\t" ::) #ifndef PIC -#define MOVQ_WTWO(regd) __asm__ volatile ("movq %0, %%"#regd" \n\t" :: "m"(ff_pw_2)) +#define MOVQ_WTWO_TPL(regd) "movq %[ff_pw_2], %%"#regd" \n\t" +#define MOVQ_WTWO_IN [ff_pw_2] "m" (ff_pw_2) +#define COMMA_MOVQ_WTWO_IN , MOVQ_WTWO_IN #else // for shared library it's better to use this way for accessing constants // pcmpeqd -> -1 -#define MOVQ_WTWO(regd) \ - __asm__ volatile ( \ - "pcmpeqd %%"#regd", %%"#regd" \n\t" \ - "psrlw $15, %%"#regd" \n\t" \ - "psllw $1, %%"#regd" \n\t"::) - +#define MOVQ_WTWO_TPL(regd) \ + "pcmpeqd %%"#regd", %%"#regd" \n\t" \ + "psrlw $15, %%"#regd" \n\t" \ + "psllw $1, %%"#regd" \n\t" +#define MOVQ_WTWO_IN +#define COMMA_MOVQ_WTWO_IN #endif +#define MOVQ_WTWO(regd) __asm__ volatile (MOVQ_WTWO_TPL(regd) :: MOVQ_WTWO_IN) // using regr as temporary and for the output result // first argument is unmodified and second is trashed From patchwork Sat Apr 4 10:33:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?FR=C3=89D=C3=89RIC_RECOULES?= X-Patchwork-Id: 18635 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id C5BF0448C59 for ; Sat, 4 Apr 2020 13:33:59 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9D4C768B20F; Sat, 4 Apr 2020 13:33:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from zm-mta-out-3.u-ga.fr (zm-mta-out-3.u-ga.fr [152.77.200.56]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9F0D8689C58 for ; Sat, 4 Apr 2020 13:33:53 +0300 (EEST) Received: from zm-mta-out.u-ga.fr (zm-mta-out.u-ga.fr [152.77.200.53]) by zm-mta-out-3.u-ga.fr (Postfix) with ESMTP id 2A7D540FE4; Sat, 4 Apr 2020 12:33:53 +0200 (CEST) Received: from zm-mbx06.u-ga.fr (zm-mbx06.u-ga.fr [152.77.200.20]) by zm-mta-out.u-ga.fr (Postfix) with ESMTP id 24F66807FA; Sat, 4 Apr 2020 12:33:53 +0200 (CEST) Date: Sat, 4 Apr 2020 12:33:53 +0200 (CEST) From: =?utf-8?b?RlLDiUTDiVJJQw==?= RECOULES To: ffmpeg-devel Message-ID: <1941150656.3741620.1585996433124.JavaMail.zimbra@univ-grenoble-alpes.fr> MIME-Version: 1.0 X-Originating-IP: [46.193.2.18] X-Mailer: Zimbra 8.8.15_GA_3918 (ZimbraWebClient - FF72 (Linux)/8.8.15_GA_3895) Thread-Index: LCPPifz1nU0ZDPUQdqBM/DS0+RLOgQ== Thread-Topic: x86 inline assembly compliance X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH 2/5] x86 inline assembly compliance X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Richard Bonichon , =?utf-8?q?S=C3=A9bastien?= Bardin Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" [inline assembly] merges contiguous assembly statements --- libavcodec/x86/hpeldsp_init.c | 8 ++++++++ libavcodec/x86/rnd_template.c | 14 +++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/libavcodec/x86/hpeldsp_init.c b/libavcodec/x86/hpeldsp_init.c index d89928cec6..c99513035b 100644 --- a/libavcodec/x86/hpeldsp_init.c +++ b/libavcodec/x86/hpeldsp_init.c @@ -95,6 +95,8 @@ void ff_avg_approx_pixels8_xy2_3dnow(uint8_t *block, const uint8_t *pixels, /* MMX no rounding */ #define DEF(x, y) x ## _no_rnd_ ## y ## _mmx #define SET_RND MOVQ_WONE +#define SET_RND_TPL MOVQ_WONE_TPL +#define COMMA_SET_RND_IN #define PAVGBP(a, b, c, d, e, f) PAVGBP_MMX_NO_RND(a, b, c, d, e, f) #define PAVGB(a, b, c, e) PAVGB_MMX_NO_RND(a, b, c, e) #define STATIC static @@ -104,6 +106,8 @@ void ff_avg_approx_pixels8_xy2_3dnow(uint8_t *block, const uint8_t *pixels, #undef DEF #undef SET_RND +#undef SET_RND_TPL +#undef COMMA_SET_RND_IN #undef PAVGBP #undef PAVGB #undef STATIC @@ -121,6 +125,8 @@ CALL_2X_PIXELS(put_no_rnd_pixels16_xy2_mmx, put_no_rnd_pixels8_xy2_mmx, 8) #define DEF(x, y) x ## _ ## y ## _mmx #define SET_RND MOVQ_WTWO +#define SET_RND_TPL MOVQ_WTWO_TPL +#define COMMA_SET_RND_IN COMMA_MOVQ_WTWO_IN #define PAVGBP(a, b, c, d, e, f) PAVGBP_MMX(a, b, c, d, e, f) #define PAVGB(a, b, c, e) PAVGB_MMX(a, b, c, e) @@ -134,6 +140,8 @@ CALL_2X_PIXELS(put_no_rnd_pixels16_xy2_mmx, put_no_rnd_pixels8_xy2_mmx, 8) #undef DEF #undef SET_RND +#undef SET_RND_TPL +#undef COMMA_SET_RND_IN #undef PAVGBP #undef PAVGB diff --git a/libavcodec/x86/rnd_template.c b/libavcodec/x86/rnd_template.c index 09946bd23f..a98fbc10ab 100644 --- a/libavcodec/x86/rnd_template.c +++ b/libavcodec/x86/rnd_template.c @@ -33,9 +33,9 @@ av_unused STATIC void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h) { - MOVQ_ZERO(mm7); - SET_RND(mm6); // =2 for rnd and =1 for no_rnd version __asm__ volatile( + MOVQ_ZERO_TPL(mm7) + SET_RND_TPL(mm6) // =2 for rnd and =1 for no_rnd version "movq (%1), %%mm0 \n\t" "movq 1(%1), %%mm4 \n\t" "movq %%mm0, %%mm1 \n\t" @@ -93,7 +93,7 @@ av_unused STATIC void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixel "subl $2, %0 \n\t" "jnz 1b \n\t" :"+g"(h), "+S"(pixels) - :"D"(block), "r"((x86_reg)line_size) + :"D"(block), "r"((x86_reg)line_size) COMMA_SET_RND_IN :FF_REG_a, "memory"); } @@ -102,10 +102,10 @@ av_unused STATIC void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixel av_unused STATIC void DEF(avg, pixels8_xy2)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h) { - MOVQ_ZERO(mm7); - SET_RND(mm6); // =2 for rnd and =1 for no_rnd version __asm__ volatile( - "movq (%1), %%mm0 \n\t" + MOVQ_ZERO_TPL(mm7) + SET_RND_TPL(mm6) // =2 for rnd and =1 for no_rnd version + "movq (%1), %%mm0 \n\t" "movq 1(%1), %%mm4 \n\t" "movq %%mm0, %%mm1 \n\t" "movq %%mm4, %%mm5 \n\t" @@ -170,6 +170,6 @@ av_unused STATIC void DEF(avg, pixels8_xy2)(uint8_t *block, const uint8_t *pixel "subl $2, %0 \n\t" "jnz 1b \n\t" :"+g"(h), "+S"(pixels) - :"D"(block), "r"((x86_reg)line_size) + :"D"(block), "r"((x86_reg)line_size) COMMA_SET_RND_IN :FF_REG_a, "memory"); } From patchwork Sat Apr 4 10:35:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?FR=C3=89D=C3=89RIC_RECOULES?= X-Patchwork-Id: 18636 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 75D0244AD8E for ; Sat, 4 Apr 2020 13:35:19 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5F9F768B21B; Sat, 4 Apr 2020 13:35:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from zm-mta-out-3.u-ga.fr (zm-mta-out-3.u-ga.fr [152.77.200.56]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5BABA6880C1 for ; Sat, 4 Apr 2020 13:35:13 +0300 (EEST) Received: from zm-mta-out.u-ga.fr (zm-mta-out.u-ga.fr [152.77.200.53]) by zm-mta-out-3.u-ga.fr (Postfix) with ESMTP id E819041101; Sat, 4 Apr 2020 12:35:12 +0200 (CEST) Received: from zm-mbx06.u-ga.fr (zm-mbx06.u-ga.fr [152.77.200.20]) by zm-mta-out.u-ga.fr (Postfix) with ESMTP id E2496807FA; Sat, 4 Apr 2020 12:35:12 +0200 (CEST) Date: Sat, 4 Apr 2020 12:35:12 +0200 (CEST) From: =?utf-8?b?RlLDiUTDiVJJQw==?= RECOULES To: ffmpeg-devel Message-ID: <674565797.3741845.1585996512903.JavaMail.zimbra@univ-grenoble-alpes.fr> MIME-Version: 1.0 X-Originating-IP: [46.193.2.18] X-Mailer: Zimbra 8.8.15_GA_3918 (ZimbraWebClient - FF72 (Linux)/8.8.15_GA_3895) Thread-Index: eyOG/SAlMZgyzm7C2MDNaKx8XUqkZA== Thread-Topic: x86 inline assembly compliance X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH 3/5] x86 inline assembly compliance X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Richard Bonichon , =?utf-8?q?S=C3=A9bastien?= Bardin Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" [inline assembly] prepares for mmx clobbers akin to xmm --- configure | 4 ++++ libavutil/x86/asm.h | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/configure b/configure index 5fe9950e20..4062ca095a 100755 --- a/configure +++ b/configure @@ -2275,6 +2275,7 @@ TOOLCHAIN_FEATURES=" symver_gnu_asm vfp_args xform_asm + mmx_clobbers xmm_clobbers " @@ -5907,6 +5908,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 + * registers are the only in the clobber list. + * For example a list with "eax" and "mm0" as clobbers should become: + * : MMX_CLOBBERS("mm0",) "eax" + * and a list with only "mm0" should become: + * MMX_CLOBBERS_ONLY("mm0") + */ +#if HAVE_MMX_CLOBBERS +# define MMX_CLOBBERS(...) __VA_ARGS__ +# define MMX_CLOBBERS_ONLY(...) : __VA_ARGS__ +#else +# define MMX_CLOBBERS(...) +# define MMX_CLOBBERS_ONLY(...) +#endif + /* * If gcc is not set to support sse (-msse) it will not accept xmm registers * in the clobber list for inline asm. XMM_CLOBBERS takes a list of xmm From patchwork Sat Apr 4 10:36:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?FR=C3=89D=C3=89RIC_RECOULES?= X-Patchwork-Id: 18637 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 6A5A944A2FD for ; Sat, 4 Apr 2020 13:36:35 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4FB1868B237; Sat, 4 Apr 2020 13:36:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from zm-mta-out-3.u-ga.fr (zm-mta-out-3.u-ga.fr [152.77.200.56]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4731068B1B9 for ; Sat, 4 Apr 2020 13:36:29 +0300 (EEST) Received: from zm-mta-out.u-ga.fr (zm-mta-out.u-ga.fr [152.77.200.53]) by zm-mta-out-3.u-ga.fr (Postfix) with ESMTP id D2FEB41103; Sat, 4 Apr 2020 12:36:28 +0200 (CEST) Received: from zm-mbx06.u-ga.fr (zm-mbx06.u-ga.fr [152.77.200.20]) by zm-mta-out.u-ga.fr (Postfix) with ESMTP id CD9B1807FA; Sat, 4 Apr 2020 12:36:28 +0200 (CEST) Date: Sat, 4 Apr 2020 12:36:28 +0200 (CEST) From: =?utf-8?b?RlLDiUTDiVJJQw==?= RECOULES To: ffmpeg-devel Message-ID: <1451672312.3742139.1585996588820.JavaMail.zimbra@univ-grenoble-alpes.fr> MIME-Version: 1.0 X-Originating-IP: [46.193.2.18] X-Mailer: Zimbra 8.8.15_GA_3918 (ZimbraWebClient - FF72 (Linux)/8.8.15_GA_3895) Thread-Index: Q+YJyfDzERdG95E93usYtv+DDLfDsA== Thread-Topic: x86 inline assembly compliance X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH 4/5] x86 inline assembly compliance X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Richard Bonichon , =?utf-8?q?S=C3=A9bastien?= Bardin Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" [inline assembly] add mmx clobbers in 3 statements - 1 in lossless_videoencdsp_init.c - 2 in rnd_template.c --- libavcodec/x86/lossless_videoencdsp_init.c | 4 +++- libavcodec/x86/rnd_template.c | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libavcodec/x86/lossless_videoencdsp_init.c b/libavcodec/x86/lossless_videoencdsp_init.c index 40407add52..fb481e66f5 100644 --- a/libavcodec/x86/lossless_videoencdsp_init.c +++ b/libavcodec/x86/lossless_videoencdsp_init.c @@ -70,7 +70,9 @@ static void sub_median_pred_mmxext(uint8_t *dst, const uint8_t *src1, "cmp %4, %0 \n\t" " jb 1b \n\t" : "+r" (i) - : "r" (src1), "r" (src2), "r" (dst), "r" ((x86_reg) w)); + : "r" (src1), "r" (src2), "r" (dst), "r" ((x86_reg) w) + : MMX_CLOBBERS("mm0", "mm1", "mm2", "mm3", "mm4", "mm5") + ); l = *left; lt = *left_top; diff --git a/libavcodec/x86/rnd_template.c b/libavcodec/x86/rnd_template.c index a98fbc10ab..013aa1a645 100644 --- a/libavcodec/x86/rnd_template.c +++ b/libavcodec/x86/rnd_template.c @@ -94,7 +94,9 @@ av_unused STATIC void DEF(put, pixels8_xy2)(uint8_t *block, const uint8_t *pixel "jnz 1b \n\t" :"+g"(h), "+S"(pixels) :"D"(block), "r"((x86_reg)line_size) COMMA_SET_RND_IN - :FF_REG_a, "memory"); + :FF_REG_a, "memory" + MMX_CLOBBERS(, "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7") + ); } // avg_pixels @@ -171,5 +173,7 @@ av_unused STATIC void DEF(avg, pixels8_xy2)(uint8_t *block, const uint8_t *pixel "jnz 1b \n\t" :"+g"(h), "+S"(pixels) :"D"(block), "r"((x86_reg)line_size) COMMA_SET_RND_IN - :FF_REG_a, "memory"); + :FF_REG_a, "memory" + MMX_CLOBBERS(, "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7") + ); } From patchwork Sat Apr 4 10:37:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?FR=C3=89D=C3=89RIC_RECOULES?= X-Patchwork-Id: 18638 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 3965744A7E1 for ; Sat, 4 Apr 2020 13:37:44 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 27B4368B287; Sat, 4 Apr 2020 13:37:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from zm-mta-out-3.u-ga.fr (zm-mta-out-3.u-ga.fr [152.77.200.56]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6EFAA68B213 for ; Sat, 4 Apr 2020 13:37:37 +0300 (EEST) Received: from zm-mta-out.u-ga.fr (zm-mta-out.u-ga.fr [152.77.200.53]) by zm-mta-out-3.u-ga.fr (Postfix) with ESMTP id 0540841107; Sat, 4 Apr 2020 12:37:37 +0200 (CEST) Received: from zm-mbx06.u-ga.fr (zm-mbx06.u-ga.fr [152.77.200.20]) by zm-mta-out.u-ga.fr (Postfix) with ESMTP id F3C41807FA; Sat, 4 Apr 2020 12:37:36 +0200 (CEST) Date: Sat, 4 Apr 2020 12:37:36 +0200 (CEST) From: =?utf-8?b?RlLDiUTDiVJJQw==?= RECOULES To: ffmpeg-devel Message-ID: <1766257160.3742376.1585996656983.JavaMail.zimbra@univ-grenoble-alpes.fr> MIME-Version: 1.0 X-Originating-IP: [46.193.2.18] X-Mailer: Zimbra 8.8.15_GA_3918 (ZimbraWebClient - FF72 (Linux)/8.8.15_GA_3895) Thread-Index: /ALjl4bRPfNa4n4ltuAX879HlPX6aw== Thread-Topic: x86 inline assembly compliance X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH 5/5] x86 inline assembly compliance X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Richard Bonichon , =?utf-8?q?S=C3=A9bastien?= Bardin Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" [inline assembly] add "memory" to sub_median_pred_mmxext --- libavcodec/x86/lossless_videoencdsp_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/x86/lossless_videoencdsp_init.c b/libavcodec/x86/lossless_videoencdsp_init.c index fb481e66f5..feb6874f94 100644 --- a/libavcodec/x86/lossless_videoencdsp_init.c +++ b/libavcodec/x86/lossless_videoencdsp_init.c @@ -71,7 +71,7 @@ static void sub_median_pred_mmxext(uint8_t *dst, const uint8_t *src1, " jb 1b \n\t" : "+r" (i) : "r" (src1), "r" (src2), "r" (dst), "r" ((x86_reg) w) - : MMX_CLOBBERS("mm0", "mm1", "mm2", "mm3", "mm4", "mm5") + : MMX_CLOBBERS("mm0", "mm1", "mm2", "mm3", "mm4", "mm5",) "memory" ); l = *left;