add port of field operations assembler from libsecp256k1

This commit is contained in:
2025-11-28 19:46:44 +00:00
parent b250fc5cf7
commit 88bc5b9a3d
19 changed files with 2895 additions and 207 deletions

18
scalar_generic.go Normal file
View File

@@ -0,0 +1,18 @@
//go:build !amd64
package p256k1
// Generic stub implementations for non-AMD64 architectures.
// These simply forward to the pure Go implementations.
func scalarMulAVX2(r, a, b *Scalar) {
r.mulPureGo(a, b)
}
func scalarAddAVX2(r, a, b *Scalar) {
r.addPureGo(a, b)
}
func scalarSubAVX2(r, a, b *Scalar) {
r.subPureGo(a, b)
}