diff options
author | James Cowgill <james410@cowgill.org.uk> | 2015-03-05 17:40:15 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-06 14:37:44 +0100 |
commit | 157d6f0d5b95261bf053566d8a1c2652387da30c (patch) | |
tree | ca481834165a1f3c103eea9dc50fd5e877bbcbde /libavcodec/mips/fmtconvert_mips.c | |
parent | eae13eae9d6499e81cd77bcd9e13f7bcb31b5577 (diff) | |
download | ffmpeg-157d6f0d5b95261bf053566d8a1c2652387da30c.tar.gz |
mips: port optimizations to mips n64
This mainly consists of replacing all the pointer arithmatic 'addiu'
instructions with PTR_ADDIU which will handle the differences in pointer
sizes when compiled on 64 bit mips systems.
The header asmdefs.h contains the PTR_ macros which expend to the correct mips
instructions to manipulate registers containing pointers.
Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Reviewed-by: Nedeljko Babic <Nedeljko.Babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mips/fmtconvert_mips.c')
-rw-r--r-- | libavcodec/mips/fmtconvert_mips.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mips/fmtconvert_mips.c b/libavcodec/mips/fmtconvert_mips.c index a785c9eea3..990958402c 100644 --- a/libavcodec/mips/fmtconvert_mips.c +++ b/libavcodec/mips/fmtconvert_mips.c @@ -50,9 +50,9 @@ #include "config.h" #include "libavcodec/avcodec.h" #include "libavcodec/fmtconvert.h" +#include "libavutil/mips/asmdefs.h" #if HAVE_INLINE_ASM - static void int32_to_float_fmul_scalar_mips(float *dst, const int *src, float mul, int len) { @@ -86,7 +86,7 @@ static void int32_to_float_fmul_scalar_mips(float *dst, const int *src, "mtc1 %[rpom12], %[temp13] \n\t" "mtc1 %[rpom22], %[temp15] \n\t" - "addiu %[src], 32 \n\t" + PTR_ADDIU "%[src], 32 \n\t" "cvt.s.w %[temp1], %[temp1] \n\t" "cvt.s.w %[temp3], %[temp3] \n\t" "cvt.s.w %[temp5], %[temp5] \n\t" @@ -116,7 +116,7 @@ static void int32_to_float_fmul_scalar_mips(float *dst, const int *src, "swc1 %[temp11], 20(%[dst]) \n\t" /*dst[i+5] = src[i+5] * mul;*/ "swc1 %[temp13], 24(%[dst]) \n\t" /*dst[i+6] = src[i+6] * mul;*/ "swc1 %[temp15], 28(%[dst]) \n\t" /*dst[i+7] = src[i+7] * mul;*/ - "addiu %[dst], 32 \n\t" + PTR_ADDIU "%[dst], 32 \n\t" "bne %[src], %[src_end], i32tf_lp%= \n\t" : [temp1]"=&f"(temp1), [temp11]"=&f"(temp11), [temp13]"=&f"(temp13), [temp15]"=&f"(temp15), |