pgen

package
v0.0.0-...-5ea726b Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AL    = x86_64.AL
	AX    = x86_64.AX
	EAX   = x86_64.EAX
	RAX   = x86_64.RAX
	RCX   = x86_64.RCX
	RDX   = x86_64.RDX
	RBX   = x86_64.RBX
	RSP   = x86_64.RSP
	RBP   = x86_64.RBP
	RSI   = x86_64.RSI
	RDI   = x86_64.RDI
	R8    = x86_64.R8
	R9    = x86_64.R9
	R10   = x86_64.R10
	R11   = x86_64.R11
	R12   = x86_64.R12
	R13   = x86_64.R13
	R14   = x86_64.R14
	R15   = x86_64.R15
	XMM15 = x86_64.XMM15
)

Variables

This section is empty.

Functions

func Abs

func Abs(disp int32) *x86_64.MemoryOperand

func Ptr

func Ptr(base x86_64.Register, disp int32) *x86_64.MemoryOperand

func Sib

func Sib(base x86_64.Register, index x86_64.Register64, scale uint8, disp int32) *x86_64.MemoryOperand

Types

type CodeGen

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

func CreateCodeGen

func CreateCodeGen(proto interface{}) *CodeGen

func (*CodeGen) Generate

func (self *CodeGen) Generate(s hir.Program, sp uintptr) *Func

type Func

type Func struct {
	Code  []byte
	Frame rt.Frame
}

type Operands

type Operands uint16
const (
	Orx   Operands = 1 << iota // read Rx register
	Ory                        // read Ry register
	Owx                        // write Rx register
	Owy                        // write Ry register
	Owz                        // write ir.Rz register
	Ops                        // read Ps register
	Opd                        // write Pd register
	Ojmp                       // unconditional jumps
	Oret                       // function returns
	Ocall                      // function calls
	Octrl                      // control OpCodes
)

Jump to

Keyboard shortcuts

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