objw

Imports

Imports #

"cmd/compile/internal/base"
"cmd/compile/internal/bitvec"
"cmd/compile/internal/types"
"cmd/internal/obj"
"encoding/binary"
"cmd/compile/internal/base"
"cmd/compile/internal/ir"
"cmd/internal/obj"
"cmd/internal/src"
"internal/abi"

Constants & Variables

StackMapDontCare const #

StackMapDontCare indicates that the stack map index at a Value doesn't matter. This is a sentinel value that should never be emitted to the PCDATA stream. We use -1000 because that's obviously never a valid stack index (but -1 is).

const StackMapDontCare StackMapIndex = *ast.UnaryExpr

sharedProgArray var #

var sharedProgArray = *ast.CallExpr

Type Aliases

StackMapIndex type #

type StackMapIndex int

Structs

Progs struct #

Progs accumulates Progs for a function and converts them into machine code.

type Progs struct {
Text *obj.Prog
Next *obj.Prog
PC int64
Pos src.XPos
CurFunc *ir.Func
Cache []obj.Prog
CacheIndex int
NextLive StackMapIndex
PrevLive StackMapIndex
NextUnsafe bool
PrevUnsafe bool
}

Functions

Append method #

func (pp *Progs) Append(p *obj.Prog, as obj.As, ftype obj.AddrType, freg int16, foffset int64, ttype obj.AddrType, treg int16, toffset int64) *obj.Prog

BitVec function #

BitVec writes the contents of bv into s as sequence of bytes in little-endian order, and returns the next unused offset.

func BitVec(s *obj.LSym, off int, bv bitvec.BitVec) int

Bool function #

func Bool(s *obj.LSym, off int, v bool) int

Clear method #

func (pp *Progs) Clear(p *obj.Prog)

Flush method #

Flush converts from pp to machine code.

func (pp *Progs) Flush()

Free method #

Free clears pp and any associated resources.

func (pp *Progs) Free()

Global function #

func Global(s *obj.LSym, width int32, flags int16)

LosesStmtMark function #

LosesStmtMark reports whether a prog with op as loses its statement mark on the way to DWARF. The attributes from some opcodes are lost in translation. TODO: this is an artifact of how funcpctab combines information for instructions at a single PC. Should try to fix it there.

func LosesStmtMark(as obj.As) bool

NewProg method #

func (pp *Progs) NewProg() *obj.Prog

NewProgs function #

NewProgs returns a new Progs for fn. worker indicates which of the backend workers will use the Progs.

func NewProgs(fn *ir.Func, worker int) *Progs

Prog method #

Prog adds a Prog with instruction As to pp.

func (pp *Progs) Prog(as obj.As) *obj.Prog

SetText method #

func (pp *Progs) SetText(fn *ir.Func)

StackMapValid method #

func (s StackMapIndex) StackMapValid() bool

SymPtr function #

func SymPtr(s *obj.LSym, off int, x *obj.LSym, xoff int) int

SymPtrOff function #

func SymPtrOff(s *obj.LSym, off int, x *obj.LSym) int

SymPtrWeak function #

func SymPtrWeak(s *obj.LSym, off int, x *obj.LSym, xoff int) int

SymPtrWeakOff function #

func SymPtrWeakOff(s *obj.LSym, off int, x *obj.LSym) int

Uint16 function #

func Uint16(s *obj.LSym, off int, v uint16) int

Uint32 function #

func Uint32(s *obj.LSym, off int, v uint32) int

Uint8 function #

Uint8 writes an unsigned byte v into s at offset off, and returns the next unused offset (i.e., off+1).

func Uint8(s *obj.LSym, off int, v uint8) int

UintN function #

UintN writes an unsigned integer v of size wid bytes into s at offset off, and returns the next unused offset.

func UintN(s *obj.LSym, off int, v uint64, wid int) int

Uintptr function #

func Uintptr(s *obj.LSym, off int, v uint64) int

Uvarint function #

Uvarint writes a varint v into s at offset off, and returns the next unused offset.

func Uvarint(s *obj.LSym, off int, v uint64) int

Generated with Arrow