24 lines
645 B
Go
24 lines
645 B
Go
//go:build amd64
|
||
|
||
package p256k1
|
||
|
||
// AMD64-specific scalar operations with optional AVX2 acceleration.
|
||
// The Scalar type uses 4×uint64 limbs which are memory-compatible with
|
||
// the AVX package's 2×Uint128 representation.
|
||
|
||
// scalarMulAVX2 multiplies two scalars using AVX2 assembly.
|
||
// Both input and output use the same memory layout as the pure Go implementation.
|
||
//
|
||
//go:noescape
|
||
func scalarMulAVX2(r, a, b *Scalar)
|
||
|
||
// scalarAddAVX2 adds two scalars using AVX2 assembly.
|
||
//
|
||
//go:noescape
|
||
func scalarAddAVX2(r, a, b *Scalar)
|
||
|
||
// scalarSubAVX2 subtracts two scalars using AVX2 assembly.
|
||
//
|
||
//go:noescape
|
||
func scalarSubAVX2(r, a, b *Scalar)
|