powerpc-0.0.1: Tools for PowerPC programs.

Language.PowerPC.Simulator

Description

PowerPC instruction set simulation.

Synopsis

Documentation

class Memory a whereSource

Memory interface.

Methods

load :: a -> Word64 -> Int -> IO [Word8]Source

store :: a -> Word64 -> [Word8] -> IO ()Source

fetch :: a -> Machine -> Word64 -> IO Word32Source

readSPR :: a -> Int -> IO Word64Source

writeSPR :: a -> Int -> Word64 -> IO ()Source

readMSR :: a -> IO Word64Source

writeMSR :: a -> Word64 -> IO ()Source

data Machine Source

State of processor.

Constructors

Machine 

Fields

pc :: Word64
 
lr :: Word64
 
ctr :: Word64
 
gprs :: [Word64]
 
xer :: Word64
 
cr :: Word32
 

simulate :: Memory a => a -> Word64 -> IO ()Source

Run simulation given memory and the starting address of program.