regcomp

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package regcomp contains utilites for comparing register files states

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Getallstates

func Getallstates(filepath string) [][32]uint64

Getallstates returns all register states in a register log file.

Types

type Diff

type Diff struct {
	List  []Update
	Major bool
}

Diff contains a list of updates that do not match the base case.

func (Diff) Print

func (d Diff) Print() string

Print returns a string representation of the struct.

type UpComp

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

UpComp compares a test update to a baseline update.

func (UpComp) GetDiff

func (u UpComp) GetDiff() (diff Diff)

GetDiff returns the test updates that are different from the baseline. Returns true if the PCs are different or the number of updates differ.

func (UpComp) WithBase

func (u UpComp) WithBase(base []Update) UpComp

WithBase assigns the baseline update to the comparison.

func (UpComp) WithTest

func (u UpComp) WithTest(test []Update) UpComp

WithTest assigns the test update to the comparison.

type Update

type Update struct {
	RegIdx int
	NewVal uint64
}

Update is a tuple containing state updates.

func GetUpdate

func GetUpdate(states [][32]uint64, pcIdx int) (all []Update)

GetUpdate returns the update at the given PC idx.

func (Update) Print

func (u Update) Print() string

Print returns a string representation of the update.

Jump to

Keyboard shortcuts

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