Archive for December, 2008

December 9th, 2008 by nkeynes
I am Jack’s complete lack of update
Posted in Development

November has, unfortunately, been very busy with other matters, so lxdream hasn’t really gotten much attention lately – the little that I have gotten done has been rather scattershot. Right now, at least, I’m currently hacking on the memory system (ie, implementing the caches and bus timing), and will eventually get back to the translator sometime after that’s working.

But just to scare any programmers reading this, below is my latest configure test:

AC_MSG_CHECKING([support for dirty stack tricks]);
void * __attribute__((noinline)) first_arg( void *x, void *y ) { return x; }
int __attribute__((noinline)) foo( int arg, void *exc ) {
    if( arg < 2 ) {
        *(((void **)__builtin_frame_address(0))+1) = exc;
    return 0;
int main(int argc, char *argv[])
    goto *first_arg(&&start, &&except);
    return foo(argc, &&except) + 1;
    return 0;
}]])], [
    $1 ], [
    $2 ])

For when longjmp just isn’t fast enough. Although one does have to jump through quite a few hoops to stop gcc from enthusiastically (mis)optimizing the test case…