aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-12-24 21:34:19 -0300
committerJames Almer <jamrial@gmail.com>2017-12-24 23:02:54 -0300
commit90d216cb90398ffb92e9e8361656ad619a985b64 (patch)
tree9b87e5363cc26e751f1b2991771132ca3c9724fd
parent40d4b13228bf234a2b9649674d9ed25bd020f226 (diff)
downloadffmpeg-90d216cb90398ffb92e9e8361656ad619a985b64.tar.gz
x86inc: set the correct amount of simd regs in x86_64 when avx512 is enabled but not used
Fixes compilation of libavresample/x86/audio_mix.asm Reviewed-by: Gramner Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavutil/x86/x86inc.asm26
1 files changed, 16 insertions, 10 deletions
diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
index f3dd2b788a..196374c348 100644
--- a/libavutil/x86/x86inc.asm
+++ b/libavutil/x86/x86inc.asm
@@ -917,21 +917,24 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
%assign avx_enabled 0
%define RESET_MM_PERMUTATION INIT_XMM %1
%define mmsize 16
- %define num_mmregs 8
- %if ARCH_X86_64
- %define num_mmregs 32
- %endif
%define mova movdqa
%define movu movdqu
%define movh movq
%define movnta movntdq
+ INIT_CPUFLAGS %1
+ %define num_mmregs 8
+ %if ARCH_X86_64
+ %define num_mmregs 16
+ %if cpuflag(avx512)
+ %define num_mmregs 32
+ %endif
+ %endif
%assign %%i 0
%rep num_mmregs
CAT_XDEFINE m, %%i, xmm %+ %%i
CAT_XDEFINE nnxmm, %%i, %%i
%assign %%i %%i+1
%endrep
- INIT_CPUFLAGS %1
%if WIN64
; Swap callee-saved registers with volatile registers
AVX512_MM_PERMUTATION 6
@@ -942,21 +945,24 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
%assign avx_enabled 1
%define RESET_MM_PERMUTATION INIT_YMM %1
%define mmsize 32
- %define num_mmregs 8
- %if ARCH_X86_64
- %define num_mmregs 32
- %endif
%define mova movdqa
%define movu movdqu
%undef movh
%define movnta movntdq
+ INIT_CPUFLAGS %1
+ %define num_mmregs 8
+ %if ARCH_X86_64
+ %define num_mmregs 16
+ %if cpuflag(avx512)
+ %define num_mmregs 32
+ %endif
+ %endif
%assign %%i 0
%rep num_mmregs
CAT_XDEFINE m, %%i, ymm %+ %%i
CAT_XDEFINE nnymm, %%i, %%i
%assign %%i %%i+1
%endrep
- INIT_CPUFLAGS %1
AVX512_MM_PERMUTATION
%endmacro