History

avcodec/x86/h264_idct: Fix incorrect xmm spilling on win64

Broken in afa471d0efed1df5dca6eeeb2fcdd211ae4cad4e. It just happened to work before due to x86inc.asm previously performing XMM spills in INIT_MMX mode which was more of a bug than an intentional feature.

Henrik Gramner committed 2 years ago

Commit 7c003b61 parent 31623901 file · +3 −9Browse files

Unified · Split

libavcodec/x86/h264_idct.asm+3−9
@@ -716,11 +716,9 @@ RET · 715 unmodified lines
716%endif716%endif
717%endmacro717%endmacro
718 718
719%macro IDCT_DC_DEQUANT 1719INIT_XMM sse2
720cglobal h264_luma_dc_dequant_idct, 3, 4, %1720cglobal h264_luma_dc_dequant_idct, 3, 4, 7
721 ; manually spill XMM registers for Win64 because721INIT_MMX cpuname
722 ; the code here is initialized with INIT_MMX
723 WIN64_SPILL_XMM %1
724 movq m3, [r1+24]722 movq m3, [r1+24]
725 movq m2, [r1+16]723 movq m2, [r1+16]
726 movq m1, [r1+ 8]724 movq m1, [r1+ 8]
@@ -757,10 +755,6 @@ cglobal h264_luma_dc_dequant_idct, 3, 4, %1 · 30 unmodified lines
757 movd xmm6, t1d755 movd xmm6, t1d
758 DEQUANT_STORE xmm6756 DEQUANT_STORE xmm6
759 RET757 RET
760%endmacro
761
762INIT_MMX sse2
763IDCT_DC_DEQUANT 7
764 758
765%ifdef __NASM_VER__759%ifdef __NASM_VER__
766%if __NASM_MAJOR__ >= 2 && __NASM_MINOR__ >= 4760%if __NASM_MAJOR__ >= 2 && __NASM_MINOR__ >= 4

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t