Documentation ¶
Index ¶
- func BitVec(s *obj.LSym, off int, bv bitvec.BitVec) int
- func Bool(s *obj.LSym, off int, v bool) int
- func Global(s *obj.LSym, width int32, flags int16)
- func LosesStmtMark(as obj.As) bool
- func SymPtr(s *obj.LSym, off int, x *obj.LSym, xoff int) int
- func SymPtrOff(s *obj.LSym, off int, x *obj.LSym) int
- func SymPtrWeak(s *obj.LSym, off int, x *obj.LSym, xoff int) int
- func SymPtrWeakOff(s *obj.LSym, off int, x *obj.LSym) int
- func Uint16(s *obj.LSym, off int, v uint16) int
- func Uint32(s *obj.LSym, off int, v uint32) int
- func Uint8(s *obj.LSym, off int, v uint8) int
- func UintN(s *obj.LSym, off int, v uint64, wid int) int
- func Uintptr(s *obj.LSym, off int, v uint64) int
- func Uvarint(s *obj.LSym, off int, v uint64) int
- type Progs
- func (pp *Progs) Append(p *obj.Prog, as obj.As, ftype obj.AddrType, freg int16, foffset int64, ...) *obj.Prog
- func (pp *Progs) Clear(p *obj.Prog)
- func (pp *Progs) Flush()
- func (pp *Progs) Free()
- func (pp *Progs) NewProg() *obj.Prog
- func (pp *Progs) Prog(as obj.As) *obj.Prog
- func (pp *Progs) SetText(fn *ir.Func)
- type StackMapIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BitVec ¶
BitVec writes the contents of bv into s as sequence of bytes in little-endian order, and returns the next unused offset.
func LosesStmtMark ¶
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 Uint8 ¶
Uint8 writes an unsigned byte v into s at offset off, and returns the next unused offset (i.e., off+1).
Types ¶
type Progs ¶
type Progs struct { Text *obj.Prog // ATEXT Prog for this function Next *obj.Prog // next Prog PC int64 // virtual PC; count of Progs Pos src.XPos // position to use for new Progs CurFunc *ir.Func // fn these Progs are for Cache []obj.Prog // local progcache CacheIndex int // first free element of progcache NextLive StackMapIndex // liveness index for the next Prog PrevLive StackMapIndex // last emitted liveness index NextUnsafe bool // unsafe mark for the next Prog PrevUnsafe bool // last emitted unsafe mark }
Progs accumulates Progs for a function and converts them into machine code.
func NewProgs ¶
NewProgs returns a new Progs for fn. worker indicates which of the backend workers will use the Progs.
type StackMapIndex ¶ added in go1.22.0
type StackMapIndex int
const StackMapDontCare StackMapIndex = -1000
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).
func (StackMapIndex) StackMapValid ¶ added in go1.22.0
func (s StackMapIndex) StackMapValid() bool