From cd7d49e622d578c4836740578d4bd1680bd789d6 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 12 May 2021 19:12:34 +0200 Subject: [PATCH] all: add //go:build lines to assembly files For golang/go#41184 Change-Id: Ica67fdbf2745ad2eef63dbb9ef70136e9e6fd348 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/319469 Trust: Tobias Klauser Run-TryBot: Tobias Klauser TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor --- argon2/blamka_amd64.s | 1 + blake2b/blake2bAVX2_amd64.s | 1 + blake2b/blake2b_amd64.s | 1 + blake2s/blake2s_386.s | 1 + blake2s/blake2s_amd64.s | 1 + chacha20/chacha_arm64.s | 1 + chacha20/chacha_ppc64le.s | 1 + chacha20/chacha_s390x.s | 1 + chacha20poly1305/chacha20poly1305_amd64.s | 1 + curve25519/internal/field/_asm/fe_amd64_asm.go | 1 + curve25519/internal/field/fe_amd64.s | 1 + curve25519/internal/field/fe_arm64.s | 1 + poly1305/sum_amd64.s | 1 + poly1305/sum_ppc64le.s | 1 + poly1305/sum_s390x.s | 1 + salsa20/salsa/salsa20_amd64.s | 1 + sha3/keccakf_amd64.s | 1 + sha3/sha3_s390x.s | 1 + 18 files changed, 18 insertions(+) diff --git a/argon2/blamka_amd64.s b/argon2/blamka_amd64.s index c4c84f07a0..b2cc051504 100644 --- a/argon2/blamka_amd64.s +++ b/argon2/blamka_amd64.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build amd64 && gc && !purego // +build amd64,gc,!purego #include "textflag.h" diff --git a/blake2b/blake2bAVX2_amd64.s b/blake2b/blake2bAVX2_amd64.s index a78ab3b3d9..4b9daa18d9 100644 --- a/blake2b/blake2bAVX2_amd64.s +++ b/blake2b/blake2bAVX2_amd64.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build go1.7 && amd64 && gc && !purego // +build go1.7,amd64,gc,!purego #include "textflag.h" diff --git a/blake2b/blake2b_amd64.s b/blake2b/blake2b_amd64.s index bb72a03913..ae75eb9afc 100644 --- a/blake2b/blake2b_amd64.s +++ b/blake2b/blake2b_amd64.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build amd64 && gc && !purego // +build amd64,gc,!purego #include "textflag.h" diff --git a/blake2s/blake2s_386.s b/blake2s/blake2s_386.s index 82894e5a92..603d00ca32 100644 --- a/blake2s/blake2s_386.s +++ b/blake2s/blake2s_386.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build 386 && gc && !purego // +build 386,gc,!purego #include "textflag.h" diff --git a/blake2s/blake2s_amd64.s b/blake2s/blake2s_amd64.s index 9b8824f741..e9df7a7c21 100644 --- a/blake2s/blake2s_amd64.s +++ b/blake2s/blake2s_amd64.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build amd64 && gc && !purego // +build amd64,gc,!purego #include "textflag.h" diff --git a/chacha20/chacha_arm64.s b/chacha20/chacha_arm64.s index 8fb49a13e3..63cae9e6f0 100644 --- a/chacha20/chacha_arm64.s +++ b/chacha20/chacha_arm64.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build go1.11 && gc && !purego // +build go1.11,gc,!purego #include "textflag.h" diff --git a/chacha20/chacha_ppc64le.s b/chacha20/chacha_ppc64le.s index 3dad4b2fa2..5c0fed26f8 100644 --- a/chacha20/chacha_ppc64le.s +++ b/chacha20/chacha_ppc64le.s @@ -19,6 +19,7 @@ // The differences in this and the original implementation are // due to the calling conventions and initialization of constants. +//go:build gc && !purego // +build gc,!purego #include "textflag.h" diff --git a/chacha20/chacha_s390x.s b/chacha20/chacha_s390x.s index 818161189b..f3ef5a019d 100644 --- a/chacha20/chacha_s390x.s +++ b/chacha20/chacha_s390x.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build gc && !purego // +build gc,!purego #include "go_asm.h" diff --git a/chacha20poly1305/chacha20poly1305_amd64.s b/chacha20poly1305/chacha20poly1305_amd64.s index 55226b0e6c..867c181a14 100644 --- a/chacha20poly1305/chacha20poly1305_amd64.s +++ b/chacha20poly1305/chacha20poly1305_amd64.s @@ -4,6 +4,7 @@ // This file was originally from https://golang.org/cl/24717 by Vlad Krasnov of CloudFlare. +//go:build gc && !purego // +build gc,!purego #include "textflag.h" diff --git a/curve25519/internal/field/_asm/fe_amd64_asm.go b/curve25519/internal/field/_asm/fe_amd64_asm.go index e013494d3d..535d9aecb1 100644 --- a/curve25519/internal/field/_asm/fe_amd64_asm.go +++ b/curve25519/internal/field/_asm/fe_amd64_asm.go @@ -17,6 +17,7 @@ import ( func main() { Package("golang.org/x/crypto/curve25519/internal/field") + Comment("//go:build amd64 && gc && !purego") ConstraintExpr("amd64,gc,!purego") feMul() feSquare() diff --git a/curve25519/internal/field/fe_amd64.s b/curve25519/internal/field/fe_amd64.s index 0aa1e86d98..293f013c94 100644 --- a/curve25519/internal/field/fe_amd64.s +++ b/curve25519/internal/field/fe_amd64.s @@ -1,5 +1,6 @@ // Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT. +//go:build amd64 && gc && !purego // +build amd64,gc,!purego #include "textflag.h" diff --git a/curve25519/internal/field/fe_arm64.s b/curve25519/internal/field/fe_arm64.s index 751ab2ada3..5c91e45892 100644 --- a/curve25519/internal/field/fe_arm64.s +++ b/curve25519/internal/field/fe_arm64.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build arm64 && gc && !purego // +build arm64,gc,!purego #include "textflag.h" diff --git a/poly1305/sum_amd64.s b/poly1305/sum_amd64.s index 2cb0373140..1d74f0f881 100644 --- a/poly1305/sum_amd64.s +++ b/poly1305/sum_amd64.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build gc && !purego // +build gc,!purego #include "textflag.h" diff --git a/poly1305/sum_ppc64le.s b/poly1305/sum_ppc64le.s index 3cede539dc..58422aad23 100644 --- a/poly1305/sum_ppc64le.s +++ b/poly1305/sum_ppc64le.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build gc && !purego // +build gc,!purego #include "textflag.h" diff --git a/poly1305/sum_s390x.s b/poly1305/sum_s390x.s index bdd882c606..69c64f8421 100644 --- a/poly1305/sum_s390x.s +++ b/poly1305/sum_s390x.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build gc && !purego // +build gc,!purego #include "textflag.h" diff --git a/salsa20/salsa/salsa20_amd64.s b/salsa20/salsa/salsa20_amd64.s index f97efc6764..c089277204 100644 --- a/salsa20/salsa/salsa20_amd64.s +++ b/salsa20/salsa/salsa20_amd64.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build amd64 && !purego && gc // +build amd64,!purego,gc // This code was translated into a form compatible with 6a from the public diff --git a/sha3/keccakf_amd64.s b/sha3/keccakf_amd64.s index 8f4d1877ce..4cfa54383b 100644 --- a/sha3/keccakf_amd64.s +++ b/sha3/keccakf_amd64.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build amd64 && !purego && gc // +build amd64,!purego,gc // This code was translated into a form compatible with 6a from the public diff --git a/sha3/sha3_s390x.s b/sha3/sha3_s390x.s index e2df6412e7..a0e051b045 100644 --- a/sha3/sha3_s390x.s +++ b/sha3/sha3_s390x.s @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build gc && !purego // +build gc,!purego #include "textflag.h"