gmsm/internal/subtle/xor_asm.go

15 lines
372 B
Go
Raw Normal View History

2022-08-18 14:49:35 +08:00
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
//go:build !purego && (amd64 || arm64 || ppc64 || ppc64le || riscv64 || s390x)
2022-08-18 14:49:35 +08:00
package subtle
2023-05-13 10:26:44 +08:00
import "golang.org/x/sys/cpu"
var useAVX2 = cpu.X86.HasAVX2
2022-08-18 14:49:35 +08:00
//go:noescape
func xorBytes(dst, a, b *byte, n int)