powerpc

package
v0.0.0-...-d7f584e Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Valid hcall humbers at the momemt are: 4..0x450.
	MaxHcall = 0x450 // MAX_HCALL
	SprnSrr0 = 0x01A // pc for rfid (SPRN_SRR0)
	SprnSrr1 = 0x01B // msr for rfid (SPRN_SRR1)
)

Variables

This section is empty.

Functions

func Register

func Register(insns []*Insn)

Types

type Insn

type Insn struct {
	Name   string
	Priv   bool
	Pseudo bool
	Fields []InsnField // for ra/rb/rt/si/...
	Opcode uint32
	Mask   uint32

	FieldsSuffix []InsnField
	OpcodeSuffix uint32
	MaskSuffix   uint32
	// contains filtered or unexported fields
}

func (Insn) Encode

func (insn Insn) Encode(cfg *iset.Config, r *rand.Rand) []byte

func (*Insn) Info

func (insn *Insn) Info() (string, iset.Mode, bool, bool)

type InsnBits

type InsnBits struct {
	Start  uint // Big endian bit order.
	Length uint
}

type InsnField

type InsnField struct {
	Name string
	Bits []InsnBits
}

type InsnSet

type InsnSet struct {
	Insns []*Insn
	// contains filtered or unexported fields
}

func (*InsnSet) Decode

func (insnset *InsnSet) Decode(mode iset.Mode, text []byte) (int, error)

func (*InsnSet) DecodeExt

func (insnset *InsnSet) DecodeExt(mode iset.Mode, text []byte) (int, error)

func (*InsnSet) GetInsns

func (insnset *InsnSet) GetInsns(mode iset.Mode, typ iset.Type) []iset.Insn

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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