From: Joel Sing Date: Fri, 3 Jan 2025 08:06:13 +0000 (+1100) Subject: crypto/internal/fips140/subtle: combine xor_.go files X-Git-Tag: go1.25rc1~1138 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b8fb95becda267e8369a3a2bfd30037c91504fba;p=gostls13.git crypto/internal/fips140/subtle: combine xor_.go files There is not much point in having per architecture files that all contain the same content. Instead, merge the various xor_.go files into a single xor_asm.go file that has appropriate build tags. Change-Id: I555d44b2fd83f260a4855d83cacb9e101d689bc0 Reviewed-on: https://go-review.googlesource.com/c/go/+/639856 Reviewed-by: Roland Shoemaker Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI Reviewed-by: Filippo Valsorda --- diff --git a/src/crypto/internal/fips140/subtle/xor_arm64.go b/src/crypto/internal/fips140/subtle/xor_arm64.go deleted file mode 100644 index 65bab4c657..0000000000 --- a/src/crypto/internal/fips140/subtle/xor_arm64.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2020 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 - -package subtle - -//go:noescape -func xorBytes(dst, a, b *byte, n int) diff --git a/src/crypto/internal/fips140/subtle/xor_amd64.go b/src/crypto/internal/fips140/subtle/xor_asm.go similarity index 76% rename from src/crypto/internal/fips140/subtle/xor_amd64.go rename to src/crypto/internal/fips140/subtle/xor_asm.go index 3bb2f08b7c..16343db658 100644 --- a/src/crypto/internal/fips140/subtle/xor_amd64.go +++ b/src/crypto/internal/fips140/subtle/xor_asm.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build !purego +//go:build (amd64 || arm64 || loong64 || ppc64 || ppc64le) && !purego package subtle diff --git a/src/crypto/internal/fips140/subtle/xor_loong64.go b/src/crypto/internal/fips140/subtle/xor_loong64.go deleted file mode 100644 index e49f0fc9e3..0000000000 --- a/src/crypto/internal/fips140/subtle/xor_loong64.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2024 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 - -package subtle - -//go:noescape -func xorBytes(dst, a, b *byte, n int) diff --git a/src/crypto/internal/fips140/subtle/xor_ppc64x.go b/src/crypto/internal/fips140/subtle/xor_ppc64x.go deleted file mode 100644 index 760463c7e5..0000000000 --- a/src/crypto/internal/fips140/subtle/xor_ppc64x.go +++ /dev/null @@ -1,10 +0,0 @@ -// 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 (ppc64 || ppc64le) && !purego - -package subtle - -//go:noescape -func xorBytes(dst, a, b *byte, n int)