go-ethereum/common/bitutil/or_asm.go
2025-12-14 18:41:29 +08:00

16 lines
506 B
Go

// 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.
// inspired by: https://github.com/golang/go/blob/4a3cef2036097d323b6cc0bbe90fc4d8c7588660/src/crypto/internal/fips140/subtle/xor_asm.go
//go:build (amd64 || arm64) && !purego
package bitutil
func orBytes(dst, a, b []byte) int {
orBytesASM(&dst[0], &a[0], &b[0], len(a))
return len(a)
}
//go:noescape
func orBytesASM(dst, a, b *byte, n int)