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/acelp_vectors_mips.c | |
parent | eae13eae9d6499e81cd77bcd9e13f7bcb31b5577 (diff) |
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/acelp_vectors_mips.c')
-rw-r--r-- | libavcodec/mips/acelp_vectors_mips.c | 7 |
1 files changed, 4 insertions, 3 deletions
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" |