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") + ); }