From 157d6f0d5b95261bf053566d8a1c2652387da30c Mon Sep 17 00:00:00 2001 From: James Cowgill Date: Thu, 5 Mar 2015 17:40:15 +0000 Subject: 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 Reviewed-by: Nedeljko Babic Signed-off-by: Michael Niedermayer --- libavcodec/mips/acelp_vectors_mips.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libavcodec/mips/acelp_vectors_mips.c') diff --git a/libavcodec/mips/acelp_vectors_mips.c b/libavcodec/mips/acelp_vectors_mips.c index 8770df8576..ad9434866e 100644 --- a/libavcodec/mips/acelp_vectors_mips.c +++ b/libavcodec/mips/acelp_vectors_mips.c @@ -54,6 +54,7 @@ */ #include "config.h" #include "libavcodec/acelp_vectors.h" +#include "libavutil/mips/asmdefs.h" #if HAVE_INLINE_ASM static void ff_weighted_vector_sumf_mips( @@ -75,11 +76,11 @@ static void ff_weighted_vector_sumf_mips( "mul.s $f5, %[weight_coeff_a], $f3 \n\t" "madd.s $f2, $f2, %[weight_coeff_b], $f1 \n\t" "madd.s $f5, $f5, %[weight_coeff_b], $f4 \n\t" - "addiu %[in_a], 8 \n\t" - "addiu %[in_b], 8 \n\t" + PTR_ADDIU "%[in_a],8 \n\t" + PTR_ADDIU "%[in_b],8 \n\t" "swc1 $f2, 0(%[out]) \n\t" "swc1 $f5, 4(%[out]) \n\t" - "addiu %[out], 8 \n\t" + PTR_ADDIU "%[out], 8 \n\t" "bne %[in_a], %[a_end], ff_weighted_vector_sumf_madd%= \n\t" "ff_weighted_vector_sumf_end%=: \n\t" -- cgit v1.2.3