...

Package golangasm

import "github.com/twitchyliquid64/golang-asm"
Overview
Index
Subdirectories

Overview ▾

type Builder

Builder allows you to assemble a series of instructions.

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

func NewBuilder

func NewBuilder(archStr string, cacheSize int) (*Builder, error)

NewBuilder constructs an assembler for the given architecture.

func (*Builder) AddInstruction

func (b *Builder) AddInstruction(p *obj.Prog)

AddInstruction adds an instruction to the list of instructions to be assembled.

func (*Builder) Assemble

func (b *Builder) Assemble() []byte

Assemble generates the machine code from the given instructions.

func (*Builder) NewProg

func (b *Builder) NewProg() *obj.Prog

NewProg returns a new instruction structure.

func (*Builder) Root

func (b *Builder) Root() *obj.Prog

Root returns the first instruction.

Subdirectories

Name Synopsis
..
asm
arch Package arch defines architecture-specific information and support functions.
bio Package bio implements common I/O abstractions used within the Go toolchain.
dwarf Package dwarf generates DWARF debugging information.
goobj
obj
arm
arm64 Package arm64 implements an ARM64 assembler.
mips
ppc64 Package ppc64 implements a PPC64 assembler that assembles Go asm into the corresponding PPC64 instructions as defined by the Power ISA 3.0B.
riscv
s390x
wasm
x86
objabi
src
sys
unsafeheader Package unsafeheader contains header declarations for the Go runtime's slice and string implementations.
unsafeheader Package unsafeheader contains header declarations for the Go runtime's slice and string implementations.