Documentation
¶
Overview ¶
Package amd64 contains syntactic sugar to generate amd64 assembly code
Index ¶
- Constants
- func GenerateCommonASM(w io.Writer, nbWords int, hasVector bool) error
- func GenerateFieldWrapper(w io.Writer, F *config.FieldConfig, asmDirBuildPath, asmDirIncludePath string) error
- type FFAmd64
- func (f *FFAmd64) Add(i1, i2 interface{}, offsets ...int)
- func (f *FFAmd64) AssertCleanStack(reservedStackSize, minStackSize int)
- func (f *FFAmd64) Define(name string, nbInputs int, fn defineFn) defineFn
- func (f *FFAmd64) DefineFn(name string) (fn defineFn, err error)
- func (f *FFAmd64) GenerateReduceDefine()
- func (f *FFAmd64) LabelRegisters(name string, r ...amd64.Register)
- func (f *FFAmd64) Mov(i1, i2 interface{}, offsets ...int)
- func (f *FFAmd64) MulADX(registers *amd64.Registers, x, y func(int) string, t []amd64.Register) []amd64.Register
- func (f *FFAmd64) Pop(registers *amd64.Registers, forceStack ...bool) amd64.Register
- func (f *FFAmd64) PopN(registers *amd64.Registers, forceStack ...bool) []amd64.Register
- func (f *FFAmd64) Push(registers *amd64.Registers, rIn ...amd64.Register)
- func (f *FFAmd64) Reduce(registers *amd64.Registers, t []amd64.Register)
- func (f *FFAmd64) ReduceElement(t, scratch []amd64.Register)
- func (f *FFAmd64) StackSize(maxNbRegistersNeeded, nbRegistersReserved, minStackSize int) int
- func (f *FFAmd64) Sub(i1, i2 interface{}, offsets ...int)
Constants ¶
View Source
const (
ElementASMFileName = "element_%dw_amd64.s"
)
View Source
const SmallModulus = 6
Variables ¶
This section is empty.
Functions ¶
func GenerateCommonASM ¶
GenerateCommonASM generates assembly code for the base field provided to goff see internal/templates/ops*
func GenerateFieldWrapper ¶
Types ¶
type FFAmd64 ¶
type FFAmd64 struct { // *config.FieldConfig *amd64.Amd64 NbWords int NbWordsLastIndex int NbWordsIndexesFull []int NbWordsIndexesNoZero []int // contains filtered or unexported fields }
func (*FFAmd64) AssertCleanStack ¶
func (*FFAmd64) GenerateReduceDefine ¶
func (f *FFAmd64) GenerateReduceDefine()
func (*FFAmd64) LabelRegisters ¶
LabelRegisters write comment with friendler name to registers
func (*FFAmd64) MulADX ¶
func (f *FFAmd64) MulADX(registers *amd64.Registers, x, y func(int) string, t []amd64.Register) []amd64.Register
MulADX uses AX, DX and BP sets x * y into t, without modular reduction x() will have more accesses than y() (caller should store x in registers, if possible) if no (tmp) register is available, this uses one PUSH/POP on the stack in the hot loop.
func (*FFAmd64) ReduceElement ¶
Click to show internal directories.
Click to hide internal directories.