ref: 477905413dad22fa46fc9e8e0214c6b59ae16b42
parent: 3e9f9676400dcaa5416ff5f1864763128381a4d1
author: Victorien Le Couviour--Tuffet <victorien@videolan.org>
date: Thu Oct 17 14:41:10 EDT 2019
x86inc: fix LOAD_MM_PERMUTATION for AVX512 Pre-permuting the registers in INIT_*MM avx512 (AVX512_MM_PERMUTATION) is redondant. It causes the register mapping to be the same as without the initial AVX512_MM_PERMUTATION, with the user SWAPs applied. For example... INIT_YMM avx512 SWAP m0, m16 SAVE_MM_PERMUTATION ; do whatever LOAD_MM_PERMUTATION ... would result in m0 mapping to ymm16 instead of ymm0 and m1 to ymm1 instead of ymm17.
--- a/src/ext/x86/x86inc.asm
+++ b/src/ext/x86/x86inc.asm
@@ -1126,6 +1126,7 @@
%xdefine %%tmp %%f %+ 0
%ifnum %%tmp
RESET_MM_PERMUTATION
+ AVX512_MM_PERMUTATION
%assign %%i 0
%rep num_mmregs
%xdefine %%tmp %%f %+ %%i