Documentation ¶
Overview ¶
Package amd64 contains syntactic sugar to generate amd64 assembly code
Index ¶
- Constants
- func Generate(w io.Writer, F *field.FieldConfig) error
- func GenerateMul(w io.Writer, F *field.FieldConfig) error
- func GenerateMulADX(w io.Writer, F *field.FieldConfig) error
- type FFAmd64
- func (f *FFAmd64) Add(i1, i2 interface{}, offsets ...int)
- func (f *FFAmd64) AssertCleanStack(reservedStackSize, minStackSize int)
- func (f *FFAmd64) GenerateDefines()
- 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 SmallModulus = 6
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
func Generate(w io.Writer, F *field.FieldConfig) error
Generate generates assembly code for the base field provided to goff see internal/templates/ops*
func GenerateMul ¶
func GenerateMul(w io.Writer, F *field.FieldConfig) error
func GenerateMulADX ¶
func GenerateMulADX(w io.Writer, F *field.FieldConfig) error
Types ¶
type FFAmd64 ¶
type FFAmd64 struct { *field.FieldConfig *amd64.Amd64 // contains filtered or unexported fields }
func NewFFAmd64 ¶
func NewFFAmd64(w io.Writer, F *field.FieldConfig) *FFAmd64
func (*FFAmd64) AssertCleanStack ¶
func (*FFAmd64) GenerateDefines ¶
func (f *FFAmd64) GenerateDefines()
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.