mirror of
https://github.com/cheat/cheat.git
synced 2024-11-22 14:01:36 +01:00
80c91cbdee
Integrate `go-git` into the application, and use it to `git clone` cheatsheets when the installer runs. Previously, the installer required that `git` be installed on the system `PATH`, so this change has to big advantages: 1. It removes that system dependency on `git` 2. It paves the way for implementing the `--update` command Additionally, `cheat` now performs a `--depth=1` clone when installing cheatsheets, which should at least somewhat improve installation times (especially on slow network connections).
46 lines
938 B
Go
46 lines
938 B
Go
//go:build amd64 && !purego
|
|
// +build amd64,!purego
|
|
|
|
package fp25519
|
|
|
|
import (
|
|
"golang.org/x/sys/cpu"
|
|
)
|
|
|
|
var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX
|
|
|
|
var _ = hasBmi2Adx
|
|
|
|
func cmov(x, y *Elt, n uint) { cmovAmd64(x, y, n) }
|
|
func cswap(x, y *Elt, n uint) { cswapAmd64(x, y, n) }
|
|
func add(z, x, y *Elt) { addAmd64(z, x, y) }
|
|
func sub(z, x, y *Elt) { subAmd64(z, x, y) }
|
|
func addsub(x, y *Elt) { addsubAmd64(x, y) }
|
|
func mul(z, x, y *Elt) { mulAmd64(z, x, y) }
|
|
func sqr(z, x *Elt) { sqrAmd64(z, x) }
|
|
func modp(z *Elt) { modpAmd64(z) }
|
|
|
|
//go:noescape
|
|
func cmovAmd64(x, y *Elt, n uint)
|
|
|
|
//go:noescape
|
|
func cswapAmd64(x, y *Elt, n uint)
|
|
|
|
//go:noescape
|
|
func addAmd64(z, x, y *Elt)
|
|
|
|
//go:noescape
|
|
func subAmd64(z, x, y *Elt)
|
|
|
|
//go:noescape
|
|
func addsubAmd64(x, y *Elt)
|
|
|
|
//go:noescape
|
|
func mulAmd64(z, x, y *Elt)
|
|
|
|
//go:noescape
|
|
func sqrAmd64(z, x *Elt)
|
|
|
|
//go:noescape
|
|
func modpAmd64(z *Elt)
|