From patchwork Thu Sep 6 08:10:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shiyou Yin X-Patchwork-Id: 10246 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:12c4:0:0:0:0:0 with SMTP id 65-v6csp207560jap; Thu, 6 Sep 2018 01:11:09 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYfWDLf8mH3sUS8vbjYZI/QTpqTDO39egqLF3yCzqCSoh+SThtgE6PMyHehEz8uDD6xr4Sx X-Received: by 2002:a1c:480a:: with SMTP id v10-v6mr1248804wma.161.1536221468755; Thu, 06 Sep 2018 01:11:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536221468; cv=none; d=google.com; s=arc-20160816; b=kFAInhg4imkud8j3yjP7l2svV2v6HXjButQkq3dOrspxWTDBVicU8aQTE7e3SLulc5 3GsXcddH1SgV9lMCLXQGf4uzmyz2kouIzk/2Mi9TK91cU97mHQv44PsWUbdf0/VyY+1H PgPTf2nf8TSTs34qD9p+g4q5n+nP6xVvN4nzYfdBtFBSD7zIyQrPJz79tMRAX1QANcQn yFdcL4uGlM/bNk6S4KltE6shk4FHDECkXWcrgTme50VbG7mDKpRwpHAYws/7KD19QtMI z+TXe3V23qFJpy/eAfkzyE/admZ0xZNYGRAJ61DhjMGYwMomCeT1vfPJr5okTxcOaiuu k4zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to; bh=PEV7oS2k4ANhNzYxAkDgdJK8u48kDgbMNeFKM6aXuNw=; b=VKmWKZy50hzIUMzBn/kLj0tx2O5OwUBk2sg/8WUqYJJcqvGkzqjrFsb43vRGq5Iqe4 Qg2000A00Z64k9hpngLpTcNJcu+fk6HVdsbiLbVyDhwMzi3t+eYtFdsAYPDFcKxGlbI9 WfFV+ZUL7dSGt3MejAcuMspK//ilMD8Npt73thc2adkYn0KeTC8Y0wl/cRGsDnoLQIS5 2UzzBrWxarzGfRPFNwngP+QhH8etMFjnVufB9TJnfTddRtYyeQ7gFqyxn08lUUo4Q7YJ gPUDtOO6OX+1N5WBb3H6h51ZMwVprhHZdijifCSEGgEr8wEPVaHwdOyrlksb7MHMy4d/ DI8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m1-v6si3741983wmb.20.2018.09.06.01.11.07; Thu, 06 Sep 2018 01:11:08 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A1221689F89; Thu, 6 Sep 2018 11:10:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 77759689F50 for ; Thu, 6 Sep 2018 11:10:50 +0300 (EEST) Received: from localhost (unknown [210.45.123.188]) by mail (Coremail) with SMTP id QMiowPCxGeTu4JBbS9QPAA--.63264S3; Thu, 06 Sep 2018 16:10:23 +0800 (CST) From: Shiyou Yin To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Sep 2018 16:10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IcVC2z280aVAFwI0_Jr0_Gr1lIxAI cVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWIevJa73UjIFyTuYvjxUx4SoDUUUU X-CM-SenderInfo: p1lq2x5l1r3gtki6z05rqj20fqof0/ Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/mips: [loongson] fix improper use of register constraints. 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Constraint "g" means compiler can store variable in memory or register. When we use constraint "g" for a variable and this variable was operated by instruction which only support register operands may lead "invalid operands" error. --- libavcodec/mips/vc1dsp_mmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/mips/vc1dsp_mmi.c b/libavcodec/mips/vc1dsp_mmi.c index d78e0c3..a439b40 100644 --- a/libavcodec/mips/vc1dsp_mmi.c +++ b/libavcodec/mips/vc1dsp_mmi.c @@ -1857,8 +1857,8 @@ static void OPNAME ## vc1_shift2_mmi(uint8_t *dst, const uint8_t *src, \ : RESTRICT_ASM_LOW32 RESTRICT_ASM_ADDRT \ [src]"+r"(src), [dst]"+r"(dst) \ : [offset]"r"(offset), [offset_x2n]"r"(-2*offset), \ - [stride]"g"(stride), [rnd]"m"(rnd), \ - [stride1]"g"(stride-offset), \ + [stride]"r"(stride), [rnd]"m"(rnd), \ + [stride1]"r"(stride-offset), \ [ff_pw_9]"m"(ff_pw_9) \ : "$8", "$9", "$10", "$f0", "$f2", "$f4", "$f6", "$f8", "$f10", \ "$f12", "$f14", "$f16", "memory" \ @@ -2082,7 +2082,7 @@ OPNAME ## vc1_## NAME ## _mmi(uint8_t *dst, const uint8_t *src, \ [h]"+r"(h), \ [src]"+r"(src), [dst]"+r"(dst) \ : [offset_x1]"r"(offset), [offset_x2]"r"(2*offset), \ - [offset_x3]"r"(3*offset), [stride]"g"(stride), \ + [offset_x3]"r"(3*offset), [stride]"r"(stride), \ [rnd]"m"(rnd), \ [ff_pw_53]"m"(ff_pw_53), [ff_pw_18]"m"(ff_pw_18), \ [ff_pw_3]"f"(ff_pw_3) \