diff --git a/ecc/bls12-377/fp/element_purego.go b/ecc/bls12-377/fp/element_purego.go index be2027de1..93afd9075 100644 --- a/ecc/bls12-377/fp/element_purego.go +++ b/ecc/bls12-377/fp/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego +//go:build purego || (!amd64 && !arm64) // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bls12-377/fr/element_purego.go b/ecc/bls12-377/fr/element_purego.go index aa0c3e9a7..60de09997 100644 --- a/ecc/bls12-377/fr/element_purego.go +++ b/ecc/bls12-377/fr/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego +//go:build purego || (!amd64 && !arm64) // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bls12-377/fr/vector_purego.go b/ecc/bls12-377/fr/vector_purego.go index d09c25980..84f86a40b 100644 --- a/ecc/bls12-377/fr/vector_purego.go +++ b/ecc/bls12-377/fr/vector_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bls12-381/fp/element_purego.go b/ecc/bls12-381/fp/element_purego.go index 511c52f1f..ac96223a0 100644 --- a/ecc/bls12-381/fp/element_purego.go +++ b/ecc/bls12-381/fp/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego +//go:build purego || (!amd64 && !arm64) // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bls12-381/fr/element_purego.go b/ecc/bls12-381/fr/element_purego.go index be6e50e1f..193edfb5d 100644 --- a/ecc/bls12-381/fr/element_purego.go +++ b/ecc/bls12-381/fr/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego +//go:build purego || (!amd64 && !arm64) // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bls12-381/fr/vector_purego.go b/ecc/bls12-381/fr/vector_purego.go index d09c25980..84f86a40b 100644 --- a/ecc/bls12-381/fr/vector_purego.go +++ b/ecc/bls12-381/fr/vector_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bls24-315/fp/element_purego.go b/ecc/bls24-315/fp/element_purego.go index 92806a73c..f5c6690f7 100644 --- a/ecc/bls24-315/fp/element_purego.go +++ b/ecc/bls24-315/fp/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bls24-315/fr/element_purego.go b/ecc/bls24-315/fr/element_purego.go index 28d51a086..a93f64f06 100644 --- a/ecc/bls24-315/fr/element_purego.go +++ b/ecc/bls24-315/fr/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego +//go:build purego || (!amd64 && !arm64) // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bls24-315/fr/vector_purego.go b/ecc/bls24-315/fr/vector_purego.go index d09c25980..84f86a40b 100644 --- a/ecc/bls24-315/fr/vector_purego.go +++ b/ecc/bls24-315/fr/vector_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bls24-317/fp/element_purego.go b/ecc/bls24-317/fp/element_purego.go index 9c855b347..0f21692f4 100644 --- a/ecc/bls24-317/fp/element_purego.go +++ b/ecc/bls24-317/fp/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bls24-317/fr/element_purego.go b/ecc/bls24-317/fr/element_purego.go index af2c85d2c..c9b8bd461 100644 --- a/ecc/bls24-317/fr/element_purego.go +++ b/ecc/bls24-317/fr/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego +//go:build purego || (!amd64 && !arm64) // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bls24-317/fr/vector_purego.go b/ecc/bls24-317/fr/vector_purego.go index d09c25980..84f86a40b 100644 --- a/ecc/bls24-317/fr/vector_purego.go +++ b/ecc/bls24-317/fr/vector_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bn254/fp/element_purego.go b/ecc/bn254/fp/element_purego.go index 00300a218..ded61b608 100644 --- a/ecc/bn254/fp/element_purego.go +++ b/ecc/bn254/fp/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego +//go:build purego || (!amd64 && !arm64) // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bn254/fp/vector_purego.go b/ecc/bn254/fp/vector_purego.go index c6d37d76f..fc0f66e2a 100644 --- a/ecc/bn254/fp/vector_purego.go +++ b/ecc/bn254/fp/vector_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bn254/fr/element_purego.go b/ecc/bn254/fr/element_purego.go index 78b5d8a64..034ee75ff 100644 --- a/ecc/bn254/fr/element_purego.go +++ b/ecc/bn254/fr/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego +//go:build purego || (!amd64 && !arm64) // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bn254/fr/vector_purego.go b/ecc/bn254/fr/vector_purego.go index d09c25980..84f86a40b 100644 --- a/ecc/bn254/fr/vector_purego.go +++ b/ecc/bn254/fr/vector_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bw6-633/fp/element_purego.go b/ecc/bw6-633/fp/element_purego.go index 6ba677acf..811df961e 100644 --- a/ecc/bw6-633/fp/element_purego.go +++ b/ecc/bw6-633/fp/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bw6-633/fr/element_purego.go b/ecc/bw6-633/fr/element_purego.go index 4d38ad773..93ea6339b 100644 --- a/ecc/bw6-633/fr/element_purego.go +++ b/ecc/bw6-633/fr/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bw6-761/fp/element_purego.go b/ecc/bw6-761/fp/element_purego.go index 21b07566f..128e16274 100644 --- a/ecc/bw6-761/fp/element_purego.go +++ b/ecc/bw6-761/fp/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/bw6-761/fr/element_purego.go b/ecc/bw6-761/fr/element_purego.go index a67b43b67..5d56b2830 100644 --- a/ecc/bw6-761/fr/element_purego.go +++ b/ecc/bw6-761/fr/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego +//go:build purego || (!amd64 && !arm64) // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/stark-curve/fp/element_purego.go b/ecc/stark-curve/fp/element_purego.go index 380a94c00..5308610f0 100644 --- a/ecc/stark-curve/fp/element_purego.go +++ b/ecc/stark-curve/fp/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego +//go:build purego || (!amd64 && !arm64) // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/stark-curve/fp/vector_purego.go b/ecc/stark-curve/fp/vector_purego.go index c6d37d76f..fc0f66e2a 100644 --- a/ecc/stark-curve/fp/vector_purego.go +++ b/ecc/stark-curve/fp/vector_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/stark-curve/fr/element_purego.go b/ecc/stark-curve/fr/element_purego.go index 7aea910af..ae05fe839 100644 --- a/ecc/stark-curve/fr/element_purego.go +++ b/ecc/stark-curve/fr/element_purego.go @@ -1,4 +1,4 @@ -//go:build purego +//go:build purego || (!amd64 && !arm64) // Copyright 2020 ConsenSys Software Inc. // diff --git a/ecc/stark-curve/fr/vector_purego.go b/ecc/stark-curve/fr/vector_purego.go index d09c25980..84f86a40b 100644 --- a/ecc/stark-curve/fr/vector_purego.go +++ b/ecc/stark-curve/fr/vector_purego.go @@ -1,4 +1,4 @@ -//go:build purego || arm64 +//go:build purego || !amd64 // Copyright 2020 ConsenSys Software Inc. // diff --git a/field/generator/generator.go b/field/generator/generator.go index 2b6dd2d9f..22e029277 100644 --- a/field/generator/generator.go +++ b/field/generator/generator.go @@ -126,17 +126,17 @@ func GenerateFF(F *config.FieldConfig, outputDir, asmDirBuildPath, asmDirInclude } // purego files have no build tags if we don't generate asm - pureGoBuildTag := "purego" + pureGoBuildTag := "purego || (!amd64 && !arm64)" if !F.GenerateOpsAMD64 && !F.GenerateOpsARM64 { pureGoBuildTag = "" } else if !F.GenerateOpsARM64 { - pureGoBuildTag = "purego || arm64" + pureGoBuildTag = "purego || (!amd64)" } - pureGoVectorBuildTag := "purego" + pureGoVectorBuildTag := "purego || (!amd64 && !arm64)" if !F.GenerateVectorOpsAMD64 && !F.GenerateVectorOpsARM64 { pureGoVectorBuildTag = "" } else if !F.GenerateVectorOpsARM64 { - pureGoVectorBuildTag = "purego || arm64" + pureGoVectorBuildTag = "purego || (!amd64)" } var g errgroup.Group