summaryrefslogtreecommitdiff
path: root/libavcodec/mips
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2020-07-18 23:35:42 +0800
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-23 17:21:58 +0200
commit24911b92444f6cc7b63782987b5b05198e0e4fdf (patch)
treeb53f741a96baad1fac08e82cfe2a166210e06e50 /libavcodec/mips
parent7a7ed1699c3b08d23ed5ab4955544f146e88b59b (diff)
libavcodec: MIPS: MMI: Move sp out of the clobber list
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 <jiaxun.yang@flygoat.com> Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mips')
-rw-r--r--libavcodec/mips/h264dsp_mmi.c38
1 files 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"
);
}