erasure_code: update GF_MUL_XOR macro to support VEX encoding

Signed-off-by: Marcel Cornu <marcel.d.cornu@intel.com>
This commit is contained in:
Marcel Cornu 2023-11-29 16:19:34 +00:00 committed by Pablo de Lara
parent c8dd92f04a
commit bc34d87427
13 changed files with 38 additions and 33 deletions

View File

@ -152,7 +152,7 @@ section .text
vbroadcastf32x2 xgft2, [tmp + vec]
add tmp, 8
GF_MUL_XOR x0, xgft1, xgft1, xp1, xgft2, xgft2, xp2
GF_MUL_XOR EVEX, x0, xgft1, xgft1, xp1, xgft2, xgft2, xp2
cmp vec_i, vec
jl %%next_vect

View File

@ -133,7 +133,7 @@ section .text
XLDR xd2, [dest2 + pos] ;Get next dest vector
%endif
GF_MUL_XOR x0, xgft1, xret1, xd1, xgft2, xret2, xd2
GF_MUL_XOR EVEX, x0, xgft1, xret1, xd1, xgft2, xret2, xd2
%if %0 == 1
vmovdqu8 [dest1 + pos]{%%KMASK}, xd1

View File

@ -165,7 +165,7 @@ section .text
vbroadcastf32x2 xgft3, [tmp + vec*2]
add tmp, 8
GF_MUL_XOR x0, xgft1, xgft1, xp1, xgft2, xgft2, xp2, xgft3, xgft3, xp3
GF_MUL_XOR EVEX, x0, xgft1, xgft1, xp1, xgft2, xgft2, xp2, xgft3, xgft3, xp3
cmp vec_i, vec
jl %%next_vect

View File

@ -144,7 +144,7 @@ section .text
XLDR xd3, [dest3 + pos] ;Get next dest vector
%endif
GF_MUL_XOR x0, xgft1, xret1, xd1, xgft2, xret2, xd2, xgft3, xret3, xd3
GF_MUL_XOR EVEX, x0, xgft1, xret1, xd1, xgft2, xret2, xd2, xgft3, xret3, xd3
%if %0 == 1
vmovdqu8 [dest1 + pos]{%%KMASK}, xd1

View File

@ -187,7 +187,7 @@ section .text
vbroadcastf32x2 xgft4, [tmp + vskip3]
add tmp, 8
GF_MUL_XOR x0, xgft1, xgft1, xp1, xgft2, xgft2, xp2, xgft3, xgft3, xp3, \
GF_MUL_XOR EVEX, x0, xgft1, xgft1, xp1, xgft2, xgft2, xp2, xgft3, xgft3, xp3, \
xgft4, xgft4, xp4
cmp vec_i, vec

View File

@ -157,7 +157,7 @@ section .text
XLDR xd4, [dest4 + pos] ;Get next dest vector
%endif
GF_MUL_XOR x0, xgft1, xret1, xd1, xgft2, xret2, xd2, xgft3, xret3, xd3, \
GF_MUL_XOR EVEX, x0, xgft1, xret1, xd1, xgft2, xret2, xd2, xgft3, xret3, xd3, \
xgft4, xret4, xd4
%if %0 == 1

View File

@ -202,7 +202,7 @@ section .text
vbroadcastf32x2 xgft5, [tmp + vec*4]
add tmp, 8
GF_MUL_XOR x0, xgft1, xgft1, xp1, xgft2, xgft2, xp2, xgft3, xgft3, xp3, \
GF_MUL_XOR EVEX, x0, xgft1, xgft1, xp1, xgft2, xgft2, xp2, xgft3, xgft3, xp3, \
xgft4, xgft4, xp4, xgft5, xgft5, xp5
cmp vec_i, vec

View File

@ -171,7 +171,7 @@ section .text
XLDR xd5, [dest5 + pos] ;Get next dest vector
%endif
GF_MUL_XOR x0, xgft1, xret1, xd1, xgft2, xret2, xd2, xgft3, xret3, xd3, \
GF_MUL_XOR EVEX, x0, xgft1, xret1, xd1, xgft2, xret2, xd2, xgft3, xret3, xd3, \
xgft4, xret4, xd4, xgft5, xret5, xd5
%if %0 == 1

View File

@ -217,7 +217,7 @@ section .text
vbroadcastf32x2 xgft6, [tmp + vskip5]
add tmp, 8
GF_MUL_XOR x0, xgft1, xgft1, xp1, xgft2, xgft2, xp2, xgft3, xgft3, xp3, \
GF_MUL_XOR EVEX, x0, xgft1, xgft1, xp1, xgft2, xgft2, xp2, xgft3, xgft3, xp3, \
xgft4, xgft4, xp4, xgft5, xgft5, xp5, xgft6, xgft6, xp6
cmp vec_i, vec

View File

@ -185,7 +185,7 @@ section .text
XLDR xd6, [dest6 + pos] ;Get next dest vector
%endif
GF_MUL_XOR x0, xgft1, xret1, xd1, xgft2, xret2, xd2, xgft3, xret3, xd3, \
GF_MUL_XOR EVEX, x0, xgft1, xret1, xd1, xgft2, xret2, xd2, xgft3, xret3, xd3, \
xgft4, xret4, xd4, xgft5, xret5, xd5, xgft6, xret6, xd6
%if %0 == 1

View File

@ -138,7 +138,7 @@ section .text
vbroadcastf32x2 xgft1, [tmp]
add tmp, 8
GF_MUL_XOR x0, xgft1, xgft1, xp1
GF_MUL_XOR EVEX, x0, xgft1, xgft1, xp1
cmp vec_i, vec
jl %%next_vect

View File

@ -31,28 +31,29 @@
; Multiply 1 source register to up to 6 different GF table registers
; and XOR the results to partial registers
;
%macro GF_MUL_XOR 4-19
%define %%SRC %1
%define %%GFTABLE1 %2
%define %%TMP1 %3
%define %%PARTIAL1 %4
%define %%GFTABLE2 %5
%define %%TMP2 %6
%define %%PARTIAL2 %7
%define %%GFTABLE3 %8
%define %%TMP3 %9
%define %%PARTIAL3 %10
%define %%GFTABLE4 %11
%define %%TMP4 %12
%define %%PARTIAL4 %13
%define %%GFTABLE5 %14
%define %%TMP5 %15
%define %%PARTIAL5 %16
%define %%GFTABLE6 %17
%define %%TMP6 %18
%define %%PARTIAL6 %19
%macro GF_MUL_XOR 5-20
%define %%ENCODING %1
%define %%SRC %2
%define %%GFTABLE1 %3
%define %%TMP1 %4
%define %%PARTIAL1 %5
%define %%GFTABLE2 %6
%define %%TMP2 %7
%define %%PARTIAL2 %8
%define %%GFTABLE3 %9
%define %%TMP3 %10
%define %%PARTIAL3 %11
%define %%GFTABLE4 %12
%define %%TMP4 %13
%define %%PARTIAL4 %14
%define %%GFTABLE5 %15
%define %%TMP5 %16
%define %%PARTIAL5 %17
%define %%GFTABLE6 %18
%define %%TMP6 %19
%define %%PARTIAL6 %20
%define %%N_BLOCKS ((%0 - 1) / 3)
%define %%N_BLOCKS ((%0 - 2) / 3)
%assign %%I 1
%rep %%N_BLOCKS
@ -61,7 +62,11 @@
%endrep
%assign %%I 1
%rep %%N_BLOCKS
%ifidn %%ENCODING, VEX
vpxor %%PARTIAL %+ %%I, %%TMP %+ %%I
%else
vpxorq %%PARTIAL %+ %%I, %%TMP %+ %%I
%endif
%assign %%I (%%I + 1)
%endrep
%endmacro

View File

@ -126,7 +126,7 @@ section .text
XLDR xd, [dest + pos] ;Get next dest vector
%endif
GF_MUL_XOR x0, xgft1, xret1, xd
GF_MUL_XOR EVEX, x0, xgft1, xret1, xd
%if %0 == 1
vmovdqu8 [dest + pos]{%%KMASK}, xd