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/fft_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/fft_mips.c')
-rw-r--r-- | libavcodec/mips/fft_mips.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/mips/fft_mips.c b/libavcodec/mips/fft_mips.c index e12c33e539..cf008c6561 100644 --- a/libavcodec/mips/fft_mips.c +++ b/libavcodec/mips/fft_mips.c @@ -50,6 +50,7 @@ #include "config.h" #include "libavcodec/fft.h" #include "libavcodec/fft_table.h" +#include "libavutil/mips/asmdefs.h" /** * FFT transform @@ -368,14 +369,14 @@ static void ff_imdct_half_mips(FFTContext *s, FFTSample *output, const FFTSample "mul.s %[temp11], %[temp5], %[temp6] \t\n" "mul.s %[temp12], %[temp5], %[temp7] \t\n" "lwc1 %[temp8], 0(%[in3]) \t\n" - "addiu %[tcos1], %[tcos1], 8 \t\n" - "addiu %[tsin1], %[tsin1], 8 \t\n" - "addiu %[in1], %[in1], 16 \t\n" + PTR_ADDIU " %[tcos1], %[tcos1], 8 \t\n" + PTR_ADDIU " %[tsin1], %[tsin1], 8 \t\n" + PTR_ADDIU " %[in1], %[in1], 16 \t\n" "nmsub.s %[temp11], %[temp11], %[temp8], %[temp7] \t\n" "madd.s %[temp12], %[temp12], %[temp8], %[temp6] \t\n" - "addiu %[in2], %[in2], -16 \t\n" - "addiu %[in3], %[in3], 16 \t\n" - "addiu %[in4], %[in4], -16 \t\n" + PTR_ADDIU " %[in2], %[in2], -16 \t\n" + PTR_ADDIU " %[in3], %[in3], 16 \t\n" + PTR_ADDIU " %[in4], %[in4], -16 \t\n" : [temp1]"=&f"(temp1), [temp2]"=&f"(temp2), [temp3]"=&f"(temp3), [temp4]"=&f"(temp4), |