3 ms·
The next step along this path would be to run Perl inside this VM, and then run the emulator in it... MIPS is certainly one of the simplest instruction sets. A
by userbinator 11y ago
The next step along this path would be to run Perl inside this VM, and then run the emulator in it...
MIPS is certainly one of the simplest instruction sets. A while ago I decided to write one too, for fun, after having done ones for a few other CPUs (Z80, 6502, 8086), and MIPS was by far the simplest, almost to the point of being boring. Getting the branch delay slots right (see http://www.pagetable.com/?p=313 http://www.pagetable.com/?p=313 for some details) was the hardest part.
- sklogic 11y agoIf you like challenge, MIPS can be exceptionally hard and complicated if you want to implement an OoO superscalar core.
- TheLoneWolfling 11y agoW.r.t. branch delay slots. An interesting idea: instead of fixing a number of branch delay slots (or none), what about splitting branches? That is - you have a branch_commit instruction, and anything between the branch and the branch_commit is treated as (a) branch delay slot(s), with the processor either filling in pipeline bubbles or stalling the branch as necessary. If you want to get fancy about it you can start doing matched branch / commit pairs (like nesting brackets), or potentially even start dealing with general matching. Although the decreased instruction density may kill the benefits.