Hi Jecel
On Nov 5, 2008, at 11:43 PM, Jecel Assumpcao Jr wrote:
Eliot Miranda wrote on Thu, 30 Oct 2008 18:15:24 -0700
I wonder if anyone has any 32-bit processor implementations,
either in Smalltalk or in some other, preferrably easy-to-parse, formal semantics.
I have a simulator for the 16 bit stack processor in Squeak, but I don't think it would be very interesting for you.
Where did you publish it?
For Smalltalk compatible formal semantics there is IDaSS (http://www.xs4all.nl/~averschu/ idass/) on VisualWorks but all their examples are 8 bit.
You can find many processor implementations in VHDL, Verilog and other hardware design languages but the effort of dealing with any of these languages would far outweigh just writting a new simulator in Smalltalk. And they would probably be too low level for your needs in any case. You can find more suitable simulators in C, Java and similar languages.
In implementing the new JIT VM I would like to continue developing in Smalltalk using VMMaker/Slang,
Good plan!
but this implies having a processor simulation in Smalltalk to produce actual machine code for. Ideally this would be an x86 of some description (doesn't need to be bang up to date, 386 would be fine). I'd also welcome an ARM.
I wrote simulators for the 8086 and ARM2 back in 1988 and can tell you that the first is much more troublesome. Both architectures have grown more complicated since then but the x86 has done so exponentially. Just to give you an idea of how bad things are now, the RAMP people (http://ramp.eecs.berkeley.edu/) had initially planned to have a x86 implementation as one of their core options but even with all their resources they eventually had to give up and now run QEMU on Sparc cores instead!
One processor that has been implemented many times and has many formal descriptions floating around on the web is the MIPS-like academic DLX design presented in the Hennessy & Patterson textbook.
-- Jecel