Files
p256k1/scalar_amd64.go

24 lines
645 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//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)