mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-21 17:56:19 +08:00
refine build tags
This commit is contained in:
parent
df3166f032
commit
5adc912824
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package cipher
|
package cipher
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package cipher
|
package cipher
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build !amd64 && !arm64 || purego
|
//go:build purego || !(amd64 || arm64)
|
||||||
|
|
||||||
package cipher
|
package cipher
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ var curves = []struct {
|
|||||||
P: "SM2P256",
|
P: "SM2P256",
|
||||||
Element: "fiat.SM2P256Element",
|
Element: "fiat.SM2P256Element",
|
||||||
Params: _sm2ec.P256().Params(),
|
Params: _sm2ec.P256().Params(),
|
||||||
BuildTags: "",
|
BuildTags: "purego || !(amd64 || arm64)",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// https://link.springer.com/article/10.1007%2Fs13389-014-0090-x
|
// https://link.springer.com/article/10.1007%2Fs13389-014-0090-x
|
||||||
// https://eprint.iacr.org/2013/816.pdf
|
// https://eprint.iacr.org/2013/816.pdf
|
||||||
// https://github.com/emmansun/gmsm/wiki/SM2-WWMM-(2)
|
// https://github.com/emmansun/gmsm/wiki/SM2-WWMM-(2)
|
||||||
//go:build amd64 && !purego && !plugin
|
//go:build !(purego || plugin)
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
#include "p256_macros_amd64.s"
|
#include "p256_macros_amd64.s"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm2ec
|
package sm2ec
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// https://link.springer.com/article/10.1007%2Fs13389-014-0090-x
|
// https://link.springer.com/article/10.1007%2Fs13389-014-0090-x
|
||||||
// https://eprint.iacr.org/2013/816.pdf
|
// https://eprint.iacr.org/2013/816.pdf
|
||||||
// https://github.com/emmansun/gmsm/wiki/SM2-WWMM-(2)
|
// 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.
|
// plugin mode - DO NOT use the R15 Register.
|
||||||
// Below functions are different:
|
// Below functions are different:
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
// Code generated by generate.go. DO NOT EDIT.
|
// Code generated by generate.go. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build !amd64 && !arm64 || purego
|
//go:build purego || !(amd64 || arm64)
|
||||||
|
|
||||||
package sm2ec
|
package sm2ec
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
// 256-bit primes"
|
// 256-bit primes"
|
||||||
// https://link.springer.com/article/10.1007%2Fs13389-014-0090-x
|
// https://link.springer.com/article/10.1007%2Fs13389-014-0090-x
|
||||||
// https://eprint.iacr.org/2013/816.pdf
|
// https://eprint.iacr.org/2013/816.pdf
|
||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm2ec
|
package sm2ec
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm2ec
|
package sm2ec
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (!amd64 && !arm64) || purego
|
//go:build purego || !(amd64 || arm64)
|
||||||
|
|
||||||
package sm2ec
|
package sm2ec
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ func main() {
|
|||||||
buf := new(bytes.Buffer)
|
buf := new(bytes.Buffer)
|
||||||
fmt.Fprint(buf, `
|
fmt.Fprint(buf, `
|
||||||
// Generated by gen_sm3block_ni.go. DO NOT EDIT.
|
// Generated by gen_sm3block_ni.go. DO NOT EDIT.
|
||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
package sm3
|
package sm3
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
package sm3
|
package sm3
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build !amd64 && !arm64 || purego
|
//go:build purego || !(amd64 || arm64)
|
||||||
|
|
||||||
package sm3
|
package sm3
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Generated by gen_sm3block_ni.go. DO NOT EDIT.
|
// Generated by gen_sm3block_ni.go. DO NOT EDIT.
|
||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// This SM4 implementation referenced https://github.com/mjosaarinen/sm4ni/blob/master/sm4ni.c
|
// This SM4 implementation referenced https://github.com/mjosaarinen/sm4ni/blob/master/sm4ni.c
|
||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
#include "aesni_macros_amd64.s"
|
#include "aesni_macros_amd64.s"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build !amd64 && !arm64 || purego
|
//go:build purego || !(amd64 || arm64)
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
// Instruction and its Usage for Computing the GCM Mode rev. 2.02
|
// Instruction and its Usage for Computing the GCM Mode rev. 2.02
|
||||||
// [2] Gueron, S., Krasnov, V.: Speeding up Counter Mode in Software and
|
// [2] Gueron, S., Krasnov, V.: Speeding up Counter Mode in Software and
|
||||||
// Hardware
|
// Hardware
|
||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package sm4
|
package sm4
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego && !plugin
|
//go:build !(purego || plugin)
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (!amd64 && !arm64) || purego || plugin
|
//go:build purego || plugin || !(amd64 || arm64)
|
||||||
|
|
||||||
package bn256
|
package bn256
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego && !plugin
|
//go:build !(purego || plugin)
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
#include "gfp_macros_amd64.s"
|
#include "gfp_macros_amd64.s"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package bn256
|
package bn256
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (!amd64 && !arm64) || purego
|
//go:build purego || !(amd64 || arm64)
|
||||||
|
|
||||||
package bn256
|
package bn256
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego && plugin
|
//go:build plugin && !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
#include "gfp_macros_amd64.s"
|
#include "gfp_macros_amd64.s"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package bn256
|
package bn256
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (!amd64 && !arm64) || purego
|
//go:build purego || !(amd64 || arm64)
|
||||||
|
|
||||||
package bn256
|
package bn256
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Referenced Intel(R) Multi-Buffer Crypto for IPsec
|
// Referenced Intel(R) Multi-Buffer Crypto for IPsec
|
||||||
// https://github.com/intel/intel-ipsec-mb/
|
// https://github.com/intel/intel-ipsec-mb/
|
||||||
// https://gist.github.com/emmansun/15d2fce6659ab97ffaf7ab66e278caee
|
// https://gist.github.com/emmansun/15d2fce6659ab97ffaf7ab66e278caee
|
||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package zuc
|
package zuc
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (!amd64 && !arm64) || purego
|
//go:build purego || !(amd64 || arm64)
|
||||||
|
|
||||||
package zuc
|
package zuc
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package zuc
|
package zuc
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build !amd64 && !arm64 || purego
|
//go:build purego || !(amd64 || arm64)
|
||||||
|
|
||||||
package zuc
|
package zuc
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package zuc
|
package zuc
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Referenced Intel(R) Multi-Buffer Crypto for IPsec
|
// Referenced Intel(R) Multi-Buffer Crypto for IPsec
|
||||||
// https://github.com/intel/intel-ipsec-mb/
|
// https://github.com/intel/intel-ipsec-mb/
|
||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build !amd64 && !arm64 || purego
|
//go:build purego || !(amd64 || arm64)
|
||||||
|
|
||||||
package zuc
|
package zuc
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build (amd64 && !purego) || (arm64 && !purego)
|
//go:build (amd64 || arm64) && !purego
|
||||||
|
|
||||||
package zuc
|
package zuc
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Referenced Intel(R) Multi-Buffer Crypto for IPsec
|
// Referenced Intel(R) Multi-Buffer Crypto for IPsec
|
||||||
// https://github.com/intel/intel-ipsec-mb/
|
// https://github.com/intel/intel-ipsec-mb/
|
||||||
//go:build amd64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build arm64 && !purego
|
//go:build !purego
|
||||||
|
|
||||||
#include "textflag.h"
|
#include "textflag.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
//go:build !amd64 && !arm64 || purego
|
//go:build purego || !(amd64 || arm64)
|
||||||
|
|
||||||
package zuc
|
package zuc
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user