Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultMaxDepth is the maximum depth for the decoder tree DefaultMaxDepth = 31 BitMaskStrategy = "mask" // Use bitmask-based splitting EntropyStrategy = "entropy" // Use entropy-based splitting )
Variables ¶
This section is empty.
Functions ¶
func MatchByPattern ¶
func MatchByPattern(instructions []*ir.InstructionIR, word uint32) []*ir.InstructionIR
MatchByPattern scans a flat instruction list using BitPattern + bitdiffs (O(n)). Useful when a tree is not available or as a correctness oracle.
Types ¶
type DecoderTreeBuilder ¶
type DecoderTreeBuilder struct {
// contains filtered or unexported fields
}
func (*DecoderTreeBuilder) BuildTree ¶
func (b *DecoderTreeBuilder) BuildTree(instructions []*ir.InstructionIR, enabled FeatureMap) *ir.DecoderTree
BuildTree constructs a decoder tree for all instructions
type MatchResult ¶
type MatchResult struct {
Instruction *ir.InstructionIR
Ambiguous []*ir.InstructionIR
Depth int
}
MatchResult is the outcome of walking a decoder tree for one instruction word.
func Match ¶
func Match(tree *ir.DecoderTree, word uint32) (MatchResult, error)
Match walks tree for word using mask/value child edges. Leaves with a single Instruction or Ambiguous set terminate the walk.
Click to show internal directories.
Click to hide internal directories.