Nathan's Journal Help

Blogs » Nathan's Journal » Generic update
Thu 21 of Sep., 2006 21:04 PDT

Generic update

Tags:  lxdream personal

The move is mostly done now, other than a dozen or so boxes still to be unpacked (mostly miscellaneous crud), and I'm slowly getting used to the earlier start (darn commute). On the bright side, I've been able to use the half-hour or so each way to write some more test cases...

Started working through the CPU core tests, which, at a current rate of about 0.6/day I should be finished sometime next year. Hopefully it'll get faster though now that I've got some more infrastructure in place (and most of them can be made more-or-less data driven). Unfortunately there's still over 100 instructions to get through, without even counting all the variants.

The main driver for doing these now is actually so I have a ready-made test set for the recompiler, although it tests the emu quite nicely too. I've already picked up one unimplemented instruction that I'd completely forgotten about (ADDV - add w/ overflow check) which apparently noone has ever used...[0]

[0] The core has a "halt and catch fire" routine built in for any unimplemented instructions, which tends to make them hard to miss. Admittedly it's no real surprise that noone has used it though - most programming languages don't have any constructs that would compile down to it, and I honestly can't think of any real reason you'd want to use it in practice except in constructs like

        ....
        addv r1, r2
        bf normal
        mov.l exception_handler_k, r3
        jsr @r3
normal:
        ....

(In other words, converting the check into an exception of some kind)

About me

Nathan is a full-time software engineer and part-time maintainer of several pieces of open-source software that noone has even heard of (most notably lxdream and elr). His interests include programming language design, distributed systems, emulation, Japanese, and go.