amd64

package
v0.1.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Overview

Package amd64 contains wrapper to amd64 instructions in Go assembly. note that while this package is public, it is tailored for github.com/consensys/goff and github.com/consensys/gurvy

Index

Constants

View Source
const (
	AX  = Register("AX")
	DX  = Register("DX")
	CX  = Register("CX")
	BX  = Register("BX")
	BP  = Register("BP")
	SI  = Register("SI")
	DI  = Register("DI")
	R8  = Register("R8")
	R9  = Register("R9")
	R10 = Register("R10")
	R11 = Register("R11")
	R12 = Register("R12")
	R13 = Register("R13")
	R14 = Register("R14")
	R15 = Register("R15")
)
View Source
const NbRegisters = 14

NbRegisters contains nb default available registers, without BP

Variables

This section is empty.

Functions

This section is empty.

Types

type Amd64 added in v0.1.7

type Amd64 struct {
	// contains filtered or unexported fields
}

func NewAmd64 added in v0.1.7

func NewAmd64(w io.Writer) *Amd64

func (*Amd64) ADCQ added in v0.1.7

func (amd64 *Amd64) ADCQ(r1, r2 interface{}, comment ...string)

func (*Amd64) ADCXQ added in v0.1.7

func (amd64 *Amd64) ADCXQ(r1, r2 interface{}, comment ...string)

func (*Amd64) ADDQ added in v0.1.7

func (amd64 *Amd64) ADDQ(r1, r2 interface{}, comment ...string)

func (*Amd64) ADOXQ added in v0.1.7

func (amd64 *Amd64) ADOXQ(r1, r2 interface{}, comment ...string)

func (*Amd64) ANDQ added in v0.1.8

func (amd64 *Amd64) ANDQ(r1, r2 interface{}, comment ...string)

func (*Amd64) BSFQ added in v0.1.8

func (amd64 *Amd64) BSFQ(r1, r2 interface{}, comment ...string)

func (*Amd64) BTQ added in v0.1.8

func (amd64 *Amd64) BTQ(r1, r2 interface{}, comment ...string)

func (*Amd64) CMOVQCC added in v0.1.7

func (amd64 *Amd64) CMOVQCC(r1, r2 interface{}, comment ...string)

func (*Amd64) CMOVQCS added in v0.1.7

func (amd64 *Amd64) CMOVQCS(r1, r2 interface{}, comment ...string)

func (*Amd64) CMOVQEQ added in v0.1.8

func (amd64 *Amd64) CMOVQEQ(r1, r2 interface{}, comment ...string)

func (*Amd64) CMPB added in v0.1.7

func (amd64 *Amd64) CMPB(r1, r2 interface{}, comment ...string)

func (*Amd64) CMPQ added in v0.1.7

func (amd64 *Amd64) CMPQ(r1, r2 interface{}, comment ...string)

func (*Amd64) Comment added in v0.1.7

func (amd64 *Amd64) Comment(s string)

func (*Amd64) DECQ added in v0.1.8

func (amd64 *Amd64) DECQ(r1 interface{}, comment ...string)

func (*Amd64) FnHeader added in v0.1.7

func (amd64 *Amd64) FnHeader(funcName string, stackSize, argSize int, reserved ...Register) Registers

func (*Amd64) IMULQ added in v0.1.7

func (amd64 *Amd64) IMULQ(r1, r2 interface{}, comment ...string)

func (*Amd64) INCQ added in v0.1.8

func (amd64 *Amd64) INCQ(r1 interface{}, comment ...string)

func (*Amd64) JCC added in v0.1.7

func (amd64 *Amd64) JCC(label Label, comment ...string)

JCC x86 JNB Jump short if not below (CF=0).

func (*Amd64) JCS added in v0.1.7

func (amd64 *Amd64) JCS(label Label, comment ...string)

JCS x86 JB Jump short if below (CF=1).

func (*Amd64) JEQ added in v0.1.8

func (amd64 *Amd64) JEQ(label Label, comment ...string)

JEQ: x86 JZ Jump short if zero (ZF = 1).

func (*Amd64) JL added in v0.1.8

func (amd64 *Amd64) JL(label Label, comment ...string)

func (*Amd64) JMP added in v0.1.7

func (amd64 *Amd64) JMP(label Label, comment ...string)

func (*Amd64) JNE added in v0.1.7

func (amd64 *Amd64) JNE(label Label, comment ...string)

JNE x86 JNZ Jump short if not zero (ZF=0).

func (*Amd64) LABEL added in v0.1.7

func (amd64 *Amd64) LABEL(l Label)

func (*Amd64) MOVNTIQ added in v0.1.7

func (amd64 *Amd64) MOVNTIQ(r1, r2 interface{}, comment ...string)

func (*Amd64) MOVQ added in v0.1.7

func (amd64 *Amd64) MOVQ(r1, r2 interface{}, comment ...string)

func (*Amd64) MOVUPS added in v0.1.7

func (amd64 *Amd64) MOVUPS(r1, r2 interface{}, comment ...string)

func (*Amd64) MULQ added in v0.1.7

func (amd64 *Amd64) MULQ(r1 interface{}, comment ...string)

func (*Amd64) MULXQ added in v0.1.7

func (amd64 *Amd64) MULXQ(src, lo, hi interface{}, comment ...string)

func (*Amd64) NewLabel added in v0.1.7

func (amd64 *Amd64) NewLabel(prefix ...string) Label

func (*Amd64) ORQ added in v0.1.7

func (amd64 *Amd64) ORQ(r1, r2 interface{}, comment ...string)

func (*Amd64) POPQ added in v0.1.7

func (amd64 *Amd64) POPQ(r1 interface{}, comment ...string)

func (*Amd64) PUSHQ added in v0.1.7

func (amd64 *Amd64) PUSHQ(r1 interface{}, comment ...string)

func (*Amd64) RET added in v0.1.7

func (amd64 *Amd64) RET()

func (*Amd64) SBBQ added in v0.1.7

func (amd64 *Amd64) SBBQ(r1, r2 interface{}, comment ...string)

func (*Amd64) SHRQ added in v0.1.8

func (amd64 *Amd64) SHRQ(r1, r2 interface{}, comment ...string)

func (*Amd64) SHRQw added in v0.1.8

func (amd64 *Amd64) SHRQw(r1, r2, r3 interface{}, comment ...string)

func (*Amd64) SHRXQ added in v0.1.8

func (amd64 *Amd64) SHRXQ(r1, r2, r3 interface{}, comment ...string)

func (*Amd64) SUBQ added in v0.1.7

func (amd64 *Amd64) SUBQ(r1, r2 interface{}, comment ...string)

func (*Amd64) TESTQ added in v0.1.7

func (amd64 *Amd64) TESTQ(r1, r2 interface{}, comment ...string)

func (*Amd64) TZCNTQ added in v0.1.8

func (amd64 *Amd64) TZCNTQ(r1, r2 interface{}, comment ...string)

func (*Amd64) WriteLn added in v0.1.7

func (amd64 *Amd64) WriteLn(s string)

func (*Amd64) XCHGQ added in v0.1.8

func (amd64 *Amd64) XCHGQ(r1, r2 interface{}, comment ...string)

func (*Amd64) XORPS added in v0.1.7

func (amd64 *Amd64) XORPS(r1, r2 interface{}, comment ...string)

func (*Amd64) XORQ added in v0.1.7

func (amd64 *Amd64) XORQ(r1, r2 interface{}, comment ...string)

type Label

type Label string

type Register

type Register string

func (*Register) At

func (r *Register) At(wordOffset int) string

type Registers

type Registers struct {
	// contains filtered or unexported fields
}

func NewRegisters

func NewRegisters() Registers

func (*Registers) Available

func (r *Registers) Available() int

func (*Registers) Pop

func (r *Registers) Pop() Register

func (*Registers) PopN

func (r *Registers) PopN(n int) []Register

func (*Registers) Push

func (r *Registers) Push(rIn ...Register)

func (*Registers) Remove

func (r *Registers) Remove(toRemove Register)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL