Fix AVX check

Fixes #2
This commit is contained in:
Ruben Vermeersch
2021-03-22 20:58:27 +01:00
parent 07dbf569df
commit 041c0ef4e4
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ import (
func xorBytesSSE(dst, a, b []byte, n int)
//go:noescape
func xorBytesAVX(dst, a, b []byte, n int)
func xorBytesAVX2(dst, a, b []byte, n int)
func min(a, b, c int) int {
if a < b {
@@ -32,8 +32,8 @@ func Bytes(dst, a, b []byte) int {
return 0
}
switch {
case cpu.X86.HasAVX:
xorBytesAVX(dst, a, b, n)
case cpu.X86.HasAVX2:
xorBytesAVX2(dst, a, b, n)
case cpu.X86.HasSSE2:
xorBytesSSE(dst, a, b, n)
default: