diff options
author | Henrik Gramner <hengar-6@student.ltu.se> | 2012-04-04 20:03:15 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-04-11 15:47:00 -0400 |
commit | 729f90e26802057f06905ab15a34612168eeac80 (patch) | |
tree | 41f8c4cedf10851b5b437aeeb558ce3d0f8db1dc /libavcodec/x86/fft_mmx.asm | |
parent | e1ce756844e684876318570dcebc74bc66c084f0 (diff) | |
download | ffmpeg-729f90e26802057f06905ab15a34612168eeac80.tar.gz |
x86inc improvements for 64-bit
Add support for all x86-64 registers
Prefer caller-saved register over callee-saved on WIN64
Support up to 15 function arguments
Also (by Ronald S. Bultje)
Fix up our asm to work with new x86inc.asm.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
Diffstat (limited to 'libavcodec/x86/fft_mmx.asm')
-rw-r--r-- | libavcodec/x86/fft_mmx.asm | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/libavcodec/x86/fft_mmx.asm b/libavcodec/x86/fft_mmx.asm index a2f26cca33..225c66635d 100644 --- a/libavcodec/x86/fft_mmx.asm +++ b/libavcodec/x86/fft_mmx.asm @@ -749,14 +749,11 @@ INIT_XMM %endmacro %macro DECL_IMDCT 2 -cglobal imdct_half%1, 3,7,8; FFTContext *s, FFTSample *output, const FFTSample *input +cglobal imdct_half%1, 3,12,8; FFTContext *s, FFTSample *output, const FFTSample *input %if ARCH_X86_64 -%define rrevtab r10 -%define rtcos r11 -%define rtsin r12 - push r12 - push r13 - push r14 +%define rrevtab r7 +%define rtcos r8 +%define rtsin r9 %else %define rrevtab r6 %define rtsin r6 @@ -798,12 +795,12 @@ cglobal imdct_half%1, 3,7,8; FFTContext *s, FFTSample *output, const FFTSample * %if ARCH_X86_64 movzx r5, word [rrevtab+r4-4] movzx r6, word [rrevtab+r4-2] - movzx r13, word [rrevtab+r3] - movzx r14, word [rrevtab+r3+2] + movzx r10, word [rrevtab+r3] + movzx r11, word [rrevtab+r3+2] movlps [r1+r5 *8], xmm0 movhps [r1+r6 *8], xmm0 - movlps [r1+r13*8], xmm1 - movhps [r1+r14*8], xmm1 + movlps [r1+r10*8], xmm1 + movhps [r1+r11*8], xmm1 add r4, 4 %else mov r6, [esp] @@ -839,11 +836,7 @@ cglobal imdct_half%1, 3,7,8; FFTContext *s, FFTSample *output, const FFTSample * mov r1, -mmsize sub r1, r0 %2 r0, r1, r6, rtcos, rtsin -%if ARCH_X86_64 - pop r14 - pop r13 - pop r12 -%else +%if ARCH_X86_64 == 0 add esp, 12 %endif %ifidn avx_enabled, 1 |