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 <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/argon2/blamka_amd64.s b/argon2/blamka_amd64.s
index c4c84f0..b2cc051 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 a78ab3b..4b9daa1 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 bb72a03..ae75eb9 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 82894e5..603d00c 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 9b8824f..e9df7a7 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 8fb49a1..63cae9e 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 3dad4b2..5c0fed2 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 8181611..f3ef5a0 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 55226b0..867c181 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 e013494..535d9ae 100644
--- a/curve25519/internal/field/_asm/fe_amd64_asm.go
+++ b/curve25519/internal/field/_asm/fe_amd64_asm.go
@@ -17,6 +17,7 @@
 
 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 0aa1e86..293f013 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 751ab2a..5c91e45 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 2cb0373..1d74f0f 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 3cede53..58422aa 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 bdd882c..69c64f8 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 f97efc6..c089277 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 8f4d187..4cfa543 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 e2df641..a0e051b 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"