Skip to content

Commit

Permalink
x86inc: allow manual use of WIN64_SPILL_XMM.
Browse files Browse the repository at this point in the history
Functions using INIT_MMX may still access XMM registers through direct
means (xmm0-15). Therefore, they still need to be marked for clobber
so they can be properly saved/restored.

Signed-off-by: Ronald S. Bultje <[email protected]>
  • Loading branch information
Henrik Gramner authored and rbultje committed Feb 8, 2012
1 parent 314af0f commit 9cf7385
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions libavutil/x86/x86inc.asm
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,11 @@ DECLARE_REG 6, rax, eax, ax, al, [rsp + stack_offset + 56]
push r5
%assign stack_offset stack_offset+16
%endif
WIN64_SPILL_XMM %3
%if mmsize == 8
%assign xmm_regs_used 0
%else
WIN64_SPILL_XMM %3
%endif
LOAD_IF_USED 4, %1
LOAD_IF_USED 5, %1
LOAD_IF_USED 6, %1
Expand All @@ -299,9 +303,6 @@ DECLARE_REG 6, rax, eax, ax, al, [rsp + stack_offset + 56]

%macro WIN64_SPILL_XMM 1
%assign xmm_regs_used %1
%if mmsize == 8
%assign xmm_regs_used 0
%endif
ASSERT xmm_regs_used <= 16
%if xmm_regs_used > 6
sub rsp, (xmm_regs_used-6)*16+16
Expand Down

0 comments on commit 9cf7385

Please sign in to comment.