From 5adc9128241561070ca015cea4008ca53ad976f5 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Tue, 5 Mar 2024 09:47:49 +0800 Subject: [PATCH] refine build tags --- cipher/xts_amd64.s | 2 +- cipher/xts_arm64.s | 2 +- cipher/xts_asm.go | 2 +- cipher/xts_asm_test.go | 2 +- cipher/xts_generic.go | 2 +- internal/sm2ec/generate.go | 2 +- internal/sm2ec/p256_asm_amd64.s | 2 +- internal/sm2ec/p256_asm_ord.go | 2 +- internal/sm2ec/p256_common_amd64.s | 2 +- internal/sm2ec/p256_plugin_amd64.s | 2 +- internal/sm2ec/sm2p256.go | 2 +- internal/sm2ec/sm2p256_asm.go | 2 +- internal/sm2ec/sm2p256_asm_test.go | 2 +- internal/sm2ec/sm2p256_ord.go | 2 +- sm3/gen_sm3block_ni.go | 2 +- sm3/sm3block_amd64.go | 2 +- sm3/sm3block_amd64.s | 2 +- sm3/sm3block_arm64.go | 2 +- sm3/sm3block_arm64.s | 2 +- sm3/sm3block_avx2_amd64.s | 2 +- sm3/sm3block_generic.go | 2 +- sm3/sm3block_simd_amd64.s | 2 +- sm3/sm3blockni_arm64.s | 2 +- sm4/asm_amd64.s | 2 +- sm4/asm_arm64.s | 2 +- sm4/cbc_amd64.s | 2 +- sm4/cbc_arm64.s | 2 +- sm4/cbc_cipher_asm.go | 2 +- sm4/cbc_cipher_test.go | 2 +- sm4/cipher_asm.go | 2 +- sm4/cipher_asm_fuzzy_test.go | 2 +- sm4/cipher_asm_test.go | 2 +- sm4/cipher_generic.go | 2 +- sm4/cipher_ni.go | 2 +- sm4/ctr_cipher_asm.go | 2 +- sm4/ecb_amd64.s | 2 +- sm4/ecb_arm64.s | 2 +- sm4/ecb_cipher_asm.go | 2 +- sm4/gcm_amd64.s | 2 +- sm4/gcm_arm64.s | 2 +- sm4/gcm_cipher_asm.go | 2 +- sm4/gcm_sm4ni_arm64.s | 2 +- sm4/sm4_gcm_asm.go | 2 +- sm4/sm4_xts.go | 2 +- sm4/sm4ni_gcm_asm.go | 2 +- sm4/xts_amd64.s | 2 +- sm4/xts_arm64.s | 2 +- sm4/xts_sm4ni_arm64.s | 2 +- sm9/bn256/gfp2_g1_amd64.s | 2 +- sm9/bn256/gfp2_g1_arm64.s | 2 +- sm9/bn256/gfp2_g1_generic.go | 2 +- sm9/bn256/gfp_amd64.s | 2 +- sm9/bn256/gfp_arm64.s | 2 +- sm9/bn256/gfp_cmn_amd64.s | 2 +- sm9/bn256/gfp_decl.go | 2 +- sm9/bn256/gfp_generic.go | 2 +- sm9/bn256/gfp_plugin_amd64.s | 2 +- sm9/bn256/select_amd64.s | 2 +- sm9/bn256/select_arm64.s | 2 +- sm9/bn256/select_decl.go | 2 +- sm9/bn256/select_generic.go | 2 +- zuc/asm_amd64.s | 2 +- zuc/asm_arm64.s | 2 +- zuc/core_asm.go | 2 +- zuc/core_generic.go | 2 +- zuc/eea_asm.go | 2 +- zuc/eea_generic.go | 2 +- zuc/eia256_asm.go | 2 +- zuc/eia256_asm_amd64.s | 2 +- zuc/eia256_asm_arm64.s | 2 +- zuc/eia256_generic.go | 2 +- zuc/eia_asm.go | 2 +- zuc/eia_asm_amd64.s | 2 +- zuc/eia_asm_arm64.s | 2 +- zuc/eia_generic.go | 2 +- 75 files changed, 75 insertions(+), 75 deletions(-) diff --git a/cipher/xts_amd64.s b/cipher/xts_amd64.s index 4595b6c..35bf8ca 100644 --- a/cipher/xts_amd64.s +++ b/cipher/xts_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/cipher/xts_arm64.s b/cipher/xts_arm64.s index 61b3582..beb7f3c 100644 --- a/cipher/xts_arm64.s +++ b/cipher/xts_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/cipher/xts_asm.go b/cipher/xts_asm.go index 6917a11..155a8be 100644 --- a/cipher/xts_asm.go +++ b/cipher/xts_asm.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package cipher diff --git a/cipher/xts_asm_test.go b/cipher/xts_asm_test.go index 236d8bf..a09c590 100644 --- a/cipher/xts_asm_test.go +++ b/cipher/xts_asm_test.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package cipher diff --git a/cipher/xts_generic.go b/cipher/xts_generic.go index b3bd411..eda96e7 100644 --- a/cipher/xts_generic.go +++ b/cipher/xts_generic.go @@ -1,4 +1,4 @@ -//go:build !amd64 && !arm64 || purego +//go:build purego || !(amd64 || arm64) package cipher diff --git a/internal/sm2ec/generate.go b/internal/sm2ec/generate.go index 57a27b5..dc7bca4 100644 --- a/internal/sm2ec/generate.go +++ b/internal/sm2ec/generate.go @@ -37,7 +37,7 @@ var curves = []struct { P: "SM2P256", Element: "fiat.SM2P256Element", Params: _sm2ec.P256().Params(), - BuildTags: "", + BuildTags: "purego || !(amd64 || arm64)", }, } diff --git a/internal/sm2ec/p256_asm_amd64.s b/internal/sm2ec/p256_asm_amd64.s index fafcb53..5d3255e 100644 --- a/internal/sm2ec/p256_asm_amd64.s +++ b/internal/sm2ec/p256_asm_amd64.s @@ -5,7 +5,7 @@ // https://link.springer.com/article/10.1007%2Fs13389-014-0090-x // https://eprint.iacr.org/2013/816.pdf // https://github.com/emmansun/gmsm/wiki/SM2-WWMM-(2) -//go:build amd64 && !purego && !plugin +//go:build !(purego || plugin) #include "textflag.h" #include "p256_macros_amd64.s" diff --git a/internal/sm2ec/p256_asm_ord.go b/internal/sm2ec/p256_asm_ord.go index a466e47..752587c 100644 --- a/internal/sm2ec/p256_asm_ord.go +++ b/internal/sm2ec/p256_asm_ord.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm2ec diff --git a/internal/sm2ec/p256_common_amd64.s b/internal/sm2ec/p256_common_amd64.s index 7eb13c8..478d221 100644 --- a/internal/sm2ec/p256_common_amd64.s +++ b/internal/sm2ec/p256_common_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/internal/sm2ec/p256_plugin_amd64.s b/internal/sm2ec/p256_plugin_amd64.s index 00cd6f0..80205ac 100644 --- a/internal/sm2ec/p256_plugin_amd64.s +++ b/internal/sm2ec/p256_plugin_amd64.s @@ -5,7 +5,7 @@ // https://link.springer.com/article/10.1007%2Fs13389-014-0090-x // https://eprint.iacr.org/2013/816.pdf // https://github.com/emmansun/gmsm/wiki/SM2-WWMM-(2) -//go:build amd64 && !purego && plugin +//go:build plugin && !purego // plugin mode - DO NOT use the R15 Register. // Below functions are different: diff --git a/internal/sm2ec/sm2p256.go b/internal/sm2ec/sm2p256.go index 1350b19..af2b93e 100644 --- a/internal/sm2ec/sm2p256.go +++ b/internal/sm2ec/sm2p256.go @@ -4,7 +4,7 @@ // Code generated by generate.go. DO NOT EDIT. -//go:build !amd64 && !arm64 || purego +//go:build purego || !(amd64 || arm64) package sm2ec diff --git a/internal/sm2ec/sm2p256_asm.go b/internal/sm2ec/sm2p256_asm.go index e1c8528..d8fb10f 100644 --- a/internal/sm2ec/sm2p256_asm.go +++ b/internal/sm2ec/sm2p256_asm.go @@ -7,7 +7,7 @@ // 256-bit primes" // https://link.springer.com/article/10.1007%2Fs13389-014-0090-x // https://eprint.iacr.org/2013/816.pdf -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm2ec diff --git a/internal/sm2ec/sm2p256_asm_test.go b/internal/sm2ec/sm2p256_asm_test.go index 52b79af..78e436a 100644 --- a/internal/sm2ec/sm2p256_asm_test.go +++ b/internal/sm2ec/sm2p256_asm_test.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm2ec diff --git a/internal/sm2ec/sm2p256_ord.go b/internal/sm2ec/sm2p256_ord.go index 7eeb067..d102021 100644 --- a/internal/sm2ec/sm2p256_ord.go +++ b/internal/sm2ec/sm2p256_ord.go @@ -1,4 +1,4 @@ -//go:build (!amd64 && !arm64) || purego +//go:build purego || !(amd64 || arm64) package sm2ec diff --git a/sm3/gen_sm3block_ni.go b/sm3/gen_sm3block_ni.go index adedae8..c9dcb44 100644 --- a/sm3/gen_sm3block_ni.go +++ b/sm3/gen_sm3block_ni.go @@ -126,7 +126,7 @@ func main() { buf := new(bytes.Buffer) fmt.Fprint(buf, ` // Generated by gen_sm3block_ni.go. DO NOT EDIT. -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm3/sm3block_amd64.go b/sm3/sm3block_amd64.go index 9754652..e21dab7 100644 --- a/sm3/sm3block_amd64.go +++ b/sm3/sm3block_amd64.go @@ -1,4 +1,4 @@ -//go:build amd64 && !purego +//go:build !purego package sm3 diff --git a/sm3/sm3block_amd64.s b/sm3/sm3block_amd64.s index 41312dd..5eb5785 100644 --- a/sm3/sm3block_amd64.s +++ b/sm3/sm3block_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm3/sm3block_arm64.go b/sm3/sm3block_arm64.go index 4f739da..de6a808 100644 --- a/sm3/sm3block_arm64.go +++ b/sm3/sm3block_arm64.go @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego package sm3 diff --git a/sm3/sm3block_arm64.s b/sm3/sm3block_arm64.s index 391b40e..69aacb1 100644 --- a/sm3/sm3block_arm64.s +++ b/sm3/sm3block_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm3/sm3block_avx2_amd64.s b/sm3/sm3block_avx2_amd64.s index 615371b..8f0b013 100644 --- a/sm3/sm3block_avx2_amd64.s +++ b/sm3/sm3block_avx2_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm3/sm3block_generic.go b/sm3/sm3block_generic.go index c5d47e6..4da5439 100644 --- a/sm3/sm3block_generic.go +++ b/sm3/sm3block_generic.go @@ -1,4 +1,4 @@ -//go:build !amd64 && !arm64 || purego +//go:build purego || !(amd64 || arm64) package sm3 diff --git a/sm3/sm3block_simd_amd64.s b/sm3/sm3block_simd_amd64.s index 4ce2f55..68e1fd4 100644 --- a/sm3/sm3block_simd_amd64.s +++ b/sm3/sm3block_simd_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm3/sm3blockni_arm64.s b/sm3/sm3blockni_arm64.s index 8d7df9e..67a440b 100644 --- a/sm3/sm3blockni_arm64.s +++ b/sm3/sm3blockni_arm64.s @@ -1,5 +1,5 @@ // Generated by gen_sm3block_ni.go. DO NOT EDIT. -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm4/asm_amd64.s b/sm4/asm_amd64.s index 531b65d..ea4f9f9 100644 --- a/sm4/asm_amd64.s +++ b/sm4/asm_amd64.s @@ -1,5 +1,5 @@ // This SM4 implementation referenced https://github.com/mjosaarinen/sm4ni/blob/master/sm4ni.c -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm4/asm_arm64.s b/sm4/asm_arm64.s index 84e96c9..b3dbd0e 100644 --- a/sm4/asm_arm64.s +++ b/sm4/asm_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm4/cbc_amd64.s b/sm4/cbc_amd64.s index 6d8f760..1fe3bfb 100644 --- a/sm4/cbc_amd64.s +++ b/sm4/cbc_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" #include "aesni_macros_amd64.s" diff --git a/sm4/cbc_arm64.s b/sm4/cbc_arm64.s index 46b727e..0ab2db3 100644 --- a/sm4/cbc_arm64.s +++ b/sm4/cbc_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm4/cbc_cipher_asm.go b/sm4/cbc_cipher_asm.go index 613306e..5820f38 100644 --- a/sm4/cbc_cipher_asm.go +++ b/sm4/cbc_cipher_asm.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm4 diff --git a/sm4/cbc_cipher_test.go b/sm4/cbc_cipher_test.go index 71b4532..fdf64a1 100644 --- a/sm4/cbc_cipher_test.go +++ b/sm4/cbc_cipher_test.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm4 diff --git a/sm4/cipher_asm.go b/sm4/cipher_asm.go index 56cbaf1..effe4a2 100644 --- a/sm4/cipher_asm.go +++ b/sm4/cipher_asm.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm4 diff --git a/sm4/cipher_asm_fuzzy_test.go b/sm4/cipher_asm_fuzzy_test.go index 05b3082..11c8881 100644 --- a/sm4/cipher_asm_fuzzy_test.go +++ b/sm4/cipher_asm_fuzzy_test.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm4 diff --git a/sm4/cipher_asm_test.go b/sm4/cipher_asm_test.go index eb6069e..e75db8e 100644 --- a/sm4/cipher_asm_test.go +++ b/sm4/cipher_asm_test.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm4 diff --git a/sm4/cipher_generic.go b/sm4/cipher_generic.go index ce05b99..215280b 100644 --- a/sm4/cipher_generic.go +++ b/sm4/cipher_generic.go @@ -1,4 +1,4 @@ -//go:build !amd64 && !arm64 || purego +//go:build purego || !(amd64 || arm64) package sm4 diff --git a/sm4/cipher_ni.go b/sm4/cipher_ni.go index b9cd84e..efe458b 100644 --- a/sm4/cipher_ni.go +++ b/sm4/cipher_ni.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm4 diff --git a/sm4/ctr_cipher_asm.go b/sm4/ctr_cipher_asm.go index a716646..d316bbe 100644 --- a/sm4/ctr_cipher_asm.go +++ b/sm4/ctr_cipher_asm.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm4 diff --git a/sm4/ecb_amd64.s b/sm4/ecb_amd64.s index 75f8d0e..6efafe9 100644 --- a/sm4/ecb_amd64.s +++ b/sm4/ecb_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm4/ecb_arm64.s b/sm4/ecb_arm64.s index 602a07c..d1478bc 100644 --- a/sm4/ecb_arm64.s +++ b/sm4/ecb_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm4/ecb_cipher_asm.go b/sm4/ecb_cipher_asm.go index b985233..e68bb2a 100644 --- a/sm4/ecb_cipher_asm.go +++ b/sm4/ecb_cipher_asm.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm4 diff --git a/sm4/gcm_amd64.s b/sm4/gcm_amd64.s index 8529adb..a6b6a10 100644 --- a/sm4/gcm_amd64.s +++ b/sm4/gcm_amd64.s @@ -4,7 +4,7 @@ // Instruction and its Usage for Computing the GCM Mode rev. 2.02 // [2] Gueron, S., Krasnov, V.: Speeding up Counter Mode in Software and // Hardware -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm4/gcm_arm64.s b/sm4/gcm_arm64.s index e4b6c78..2858ef0 100644 --- a/sm4/gcm_arm64.s +++ b/sm4/gcm_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm4/gcm_cipher_asm.go b/sm4/gcm_cipher_asm.go index 2471b6a..f8106cc 100644 --- a/sm4/gcm_cipher_asm.go +++ b/sm4/gcm_cipher_asm.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm4 diff --git a/sm4/gcm_sm4ni_arm64.s b/sm4/gcm_sm4ni_arm64.s index 492e505..de4ff0f 100644 --- a/sm4/gcm_sm4ni_arm64.s +++ b/sm4/gcm_sm4ni_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm4/sm4_gcm_asm.go b/sm4/sm4_gcm_asm.go index c46feeb..def90dd 100644 --- a/sm4/sm4_gcm_asm.go +++ b/sm4/sm4_gcm_asm.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm4 diff --git a/sm4/sm4_xts.go b/sm4/sm4_xts.go index 58e9d2e..f3ecaa1 100644 --- a/sm4/sm4_xts.go +++ b/sm4/sm4_xts.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm4 diff --git a/sm4/sm4ni_gcm_asm.go b/sm4/sm4ni_gcm_asm.go index 3f2640b..11ce21e 100644 --- a/sm4/sm4ni_gcm_asm.go +++ b/sm4/sm4ni_gcm_asm.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package sm4 diff --git a/sm4/xts_amd64.s b/sm4/xts_amd64.s index d66988c..2aed99f 100644 --- a/sm4/xts_amd64.s +++ b/sm4/xts_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm4/xts_arm64.s b/sm4/xts_arm64.s index c2154a7..152572b 100644 --- a/sm4/xts_arm64.s +++ b/sm4/xts_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm4/xts_sm4ni_arm64.s b/sm4/xts_sm4ni_arm64.s index a336876..e353bae 100644 --- a/sm4/xts_sm4ni_arm64.s +++ b/sm4/xts_sm4ni_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm9/bn256/gfp2_g1_amd64.s b/sm9/bn256/gfp2_g1_amd64.s index dc44d77..be0bf32 100644 --- a/sm9/bn256/gfp2_g1_amd64.s +++ b/sm9/bn256/gfp2_g1_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego && !plugin +//go:build !(purego || plugin) #include "textflag.h" diff --git a/sm9/bn256/gfp2_g1_arm64.s b/sm9/bn256/gfp2_g1_arm64.s index 6bbaee3..f9a5baa 100644 --- a/sm9/bn256/gfp2_g1_arm64.s +++ b/sm9/bn256/gfp2_g1_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm9/bn256/gfp2_g1_generic.go b/sm9/bn256/gfp2_g1_generic.go index 72e7649..2ad3025 100644 --- a/sm9/bn256/gfp2_g1_generic.go +++ b/sm9/bn256/gfp2_g1_generic.go @@ -1,4 +1,4 @@ -//go:build (!amd64 && !arm64) || purego || plugin +//go:build purego || plugin || !(amd64 || arm64) package bn256 diff --git a/sm9/bn256/gfp_amd64.s b/sm9/bn256/gfp_amd64.s index 5fc3e4e..a1e2d18 100644 --- a/sm9/bn256/gfp_amd64.s +++ b/sm9/bn256/gfp_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego && !plugin +//go:build !(purego || plugin) #include "textflag.h" #include "gfp_macros_amd64.s" diff --git a/sm9/bn256/gfp_arm64.s b/sm9/bn256/gfp_arm64.s index 5e0b364..55b38d4 100644 --- a/sm9/bn256/gfp_arm64.s +++ b/sm9/bn256/gfp_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm9/bn256/gfp_cmn_amd64.s b/sm9/bn256/gfp_cmn_amd64.s index 215d846..7fb23ea 100644 --- a/sm9/bn256/gfp_cmn_amd64.s +++ b/sm9/bn256/gfp_cmn_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm9/bn256/gfp_decl.go b/sm9/bn256/gfp_decl.go index eddd793..e91d7ba 100644 --- a/sm9/bn256/gfp_decl.go +++ b/sm9/bn256/gfp_decl.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package bn256 diff --git a/sm9/bn256/gfp_generic.go b/sm9/bn256/gfp_generic.go index 08608bd..5ea9c17 100644 --- a/sm9/bn256/gfp_generic.go +++ b/sm9/bn256/gfp_generic.go @@ -1,4 +1,4 @@ -//go:build (!amd64 && !arm64) || purego +//go:build purego || !(amd64 || arm64) package bn256 diff --git a/sm9/bn256/gfp_plugin_amd64.s b/sm9/bn256/gfp_plugin_amd64.s index e6f0c3d..dd6cbce 100644 --- a/sm9/bn256/gfp_plugin_amd64.s +++ b/sm9/bn256/gfp_plugin_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego && plugin +//go:build plugin && !purego #include "textflag.h" #include "gfp_macros_amd64.s" diff --git a/sm9/bn256/select_amd64.s b/sm9/bn256/select_amd64.s index b04b821..7e7bacf 100644 --- a/sm9/bn256/select_amd64.s +++ b/sm9/bn256/select_amd64.s @@ -1,4 +1,4 @@ -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm9/bn256/select_arm64.s b/sm9/bn256/select_arm64.s index 77c4be1..e06ba16 100644 --- a/sm9/bn256/select_arm64.s +++ b/sm9/bn256/select_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/sm9/bn256/select_decl.go b/sm9/bn256/select_decl.go index 92f8ad3..b0bdee6 100644 --- a/sm9/bn256/select_decl.go +++ b/sm9/bn256/select_decl.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package bn256 diff --git a/sm9/bn256/select_generic.go b/sm9/bn256/select_generic.go index 4af7241..d3224a5 100644 --- a/sm9/bn256/select_generic.go +++ b/sm9/bn256/select_generic.go @@ -1,4 +1,4 @@ -//go:build (!amd64 && !arm64) || purego +//go:build purego || !(amd64 || arm64) package bn256 diff --git a/zuc/asm_amd64.s b/zuc/asm_amd64.s index d50addc..5516ba3 100644 --- a/zuc/asm_amd64.s +++ b/zuc/asm_amd64.s @@ -1,7 +1,7 @@ // Referenced Intel(R) Multi-Buffer Crypto for IPsec // https://github.com/intel/intel-ipsec-mb/ // https://gist.github.com/emmansun/15d2fce6659ab97ffaf7ab66e278caee -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/zuc/asm_arm64.s b/zuc/asm_arm64.s index e4b9be1..111fdec 100644 --- a/zuc/asm_arm64.s +++ b/zuc/asm_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/zuc/core_asm.go b/zuc/core_asm.go index 8953dd9..bb8d3f7 100644 --- a/zuc/core_asm.go +++ b/zuc/core_asm.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package zuc diff --git a/zuc/core_generic.go b/zuc/core_generic.go index 9db91ba..1d3fadb 100644 --- a/zuc/core_generic.go +++ b/zuc/core_generic.go @@ -1,4 +1,4 @@ -//go:build (!amd64 && !arm64) || purego +//go:build purego || !(amd64 || arm64) package zuc diff --git a/zuc/eea_asm.go b/zuc/eea_asm.go index 0af0dae..eb567a9 100644 --- a/zuc/eea_asm.go +++ b/zuc/eea_asm.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package zuc diff --git a/zuc/eea_generic.go b/zuc/eea_generic.go index d701552..24731dc 100644 --- a/zuc/eea_generic.go +++ b/zuc/eea_generic.go @@ -1,4 +1,4 @@ -//go:build !amd64 && !arm64 || purego +//go:build purego || !(amd64 || arm64) package zuc diff --git a/zuc/eia256_asm.go b/zuc/eia256_asm.go index bb369f4..9bf8616 100644 --- a/zuc/eia256_asm.go +++ b/zuc/eia256_asm.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package zuc diff --git a/zuc/eia256_asm_amd64.s b/zuc/eia256_asm_amd64.s index 3e016a2..c2632c9 100644 --- a/zuc/eia256_asm_amd64.s +++ b/zuc/eia256_asm_amd64.s @@ -1,6 +1,6 @@ // Referenced Intel(R) Multi-Buffer Crypto for IPsec // https://github.com/intel/intel-ipsec-mb/ -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/zuc/eia256_asm_arm64.s b/zuc/eia256_asm_arm64.s index 7fa6bf9..3793423 100644 --- a/zuc/eia256_asm_arm64.s +++ b/zuc/eia256_asm_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/zuc/eia256_generic.go b/zuc/eia256_generic.go index 5491ce2..0d26672 100644 --- a/zuc/eia256_generic.go +++ b/zuc/eia256_generic.go @@ -1,4 +1,4 @@ -//go:build !amd64 && !arm64 || purego +//go:build purego || !(amd64 || arm64) package zuc diff --git a/zuc/eia_asm.go b/zuc/eia_asm.go index d525760..8f10dd6 100644 --- a/zuc/eia_asm.go +++ b/zuc/eia_asm.go @@ -1,4 +1,4 @@ -//go:build (amd64 && !purego) || (arm64 && !purego) +//go:build (amd64 || arm64) && !purego package zuc diff --git a/zuc/eia_asm_amd64.s b/zuc/eia_asm_amd64.s index ccbbbf7..b63339c 100644 --- a/zuc/eia_asm_amd64.s +++ b/zuc/eia_asm_amd64.s @@ -1,6 +1,6 @@ // Referenced Intel(R) Multi-Buffer Crypto for IPsec // https://github.com/intel/intel-ipsec-mb/ -//go:build amd64 && !purego +//go:build !purego #include "textflag.h" diff --git a/zuc/eia_asm_arm64.s b/zuc/eia_asm_arm64.s index e421f8d..fe47ca4 100644 --- a/zuc/eia_asm_arm64.s +++ b/zuc/eia_asm_arm64.s @@ -1,4 +1,4 @@ -//go:build arm64 && !purego +//go:build !purego #include "textflag.h" diff --git a/zuc/eia_generic.go b/zuc/eia_generic.go index af2e321..51e8bde 100644 --- a/zuc/eia_generic.go +++ b/zuc/eia_generic.go @@ -1,4 +1,4 @@ -//go:build !amd64 && !arm64 || purego +//go:build purego || !(amd64 || arm64) package zuc