diff --git a/internal/xor/xor_amd64.go b/internal/xor/xor_amd64.go index a1c34ca..9ece77b 100644 --- a/internal/xor/xor_amd64.go +++ b/internal/xor/xor_amd64.go @@ -1,6 +1,8 @@ // 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 amd64 && !generic +// +build amd64,!generic package xor diff --git a/internal/xor/xor_arm64.go b/internal/xor/xor_arm64.go index d8ba70d..7453273 100644 --- a/internal/xor/xor_arm64.go +++ b/internal/xor/xor_arm64.go @@ -1,6 +1,8 @@ // 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 arm64 && !generic +// +build arm64,!generic package xor diff --git a/internal/xor/xor_generic.go b/internal/xor/xor_generic.go index 722ad16..20395e6 100644 --- a/internal/xor/xor_generic.go +++ b/internal/xor/xor_generic.go @@ -1,8 +1,8 @@ // Copyright 2013 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 !amd64 && !arm64 -// +build !amd64,!arm64 +//go:build !amd64 && !arm64 || generic +// +build !amd64,!arm64 generic package xor diff --git a/sm2/fuzz_test.go b/sm2/fuzz_test.go index 9dd5904..b4eaa2a 100644 --- a/sm2/fuzz_test.go +++ b/sm2/fuzz_test.go @@ -1,6 +1,3 @@ -//go:build amd64 || arm64 || ppc64le -// +build amd64 arm64 ppc64le - package sm2 import ( diff --git a/sm2/gen_p256_table.go b/sm2/gen_p256_table.go index 44476e9..111701f 100644 --- a/sm2/gen_p256_table.go +++ b/sm2/gen_p256_table.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build amd64 -// +build amd64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm2 @@ -18,8 +18,8 @@ func GenTables() { buf := new(bytes.Buffer) fmt.Fprint(buf, ` // Generated by gen_p256_table.go. DO NOT EDIT. -//go:build amd64 -// +build amd64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm2 `[1:]) diff --git a/sm2/p256.go b/sm2/p256.go index 5c07017..3035247 100644 --- a/sm2/p256.go +++ b/sm2/p256.go @@ -1,5 +1,5 @@ -//go:build !amd64 && !arm64 -// +build !amd64,!arm64 +//go:build !amd64 && !arm64 || generic +// +build !amd64,!arm64 generic package sm2 diff --git a/sm2/p256_asm.go b/sm2/p256_asm.go index 4814dba..3026780 100644 --- a/sm2/p256_asm.go +++ b/sm2/p256_asm.go @@ -7,8 +7,8 @@ // 256-bit primes" // https://link.springer.com/article/10.1007%2Fs13389-014-0090-x // https://eprint.iacr.org/2013/816.pdf -//go:build amd64 || arm64 -// +build amd64 arm64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm2 diff --git a/sm2/p256_asm_table.go b/sm2/p256_asm_table.go index 6016323..98ff4c0 100644 --- a/sm2/p256_asm_table.go +++ b/sm2/p256_asm_table.go @@ -1,6 +1,6 @@ // Generated by gen_p256_table.go. DO NOT EDIT. -//go:build amd64 || arm64 -// +build amd64 arm64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm2 diff --git a/sm2/p256_asm_table_test.go b/sm2/p256_asm_table_test.go index c5a5b3e..62e267b 100644 --- a/sm2/p256_asm_table_test.go +++ b/sm2/p256_asm_table_test.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build amd64 || arm64 -// +build amd64 arm64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm2 diff --git a/sm2/p256_asm_test.go b/sm2/p256_asm_test.go index 0afdc59..5cac3cd 100644 --- a/sm2/p256_asm_test.go +++ b/sm2/p256_asm_test.go @@ -1,5 +1,5 @@ -//go:build amd64 || arm64 -// +build amd64 arm64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm2 diff --git a/sm2/p256_generic.go b/sm2/p256_generic.go index 980972c..711b768 100644 --- a/sm2/p256_generic.go +++ b/sm2/p256_generic.go @@ -1,5 +1,5 @@ -//go:build !amd64 && !arm64 -// +build !amd64,!arm64 +//go:build !amd64 && !arm64 || generic +// +build !amd64,!arm64 generic package sm2 diff --git a/sm3/sm3block_amd64.go b/sm3/sm3block_amd64.go index c45430d..2c2f011 100644 --- a/sm3/sm3block_amd64.go +++ b/sm3/sm3block_amd64.go @@ -1,5 +1,5 @@ -//go:build amd64 -// +build amd64 +//go:build amd64 && !generic +// +build amd64,!generic package sm3 diff --git a/sm3/sm3block_arm64.go b/sm3/sm3block_arm64.go index 2bb89b9..8cfb110 100644 --- a/sm3/sm3block_arm64.go +++ b/sm3/sm3block_arm64.go @@ -1,5 +1,5 @@ -//go:build arm64 -// +build arm64 +//go:build arm64 && !generic +// +build arm64,!generic package sm3 diff --git a/sm3/sm3block_generic.go b/sm3/sm3block_generic.go index 81a0208..d1ce68e 100644 --- a/sm3/sm3block_generic.go +++ b/sm3/sm3block_generic.go @@ -1,5 +1,5 @@ -//go:build !amd64 && !arm64 -// +build !amd64,!arm64 +//go:build !amd64 && !arm64 || generic +// +build !amd64,!arm64 generic package sm3 diff --git a/sm4/cbc_cipher_asm.go b/sm4/cbc_cipher_asm.go index d396e77..0899deb 100644 --- a/sm4/cbc_cipher_asm.go +++ b/sm4/cbc_cipher_asm.go @@ -1,5 +1,5 @@ -//go:build amd64 || arm64 -// +build amd64 arm64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm4 diff --git a/sm4/cipher_asm.go b/sm4/cipher_asm.go index b05775a..1eadf21 100644 --- a/sm4/cipher_asm.go +++ b/sm4/cipher_asm.go @@ -1,5 +1,5 @@ -//go:build amd64 || arm64 -// +build amd64 arm64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm4 diff --git a/sm4/cipher_asm_fuzzy_test.go b/sm4/cipher_asm_fuzzy_test.go index b3894cd..5f88db1 100644 --- a/sm4/cipher_asm_fuzzy_test.go +++ b/sm4/cipher_asm_fuzzy_test.go @@ -1,5 +1,5 @@ -//go:build amd64 || arm64 -// +build amd64 arm64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm4 diff --git a/sm4/cipher_generic.go b/sm4/cipher_generic.go index ae56597..995b877 100644 --- a/sm4/cipher_generic.go +++ b/sm4/cipher_generic.go @@ -1,5 +1,5 @@ -//go:build !amd64 && !arm64 -// +build !amd64,!arm64 +//go:build !amd64 && !arm64 || generic +// +build !amd64,!arm64 generic package sm4 diff --git a/sm4/ctr_cipher_asm.go b/sm4/ctr_cipher_asm.go index 87ce060..7630eb1 100644 --- a/sm4/ctr_cipher_asm.go +++ b/sm4/ctr_cipher_asm.go @@ -1,5 +1,5 @@ -//go:build amd64 || arm64 -// +build amd64 arm64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm4 diff --git a/sm4/gcm_cipher_asm.go b/sm4/gcm_cipher_asm.go index 5705cf1..168a78f 100644 --- a/sm4/gcm_cipher_asm.go +++ b/sm4/gcm_cipher_asm.go @@ -1,5 +1,5 @@ -//go:build amd64 || arm64 -// +build amd64 arm64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm4 diff --git a/sm4/sm4_gcm_asm.go b/sm4/sm4_gcm_asm.go index 74c5481..5510e62 100644 --- a/sm4/sm4_gcm_asm.go +++ b/sm4/sm4_gcm_asm.go @@ -1,5 +1,5 @@ -//go:build amd64 || arm64 -// +build amd64 arm64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm4 diff --git a/sm4/sm4_gcm_test.go b/sm4/sm4_gcm_test.go index 36e30bc..f2eb4d5 100644 --- a/sm4/sm4_gcm_test.go +++ b/sm4/sm4_gcm_test.go @@ -1,5 +1,5 @@ -//go:build amd64 || arm64 -// +build amd64 arm64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm4 diff --git a/sm4/sm4ni_gcm_asm.go b/sm4/sm4ni_gcm_asm.go index 7832378..3b40f3d 100644 --- a/sm4/sm4ni_gcm_asm.go +++ b/sm4/sm4ni_gcm_asm.go @@ -1,5 +1,5 @@ -//go:build amd64 || arm64 -// +build amd64 arm64 +//go:build (amd64 && !generic) || (arm64 && !generic) +// +build amd64,!generic arm64,!generic package sm4