]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/internal/fips140/subtle: combine xor_<goarch>.go files
authorJoel Sing <joel@sing.id.au>
Fri, 3 Jan 2025 08:06:13 +0000 (19:06 +1100)
committerJoel Sing <joel@sing.id.au>
Fri, 7 Feb 2025 09:33:26 +0000 (01:33 -0800)
There is not much point in having per architecture files that all contain
the same content. Instead, merge the various xor_<goarch>.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 <roland@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
src/crypto/internal/fips140/subtle/xor_arm64.go [deleted file]
src/crypto/internal/fips140/subtle/xor_asm.go [moved from src/crypto/internal/fips140/subtle/xor_amd64.go with 76% similarity]
src/crypto/internal/fips140/subtle/xor_loong64.go [deleted file]
src/crypto/internal/fips140/subtle/xor_ppc64x.go [deleted file]

diff --git a/src/crypto/internal/fips140/subtle/xor_arm64.go b/src/crypto/internal/fips140/subtle/xor_arm64.go
deleted file mode 100644 (file)
index 65bab4c..0000000
+++ /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)
similarity index 76%
rename from src/crypto/internal/fips140/subtle/xor_amd64.go
rename to src/crypto/internal/fips140/subtle/xor_asm.go
index 3bb2f08b7c909e68f837fb7a0fcb3dd2b61ac016..16343db6588cb7ba402624c2eed026e45b5f9d5d 100644 (file)
@@ -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 (file)
index e49f0fc..0000000
+++ /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 (file)
index 760463c..0000000
+++ /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)