X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FStgCRun.c;h=98116abfddaeb6300f01f991dcc058b0b984f0ec;hb=edad06244b0a542d6b5c9ce3f3cd72941c5be804;hp=c1afc1655945678e309013ef6c596d4169831ffe;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/rts/StgCRun.c b/rts/StgCRun.c index c1afc16..98116ab 100644 --- a/rts/StgCRun.c +++ b/rts/StgCRun.c @@ -85,11 +85,13 @@ register double fake_f9 __asm__("$f9"); StgRegTable * StgRun(StgFunPtr f, StgRegTable *basereg STG_UNUSED) { while (f) { + /* XXX Disabled due to RtsFlags[]/RtsFlags mismatch IF_DEBUG(interpreter, debugBelch("Jumping to "); printPtr((P_)f); fflush(stdout); debugBelch("\n"); ); + */ f = (StgFunPtr) (f)(); } return (StgRegTable *)R1.p; @@ -328,13 +330,16 @@ StgRun(StgFunPtr f, StgRegTable *basereg) { ".align 4\n" ".global " STG_RETURN "\n" STG_RETURN ":" - : : : "l0","l1","l2","l3","l4","l5","l6","l7"); + : : "p" (space) : "l0","l1","l2","l3","l4","l5","l6","l7"); /* we tell the C compiler that l0-l7 are clobbered on return to * StgReturn, otherwise it tries to use these to save eg. the * address of space[100] across the call. The correct thing * to do would be to save all the callee-saves regs, but we * can't be bothered to do that. * + * We also explicitly mark space as used since gcc eliminates it + * otherwise. + * * The code that gcc generates for this little fragment is now * terrible. We could do much better by coding it directly in * assembler.