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>
This commit is contained in:

committed by
Michael Niedermayer

parent
eae13eae9d
commit
157d6f0d5b
@@ -53,6 +53,7 @@
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "libavcodec/celp_math.h"
|
||||
#include "libavutil/mips/asmdefs.h"
|
||||
|
||||
#if HAVE_INLINE_ASM
|
||||
static float ff_dot_productf_mips(const float* a, const float* b,
|
||||
@@ -67,8 +68,8 @@ static float ff_dot_productf_mips(const float* a, const float* b,
|
||||
"ff_dot_productf_madd%=: \n\t"
|
||||
"lwc1 $f2, 0(%[a]) \n\t"
|
||||
"lwc1 $f1, 0(%[b]) \n\t"
|
||||
"addiu %[a], %[a], 4 \n\t"
|
||||
"addiu %[b], %[b], 4 \n\t"
|
||||
PTR_ADDIU "%[a], %[a], 4 \n\t"
|
||||
PTR_ADDIU "%[b], %[b], 4 \n\t"
|
||||
"madd.s %[sum], %[sum], $f1, $f2 \n\t"
|
||||
"bne %[a], %[a_end], ff_dot_productf_madd%= \n\t"
|
||||
"ff_dot_productf_end%=: \n\t"
|
||||
|
Reference in New Issue
Block a user