amd64

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FuncAlignment = 16

	PadByte = 0xcc // INT3 instruction
)
View Source
const (
	RegResult       = in.RegResult  // rax xmm0
	RegDividendLow  = reg.R(0)      // rax
	RegScratch      = in.RegScratch // rcx xmm1
	RegCount        = reg.R(1)      // rcx
	RegZero         = in.RegZero    // rdx
	RegTrap         = in.RegZero    // rdx
	RegDividendHigh = reg.R(2)      // rdx

	RegStackLimit = in.RegStackLimit // rbx
	RegStackPtr   = reg.R(4)         // rsp
	RegRestartSP  = reg.R(5)         // rbp       <- AllocIntFirst

	RegMemoryBase = in.RegMemoryBase // r14
	RegTextBase   = in.RegTextBase   // r15

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Linker

type Linker struct{}

func (Linker) UpdateCalls

func (Linker) UpdateCalls(text []byte, l *link.L)

UpdateCalls modifies CALL instructions.

func (Linker) UpdateFarBranches

func (Linker) UpdateFarBranches(text []byte, l *link.L)

UpdateFarBranches modifies 32-bit relocations of JMP and Jcc instructions.

func (Linker) UpdateNearBranch

func (Linker) UpdateNearBranch(text []byte, originAddr int32)

UpdateNearBranch modifies the 8-bit relocation of a JMP or Jcc instruction.

func (Linker) UpdateNearBranches

func (Linker) UpdateNearBranches(text []byte, originAddrs []int32)

UpdateNearBranches modifies 8-bit relocations of JMP and Jcc instructions.

func (Linker) UpdateNearLoad

func (Linker) UpdateNearLoad(text []byte, insnAddr int32)

UpdateNearLoad modifies a 32-bit displacement.

func (Linker) UpdateStackCheck

func (Linker) UpdateStackCheck(text []byte, addr int32, depth int)

UpdateStackCheck modifies the 32-bit displacement of a LEA instruction.

type MacroAssembler

type MacroAssembler struct{}

func (MacroAssembler) AddToStackPtrUpper32

func (MacroAssembler) AddToStackPtrUpper32(f *gen.Func, r reg.R)

func (MacroAssembler) AlignData

func (MacroAssembler) AlignData(p *gen.Prog, alignment int)

func (MacroAssembler) AlignFunc

func (MacroAssembler) AlignFunc(p *gen.Prog)

func (MacroAssembler) Binary

func (MacroAssembler) Binary(f *gen.Func, props uint16, a, b operand.O) operand.O

func (MacroAssembler) Branch

func (MacroAssembler) Branch(p *gen.Prog, addr int32)

func (MacroAssembler) BranchIf

func (MacroAssembler) BranchIf(f *gen.Func, x operand.O, labelAddr int32) (sites []int32)

func (MacroAssembler) BranchIfOutOfBounds

func (MacroAssembler) BranchIfOutOfBounds(p *gen.Prog, indexReg reg.R, upperBound, addr int32)

func (MacroAssembler) BranchIfOutOfBoundsStub

func (MacroAssembler) BranchIfOutOfBoundsStub(p *gen.Prog, indexReg reg.R, upperBound int32) int32

func (MacroAssembler) BranchIfStub

func (MacroAssembler) BranchIfStub(f *gen.Func, x operand.O, yes, near bool) (sites []int32)

func (MacroAssembler) BranchIndirect

func (MacroAssembler) BranchIndirect(f *gen.Func, addr reg.R)

func (MacroAssembler) BranchStub

func (MacroAssembler) BranchStub(p *gen.Prog) int32

func (MacroAssembler) BranchSuspend

func (MacroAssembler) BranchSuspend(f *gen.Func, addr int32)

func (MacroAssembler) Call

func (MacroAssembler) Call(p *gen.Prog, addr int32)

func (MacroAssembler) CallImportVector

func (MacroAssembler) CallImportVector(f *gen.Func, vecIndex int)

func (MacroAssembler) CallIndirect

func (MacroAssembler) CallIndirect(f *gen.Func, sigIndex int32, funcIndexReg reg.R)

func (MacroAssembler) CallMissing

func (MacroAssembler) CallMissing(p *gen.Prog, atomic bool)

func (MacroAssembler) ClearIntResultReg

func (MacroAssembler) ClearIntResultReg(p *gen.Prog)

func (MacroAssembler) Convert

func (MacroAssembler) Convert(f *gen.Func, props uint16, resultType wa.Type, source operand.O) (result operand.O)

func (MacroAssembler) CurrentMemory

func (MacroAssembler) CurrentMemory(f *gen.Func) int32

func (MacroAssembler) DropStackValues

func (MacroAssembler) DropStackValues(p *gen.Prog, n int)

func (MacroAssembler) Enter

func (MacroAssembler) Enter(p *gen.Prog)

func (MacroAssembler) Exit

func (MacroAssembler) Exit(p *gen.Prog)

func (MacroAssembler) GrowMemory

func (MacroAssembler) GrowMemory(f *gen.Func) int32

func (MacroAssembler) Load

func (MacroAssembler) Load(f *gen.Func, props uint16, index operand.O, resultType wa.Type, align, offset uint32) operand.O

func (MacroAssembler) LoadGlobal

func (MacroAssembler) LoadGlobal(p *gen.Prog, t wa.Type, target reg.R, offset int32) (zeroExtended bool)

func (MacroAssembler) LoadIntStubNear

func (MacroAssembler) LoadIntStubNear(f *gen.Func, indexType wa.Type, r reg.R) (insnAddr int32)

func (MacroAssembler) LoadStack

func (MacroAssembler) LoadStack(p *gen.Prog, t wa.Type, target reg.R, offset int32)

func (MacroAssembler) Move

func (MacroAssembler) Move(f *gen.Func, target reg.R, x operand.O) (zeroExtended bool)

func (MacroAssembler) MoveReg

func (MacroAssembler) MoveReg(p *gen.Prog, t wa.Type, target, source reg.R)

func (MacroAssembler) PadUntil

func (MacroAssembler) PadUntil(p *gen.Prog, addr int32)

func (MacroAssembler) PushCond

func (MacroAssembler) PushCond(p *gen.Prog, cond condition.C)

func (MacroAssembler) PushImm

func (MacroAssembler) PushImm(p *gen.Prog, value int64)

func (MacroAssembler) PushReg

func (MacroAssembler) PushReg(p *gen.Prog, t wa.Type, r reg.R)

func (MacroAssembler) PushZeros

func (MacroAssembler) PushZeros(p *gen.Prog, n int)

func (MacroAssembler) Resume

func (MacroAssembler) Resume(p *gen.Prog)

func (MacroAssembler) Return

func (MacroAssembler) Return(p *gen.Prog, numStackValues int)

func (MacroAssembler) Select

func (MacroAssembler) Select(f *gen.Func, a, b, condOperand operand.O) operand.O

func (MacroAssembler) SetBool

func (MacroAssembler) SetBool(p *gen.Prog, target reg.R, cond condition.C)

func (MacroAssembler) SetupStackFrame

func (MacroAssembler) SetupStackFrame(f *gen.Func) (stackCheckAddr int32)

func (MacroAssembler) Store

func (MacroAssembler) Store(f *gen.Func, props uint16, index, x operand.O, align, offset uint32)

func (MacroAssembler) StoreGlobal

func (MacroAssembler) StoreGlobal(f *gen.Func, offset int32, x operand.O)

func (MacroAssembler) StoreStack

func (MacroAssembler) StoreStack(f *gen.Func, offset int32, x operand.O)

func (MacroAssembler) StoreStackImm

func (MacroAssembler) StoreStackImm(p *gen.Prog, t wa.Type, offset int32, value int64)

func (MacroAssembler) StoreStackReg

func (MacroAssembler) StoreStackReg(p *gen.Prog, t wa.Type, offset int32, r reg.R)

func (MacroAssembler) SuspendSaveInt

func (MacroAssembler) SuspendSaveInt(f *gen.Func, saveReg reg.R)

func (MacroAssembler) Trap

func (MacroAssembler) Trap(f *gen.Func, id trap.ID)

func (MacroAssembler) TrapHandler

func (MacroAssembler) TrapHandler(p *gen.Prog, id trap.ID)

func (MacroAssembler) TrapHandlerRewindCallStackExhausted

func (MacroAssembler) TrapHandlerRewindCallStackExhausted(p *gen.Prog)

func (MacroAssembler) TrapHandlerRewindNoFunction

func (MacroAssembler) TrapHandlerRewindNoFunction(p *gen.Prog)

func (MacroAssembler) TrapHandlerRewindSuspended

func (MacroAssembler) TrapHandlerRewindSuspended(p *gen.Prog, index int)

func (MacroAssembler) TrapHandlerTruncOverflow

func (MacroAssembler) TrapHandlerTruncOverflow(p *gen.Prog, trapIndex int)

func (MacroAssembler) Unary

func (MacroAssembler) Unary(f *gen.Func, props uint16, x operand.O) operand.O

func (MacroAssembler) ZeroExtendResultReg

func (MacroAssembler) ZeroExtendResultReg(p *gen.Prog)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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