From patchwork Sat Jul 18 15:35:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 21178 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 E9B0B446A6B for ; Sat, 18 Jul 2020 18:37:26 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D079468B7C5; Sat, 18 Jul 2020 18:37:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay3.mymailcheap.com (relay3.mymailcheap.com [217.182.119.155]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BA61368B7C3 for ; Sat, 18 Jul 2020 18:37:25 +0300 (EEST) Received: from filter1.mymailcheap.com (filter1.mymailcheap.com [149.56.130.247]) by relay3.mymailcheap.com (Postfix) with ESMTPS id DAB673F207 for ; Sat, 18 Jul 2020 17:37:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by filter1.mymailcheap.com (Postfix) with ESMTP id 172AB2A3B3 for ; Sat, 18 Jul 2020 11:37:24 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1595086644; bh=kPf1Pe2DTDcOGr8xZ/TySsU9PfJSEkGx08wyLE5uZSY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HrjOzMcJhZFEAQOfC0iBqAaGhWhu41krkZRtHU+1/LFu9zEhbhtiyfoax+kqmgvu+ nIUvRTgZRNBtUAeK5F71jZ8HkX+5PFq/h2/lJQEXriZ588I2KU0WRrKUSXD89xajTC qrJk8iky8C6+A9NSolYVs95teVwVnKr3rFNaD14o= X-Virus-Scanned: Debian amavisd-new at filter1.mymailcheap.com Received: from filter1.mymailcheap.com ([127.0.0.1]) by localhost (filter1.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rx-NrC8sb5zY for ; Sat, 18 Jul 2020 11:37:23 -0400 (EDT) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter1.mymailcheap.com (Postfix) with ESMTPS for ; Sat, 18 Jul 2020 11:37:22 -0400 (EDT) Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83]) by mail20.mymailcheap.com (Postfix) with ESMTP id 1B8F840139; Sat, 18 Jul 2020 15:37:22 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.b="eBrh03FW"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from strike.202.net.flygoat.com (unknown [115.227.167.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id 2ECF240139; Sat, 18 Jul 2020 15:37:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=default; t=1595086633; bh=kPf1Pe2DTDcOGr8xZ/TySsU9PfJSEkGx08wyLE5uZSY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eBrh03FWJT1uDMJJgoq9dQmyUtIcWj6SUOoykRT0syEitAKuS7xjSD5eicBpFe9ZS jVaNfoLhM74RF01ZKf0bQNdXvw+pdpI4BrwXItVUHwBfZgXfIYAUqjAGIBASdGeGb4 dhyWaQt6YU2sSkdt1AtkgBPrsq7kJdx4M96x8aoE= From: Jiaxun Yang To: ffmpeg-devel@ffmpeg.org Date: Sat, 18 Jul 2020 23:35:42 +0800 Message-Id: <20200718153542.6434-7-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200718153542.6434-1-jiaxun.yang@flygoat.com> References: <20200718153542.6434-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 1B8F840139 X-Spamd-Result: default: False [0.90 / 10.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(0.00)[flygoat.com:s=default]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_SOFTFAIL(0.00)[~all:c]; ML_SERVERS(-3.10)[213.133.102.83]; DKIM_TRACE(0.00)[flygoat.com:+]; RCPT_COUNT_TWO(0.00)[2]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[213.133.102.83:from]; DMARC_POLICY_ALLOW(0.00)[flygoat.com,none]; DMARC_POLICY_ALLOW_WITH_FAILURES(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE]; RCVD_COUNT_TWO(0.00)[2]; HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1] X-Rspamd-Server: mail20.mymailcheap.com Subject: [FFmpeg-devel] [PATCH v6 6/6] libavcodec: MIPS: MMI: Move sp out of the clobber list 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: Jiaxun Yang Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" GCC complains: warning: listing the stack pointer register ‘$29’ in a clobber list is deprecated [-Wdeprecated] Actually stack pointer was restored at the end of the inline assembly so there is no reason to add it to the clobber list. Also use $sp insted of $29 to make our intention much more clear. Signed-off-by: Jiaxun Yang --- libavcodec/mips/h264dsp_mmi.c | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/libavcodec/mips/h264dsp_mmi.c b/libavcodec/mips/h264dsp_mmi.c index d3bd472599..173e191c77 100644 --- a/libavcodec/mips/h264dsp_mmi.c +++ b/libavcodec/mips/h264dsp_mmi.c @@ -177,7 +177,7 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) __asm__ volatile ( "lhu %[tmp0], 0x00(%[block]) \n\t" - PTR_ADDI "$29, $29, -0x20 \n\t" + PTR_ADDI "$sp, $sp, -0x20 \n\t" PTR_ADDIU "%[tmp0], %[tmp0], 0x20 \n\t" MMI_LDC1(%[ftmp1], %[block], 0x10) "sh %[tmp0], 0x00(%[block]) \n\t" @@ -254,8 +254,8 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) "punpckhwd %[ftmp3], %[ftmp6], %[ftmp0] \n\t" "punpcklwd %[ftmp6], %[ftmp6], %[ftmp0] \n\t" MMI_LDC1(%[ftmp0], %[block], 0x00) - MMI_SDC1(%[ftmp7], $29, 0x00) - MMI_SDC1(%[ftmp1], $29, 0x10) + MMI_SDC1(%[ftmp7], $sp, 0x00) + MMI_SDC1(%[ftmp1], $sp, 0x10) "dmfc1 %[tmp1], %[ftmp6] \n\t" "dmfc1 %[tmp3], %[ftmp3] \n\t" "punpckhhw %[ftmp3], %[ftmp5], %[ftmp2] \n\t" @@ -266,8 +266,8 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) "punpcklwd %[ftmp5], %[ftmp5], %[ftmp4] \n\t" "punpckhwd %[ftmp4], %[ftmp3], %[ftmp2] \n\t" "punpcklwd %[ftmp3], %[ftmp3], %[ftmp2] \n\t" - MMI_SDC1(%[ftmp5], $29, 0x08) - MMI_SDC1(%[ftmp0], $29, 0x18) + MMI_SDC1(%[ftmp5], $sp, 0x08) + MMI_SDC1(%[ftmp0], $sp, 0x18) "dmfc1 %[tmp2], %[ftmp3] \n\t" "dmfc1 %[tmp4], %[ftmp4] \n\t" MMI_LDC1(%[ftmp1], %[block], 0x18) @@ -359,7 +359,7 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) PTR_ADDIU "%[addr0], %[dst], 0x04 \n\t" "mov.d %[ftmp7], %[ftmp10] \n\t" "dmtc1 %[tmp3], %[ftmp6] \n\t" - MMI_LDC1(%[ftmp1], $29, 0x10) + MMI_LDC1(%[ftmp1], $sp, 0x10) "dmtc1 %[tmp1], %[ftmp3] \n\t" "mov.d %[ftmp4], %[ftmp1] \n\t" "psrah %[ftmp1], %[ftmp1], %[ftmp8] \n\t" @@ -392,7 +392,7 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) "psrah %[ftmp0], %[ftmp3], %[ftmp8] \n\t" "paddh %[ftmp2], %[ftmp2], %[ftmp3] \n\t" "psubh %[ftmp0], %[ftmp0], %[ftmp7] \n\t" - MMI_LDC1(%[ftmp3], $29, 0x00) + MMI_LDC1(%[ftmp3], $sp, 0x00) "dmtc1 %[tmp5], %[ftmp7] \n\t" "paddh %[ftmp7], %[ftmp7], %[ftmp3] \n\t" "paddh %[ftmp3], %[ftmp3], %[ftmp3] \n\t" @@ -414,9 +414,9 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) "paddh %[ftmp1], %[ftmp1], %[ftmp7] \n\t" "psubh %[ftmp3], %[ftmp3], %[ftmp6] \n\t" "paddh %[ftmp7], %[ftmp7], %[ftmp7] \n\t" - MMI_SDC1(%[ftmp3], $29, 0x00) + MMI_SDC1(%[ftmp3], $sp, 0x00) "psubh %[ftmp7], %[ftmp7], %[ftmp1] \n\t" - MMI_SDC1(%[ftmp0], $29, 0x10) + MMI_SDC1(%[ftmp0], $sp, 0x10) "dmfc1 %[tmp1], %[ftmp2] \n\t" "xor %[ftmp2], %[ftmp2], %[ftmp2] \n\t" MMI_SDC1(%[ftmp2], %[block], 0x00) @@ -463,8 +463,8 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) "packushb %[ftmp0], %[ftmp0], %[ftmp2] \n\t" MMI_SWC1(%[ftmp3], %[dst], 0x00) MMI_SWXC1(%[ftmp0], %[dst], %[stride], 0x00) - MMI_LDC1(%[ftmp5], $29, 0x00) - MMI_LDC1(%[ftmp4], $29, 0x10) + MMI_LDC1(%[ftmp5], $sp, 0x00) + MMI_LDC1(%[ftmp4], $sp, 0x10) "dmtc1 %[tmp1], %[ftmp6] \n\t" PTR_ADDU "%[dst], %[dst], %[stride] \n\t" PTR_ADDU "%[dst], %[dst], %[stride] \n\t" @@ -496,7 +496,7 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) MMI_SWXC1(%[ftmp0], %[dst], %[stride], 0x00) "dmtc1 %[tmp4], %[ftmp1] \n\t" "dmtc1 %[tmp2], %[ftmp6] \n\t" - MMI_LDC1(%[ftmp4], $29, 0x18) + MMI_LDC1(%[ftmp4], $sp, 0x18) "mov.d %[ftmp5], %[ftmp4] \n\t" "psrah %[ftmp4], %[ftmp4], %[ftmp8] \n\t" "psrah %[ftmp7], %[ftmp11], %[ftmp8] \n\t" @@ -528,7 +528,7 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) "psrah %[ftmp7], %[ftmp6], %[ftmp8] \n\t" "paddh %[ftmp0], %[ftmp0], %[ftmp6] \n\t" "psubh %[ftmp7], %[ftmp7], %[ftmp3] \n\t" - MMI_LDC1(%[ftmp6], $29, 0x08) + MMI_LDC1(%[ftmp6], $sp, 0x08) "dmtc1 %[tmp6], %[ftmp3] \n\t" "paddh %[ftmp3], %[ftmp3], %[ftmp6] \n\t" "paddh %[ftmp6], %[ftmp6], %[ftmp6] \n\t" @@ -550,9 +550,9 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) "paddh %[ftmp4], %[ftmp4], %[ftmp3] \n\t" "psubh %[ftmp6], %[ftmp6], %[ftmp1] \n\t" "paddh %[ftmp3], %[ftmp3], %[ftmp3] \n\t" - MMI_SDC1(%[ftmp6], $29, 0x08) + MMI_SDC1(%[ftmp6], $sp, 0x08) "psubh %[ftmp3], %[ftmp3], %[ftmp4] \n\t" - MMI_SDC1(%[ftmp7], $29, 0x18) + MMI_SDC1(%[ftmp7], $sp, 0x18) "dmfc1 %[tmp2], %[ftmp0] \n\t" "xor %[ftmp0], %[ftmp0], %[ftmp0] \n\t" MMI_ULWC1(%[ftmp6], %[addr0], 0x00) @@ -581,8 +581,8 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) "packushb %[ftmp7], %[ftmp7], %[ftmp0] \n\t" MMI_SWC1(%[ftmp6], %[addr0], 0x00) MMI_SWXC1(%[ftmp7], %[addr0], %[stride], 0x00) - MMI_LDC1(%[ftmp2], $29, 0x08) - MMI_LDC1(%[ftmp5], $29, 0x18) + MMI_LDC1(%[ftmp2], $sp, 0x08) + MMI_LDC1(%[ftmp5], $sp, 0x18) PTR_ADDU "%[addr0], %[addr0], %[stride] \n\t" "dmtc1 %[tmp2], %[ftmp1] \n\t" PTR_ADDU "%[addr0], %[addr0], %[stride] \n\t" @@ -612,7 +612,7 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) "packushb %[ftmp7], %[ftmp7], %[ftmp0] \n\t" MMI_SWC1(%[ftmp6], %[addr0], 0x00) MMI_SWXC1(%[ftmp7], %[addr0], %[stride], 0x00) - PTR_ADDIU "$29, $29, 0x20 \n\t" + PTR_ADDIU "$sp, $sp, 0x20 \n\t" : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]), [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]), [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]), @@ -630,7 +630,7 @@ void ff_h264_idct8_add_8_mmi(uint8_t *dst, int16_t *block, int stride) [addr0]"=&r"(addr[0]) : [dst]"r"(dst), [block]"r"(block), [stride]"r"((mips_reg)stride) - : "$29","memory" + : "memory" ); }