Skip to content

Commit

Permalink
fix go:noescape
Browse files Browse the repository at this point in the history
  • Loading branch information
templexxx committed Aug 3, 2017
1 parent b0ae127 commit 2183479
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sse2_amd64.s
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
TEXT ·xorSrc0(SB), NOSPLIT, $0
MOVQ len+32(FP), LEN
CMPQ LEN, $0
JE ret
JLE ret
MOVQ dst+0(FP), DST
MOVQ src0+24(FP), SRC0
MOVQ src1+48(FP), SRC1
Expand Down
4 changes: 2 additions & 2 deletions xor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const (
none = iota
avx2
// first introduced by Intel with the initial version of the Pentium 4 in 2001
// so we can assume all amd64 has sse2
// so I think we can assume all amd64 has sse2
sse2
)

Expand All @@ -27,7 +27,7 @@ func Bytes(dst, src0, src1 []byte) {
// all slice's length must be equal
// cut size branch, save time for small data
func BytesSameLen(dst, src0, src1 []byte) {
xorBytes(dst, src0, src1, len(dst))
xorSrc1(dst, src0, src1)
}

// xor for small data ( <= 64bytes)
Expand Down
4 changes: 2 additions & 2 deletions xor_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ func matrixSSE2(dst []byte, src [][]byte) {
}
}

// go:noescape
//go:noescape
func xorSrc0(dst, src0, src1 []byte)

// go:noescape
//go:noescape
func xorSrc1(dst, src0, src1 []byte)

//go:noescape
Expand Down

0 comments on commit 2183479

Please sign in to comment.