diff options
author | James Cowgill <[email protected]> | 2015-03-05 17:40:15 +0000 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2015-03-06 14:37:44 +0100 |
commit | 157d6f0d5b95261bf053566d8a1c2652387da30c (patch) | |
tree | ca481834165a1f3c103eea9dc50fd5e877bbcbde /libavcodec/mips/mpegaudiodsp_mips_fixed.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 <[email protected]>
Reviewed-by: Nedeljko Babic <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
Diffstat (limited to 'libavcodec/mips/mpegaudiodsp_mips_fixed.c')
-rw-r--r-- | libavcodec/mips/mpegaudiodsp_mips_fixed.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/mips/mpegaudiodsp_mips_fixed.c b/libavcodec/mips/mpegaudiodsp_mips_fixed.c index 047a833f14..86ea13d8d6 100644 --- a/libavcodec/mips/mpegaudiodsp_mips_fixed.c +++ b/libavcodec/mips/mpegaudiodsp_mips_fixed.c @@ -54,6 +54,7 @@ #include <string.h> +#include "libavutil/mips/asmdefs.h" #include "libavcodec/mpegaudiodsp.h" static void ff_mpadsp_apply_window_mips_fixed(int32_t *synth_buf, int32_t *window, @@ -152,7 +153,7 @@ static void ff_mpadsp_apply_window_mips_fixed(int32_t *synth_buf, int32_t *windo "extr.w %[sum1], $ac0, 24 \n\t" "mflo %[temp3] \n\t" - "addi %[w], %[w], 4 \n\t" + PTR_ADDIU "%[w], %[w], 4 \n\t" "and %[temp1], %[temp3], 0x00ffffff \n\t" "slt %[temp2], %[sum1], %[min_asm] \n\t" "movn %[sum1], %[min_asm], %[temp2] \n\t" @@ -180,7 +181,7 @@ static void ff_mpadsp_apply_window_mips_fixed(int32_t *synth_buf, int32_t *windo "mtlo $0, $ac1 \n\t" "mthi $0 \n\t" "mtlo %[temp1] \n\t" - "addi %[p_temp1], %[p_temp1], 4 \n\t" + PTR_ADDIU "%[p_temp1], %[p_temp1], 4 \n\t" "lw %[w_asm], 0(%[w]) \n\t" "lw %[p_asm], 0(%[p_temp1]) \n\t" "lw %[w2_asm], 0(%[w2]) \n\t" @@ -221,7 +222,7 @@ static void ff_mpadsp_apply_window_mips_fixed(int32_t *synth_buf, int32_t *windo "msub $ac1, %[w2_asm], %[p_asm] \n\t" "madd %[w_asm1], %[p_asm1] \n\t" "msub $ac1, %[w2_asm1], %[p_asm1] \n\t" - "addi %[p_temp2], %[p_temp2], -4 \n\t" + PTR_ADDIU "%[p_temp2], %[p_temp2], -4 \n\t" "lw %[w_asm], 32*4(%[w]) \n\t" "lw %[p_asm], 0(%[p_temp2]) \n\t" "lw %[w2_asm], 32*4(%[w2]) \n\t" @@ -262,8 +263,8 @@ static void ff_mpadsp_apply_window_mips_fixed(int32_t *synth_buf, int32_t *windo "msub %[w_asm1], %[p_asm1] \n\t" "msub $ac1, %[w2_asm], %[p_asm] \n\t" "msub $ac1, %[w2_asm1], %[p_asm1] \n\t" - "addi %[w], %[w], 4 \n\t" - "addi %[w2], %[w2], -4 \n\t" + PTR_ADDIU "%[w], %[w], 4 \n\t" + PTR_ADDIU "%[w2], %[w2], -4 \n\t" "mflo %[temp2] \n\t" "extr.w %[sum1], $ac0, 24 \n\t" "li %[temp3], 1 \n\t" |