mips

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package egg/mips implements a MIPS-I machine for EGG.

Index

Constants

View Source
const (
	HI = 32
	LO = 33
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Mips

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

The Mips struct implements the Machine interface.

func (*Mips) ArchitetureName

func (m *Mips) ArchitetureName() string

func (*Mips) Assemble

func (m *Mips) Assemble(asm string) ([]uint8, []assembler.DebuggerToken, error)

func (*Mips) GetCurrentInstructionAddress

func (m *Mips) GetCurrentInstructionAddress() uint64

func (*Mips) GetMemory

func (m *Mips) GetMemory(addr uint64) (uint8, error)

func (*Mips) GetMemoryChunk

func (m *Mips) GetMemoryChunk(addr uint64, size uint64) ([]uint8, error)

func (*Mips) GetRegister

func (m *Mips) GetRegister(reg uint64) (uint64, error)

func (*Mips) GetRegisterNumber

func (m *Mips) GetRegisterNumber(r string) (uint64, error)

func (*Mips) LoadProgram

func (m *Mips) LoadProgram(program []uint8) error

func (*Mips) NextInstruction

func (m *Mips) NextInstruction() (*machine.Call, error)

func (*Mips) SetMemory

func (m *Mips) SetMemory(addr uint64, content uint8) error

func (*Mips) SetMemoryChunk

func (m *Mips) SetMemoryChunk(addr uint64, content []uint8) error

func (*Mips) SetRegister

func (m *Mips) SetRegister(reg uint64, content uint64) error

Jump to

Keyboard shortcuts

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