Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
deatil committed Sep 23, 2024
1 parent 96cf22b commit 10ecd04
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_qemu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.20]
go-version: [1.21.x]
arch: [arm64]
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_sm_ni.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.20]
go-version: [1.21.x]
arch: [arm64]
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 3 additions & 3 deletions sm3/blocks_avx2_amd64.s
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ GLOBL r08_mask<>(SB), 8, $32
VMOVDQU (i*32)(srcPtr5), e; \
VMOVDQU (i*32)(srcPtr6), f; \
VMOVDQU (i*32)(srcPtr7), g; \
VMOVDQU (i*32)(srcPtr8), h; \
VMOVDQU (i*32)(srcPtr8), h; \
; \
TRANSPOSE_MATRIX(a, b, c, d, e, f, g, h, TMP1, TMP2, TMP3, TMP4); \
REV32(a, b, c, d, e, f, g, h); \
Expand Down Expand Up @@ -172,7 +172,7 @@ GLOBL r08_mask<>(SB), 8, $32
// DST = (Y XOR Z) AND X XOR Z
#define GG1(X, Y, Z, DST) \
VPXOR Y, Z, DST; \
VPAND X, DST, DST; \
VPAND X, DST, DST; \
VPXOR Z, DST, DST

#define SS1SS2(index, a, e, SS1, SS2) \
Expand All @@ -196,7 +196,7 @@ GLOBL r08_mask<>(SB), 8, $32
SS1SS2(index, a, e, Y12, Y13); \
; \
FF0(a, b, c, Y14); \
VPADDD d, Y14, Y14; \ // (a XOR b XOR c) + d
VPADDD d, Y14, Y14; \ // (a XOR b XOR c) + d
loadWord(Y10, index); \
loadWord(Y11, index+4); \
VPXOR Y10, Y11, Y11; \ //Wt XOR Wt+4
Expand Down
6 changes: 6 additions & 0 deletions sm3/blocks_avx2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import (
"testing"
)

// p || state || words
// p = 64 * 8 * 2 = 1024
// state = 8 * 32 = 256
// words = 68 * 32 = 2176
const preallocSizeBy8 = 3456

func initState8() [8]*[8]uint32 {
d := new(digest)
d.Reset()
Expand Down

0 comments on commit 10ecd04

Please sign in to comment.