mirror of
https://github.com/intel/isa-l.git
synced 2024-12-12 09:23:50 +01:00
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:
parent
c8dd92f04a
commit
bc34d87427
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user