wag: github.com/tsavola/wag/internal/isa/x86 Index | Files | Directories

package x86

import "github.com/tsavola/wag/internal/isa/x86"

Index

Package Files

binary.go convert.go features_detected.go linker.go macro.go memory.go regs.go select.go unary.go

Constants

const (
    FuncAlignment = 16

    PadByte = 0xcc // INT3 instruction
)
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
    RegDividendHigh = reg.R(2)      // rdx

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

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

)

type Linker Uses

type Linker struct{}

func (Linker) UpdateCalls Uses

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

UpdateCalls modifies CALL instructions.

func (Linker) UpdateFarBranches Uses

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

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

func (Linker) UpdateNearBranch Uses

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

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

func (Linker) UpdateNearBranches Uses

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

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

func (Linker) UpdateNearLoad Uses

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

UpdateNearLoad modifies a 32-bit displacement.

func (Linker) UpdateStackCheck Uses

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

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

type MacroAssembler Uses

type MacroAssembler struct{}

func (MacroAssembler) AddToStackPtrUpper32 Uses

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

func (MacroAssembler) AlignData Uses

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

func (MacroAssembler) AlignFunc Uses

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

func (MacroAssembler) Binary Uses

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

func (MacroAssembler) Branch Uses

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

func (MacroAssembler) BranchIf Uses

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

func (MacroAssembler) BranchIfOutOfBounds Uses

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

func (MacroAssembler) BranchIfOutOfBoundsStub Uses

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

func (MacroAssembler) BranchIfStub Uses

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

func (MacroAssembler) BranchIndirect Uses

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

func (MacroAssembler) BranchStub Uses

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

func (MacroAssembler) BranchSuspend Uses

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

func (MacroAssembler) Breakpoint Uses

func (MacroAssembler) Breakpoint(f *gen.Func)

func (MacroAssembler) Call Uses

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

func (MacroAssembler) CallImportVector Uses

func (MacroAssembler) CallImportVector(p *gen.Prog, vecIndex int, variadic bool, argCount, sigIndex int)

func (MacroAssembler) CallIndirect Uses

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

func (MacroAssembler) CallMissing Uses

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

func (MacroAssembler) ClearIntResultReg Uses

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

func (MacroAssembler) Convert Uses

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

func (MacroAssembler) CurrentMemory Uses

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

func (MacroAssembler) DropStackValues Uses

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

func (MacroAssembler) Enter Uses

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

func (MacroAssembler) GrowMemory Uses

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

func (MacroAssembler) Load Uses

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

func (MacroAssembler) LoadGlobal Uses

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

func (MacroAssembler) LoadIntStubNear Uses

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

func (MacroAssembler) LoadStack Uses

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

func (MacroAssembler) Move Uses

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

func (MacroAssembler) MoveReg Uses

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

func (MacroAssembler) PadUntil Uses

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

func (MacroAssembler) PushCond Uses

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

func (MacroAssembler) PushImm Uses

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

func (MacroAssembler) PushReg Uses

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

func (MacroAssembler) PushZeros Uses

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

func (MacroAssembler) Resume Uses

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

func (MacroAssembler) Return Uses

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

func (MacroAssembler) Select Uses

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

func (MacroAssembler) SetBool Uses

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

func (MacroAssembler) SetupStackFrame Uses

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

func (MacroAssembler) Store Uses

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

func (MacroAssembler) StoreGlobal Uses

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

func (MacroAssembler) StoreStack Uses

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

func (MacroAssembler) StoreStackImm Uses

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

func (MacroAssembler) StoreStackReg Uses

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

func (MacroAssembler) SuspendSaveInt Uses

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

func (MacroAssembler) Trap Uses

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

func (MacroAssembler) TrapHandler Uses

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

func (MacroAssembler) TrapHandlerRewindCallStackExhausted Uses

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

func (MacroAssembler) TrapHandlerRewindSuspended Uses

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

func (MacroAssembler) TrapHandlerTruncOverflow Uses

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

func (MacroAssembler) Unary Uses

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

func (MacroAssembler) ZeroExtendResultReg Uses

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

Directories

PathSynopsis
in
nonabi

Package x86 imports 18 packages (graph) and is imported by 1 packages. Updated 2020-09-02. Refresh now. Tools for package owners.