Skip to content

Commit

Permalink
Revert changes for _avx functions.
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola Torracca <[email protected]>
  • Loading branch information
Shark64 committed Nov 6, 2024
1 parent 934c640 commit 2ccae01
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
15 changes: 8 additions & 7 deletions sha1_mb/sha1_mb_x4_avx.asm
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,14 @@ lloop:
vmovdqa [ARG1 + 4*16], E

; update input pointers
vmovq xmm1, IDX
vpunpcklqdq xmm1, xmm1, xmm1
lea IDX, [ARG1 + _data_ptr]
vpaddq xmm0, xmm1, [IDX]
vpaddq xmm1, xmm1, [IDX+16]
vmovdqu [IDX], xmm0
vmovdqu [IDX+16], xmm1
add inp0, IDX
mov [ARG1 + _data_ptr + 0*8], inp0
add inp1, IDX
mov [ARG1 + _data_ptr + 1*8], inp1
add inp2, IDX
mov [ARG1 + _data_ptr + 2*8], inp2
add inp3, IDX
mov [ARG1 + _data_ptr + 3*8], inp3

;;;;;;;;;;;;;;;;
;; Postamble
Expand Down
15 changes: 8 additions & 7 deletions sha256_mb/sha256_mb_x4_avx.asm
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,14 @@ Lrounds_16_xx:
vmovdqa [arg1+7*SZ4],h

; update input pointers
vmovq xmm1, IDX
vpunpcklqdq xmm1, xmm1, xmm1
lea IDX, [arg1 + _data_ptr]
vpaddq xmm0, xmm1, [IDX]
vpaddq xmm1, xmm1, [IDX+16]
vmovdqu [IDX], xmm0
vmovdqu [IDX+16], xmm1
add inp0, IDX
mov [arg1 + _data_ptr + 0*8], inp0
add inp1, IDX
mov [arg1 + _data_ptr + 1*8], inp1
add inp2, IDX
mov [arg1 + _data_ptr + 2*8], inp2
add inp3, IDX
mov [arg1 + _data_ptr + 3*8], inp3

;;;;;;;;;;;;;;;;
;; Postamble
Expand Down
9 changes: 4 additions & 5 deletions sha512_mb/sha512_mb_x2_avx.asm
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,10 @@ Lrounds_16_xx:
vmovdqa [STATE+7*SHA512_DIGEST_ROW_SIZE],h

; update input pointers
vmovq xmm0, IDX
vpunpcklqdq xmm0, xmm0
lea IDX, [STATE + _data_ptr_sha512]
vpaddq xmm0, xmm0, [IDX]
vmovdqu [IDX], xmm0
add inp0, IDX
mov [STATE + _data_ptr_sha512 + 0*PTR_SZ], inp0
add inp1, IDX
mov [STATE + _data_ptr_sha512 + 1*PTR_SZ], inp1

;;;;;;;;;;;;;;;;
;; Postamble
Expand Down

0 comments on commit 2ccae01

Please sign in to comment.