
Here is a new library for analyzing PowerPC programs [1]. At this point it does instruction set simulation on machine code -- and not all instructions are implemented yet, BTW. To run a simulation, the user defines an instance of the Memory class [2] to represent both instruction and data memory. The Memory class declares functions for memory loads and stores, instruction fetches, and reading and writing special purpose registers. In our test bench, we set up the 'fetch' method to dump out register values so we can see the state of the processor at every step. A neat feature of the library is the instruction behavior is captured by a little DSL [3]. This makes it easy to add new instructions because the translation from the instruction RTL spec [4] to the DSL is nearly one-to-one. And with instruction behavior captured symbolically, this opens the door to other types of analysis besides just simulation. I hope a few folks find it useful. -Tom [1] http://hackage.haskell.org/package/powerpc [2] http://hackage.haskell.org/packages/archive/powerpc/0.0.1/doc/html/Language-... [3] http://hackage.haskell.org/packages/archive/powerpc/0.0.1/doc/html/Language-... [4] http://www.ibm.com/developerworks/systems/library/es-archguide-v2.html