Sigbjorn Finne (Intl Vendor) wrote:
>
> Jan Kort <[EMAIL PROTECTED]> writes:
> >
> > Thanks, I can get a lot further now, everything apart from
> > compiling the assembler files and linking the hsc works, but
> > that will have to wait till tommorow :)
> >
> > Jan
> >
>
> Great, if you should get stuck while doing this, let us know,
> and we'll try to help out.
>
> --Sigbjorn
It looks like I'm either missing more code, or I'm on the wrong
track. I can't find the powerpc assembly code for "JMP_" (should
be in ghc/includes/TailCalls.h), "StgRun" (should be in
ghc/rts/StgCRun.c) and for "StgReturn" (should be in ghc/rts/StgRun.S).
I also tried to compile with USE_MINIINTERPRETER set to 1, but this
led to having to set INTERPRETER_ONLY to 1 as well,
otherwise Hugs_CONSTR_entry would be undefined. I asume that
"INTERPRETER_ONLY" means no compiler ?
In case I'm not missing code and I have to write it myself, if
I don't use native code generation, can I do:
#ifdef powerpc_TARGET_ARCH
StgThreadReturnCode
StgRun(StgFunPtr f) {
f();
return (StgThreadReturnCode)R1.i;
}
#endif
And for the "JMP_":
#if powerpc_TARGET_ARCH
#define JMP_(cont) \
{ \
goto (void *)(cont); \
}
#endif powerpc_TARGET_ARCH
I don't know what to do about StgReturn in ghc/rts/StgRun.S,
judging from the ifdef, the StgReturn is only valid for 386
architectures, so where is it defined on a sparc or an alpha ?
--
--------
Jan Kort