Hello Simon and Ian,
I have been porting the inline assembler portions of the RTS to MS CL/
ICL style inline assembler, a limited version of MASM. For the most
part it is a simple matter of translation (with some careful review
of compiler output). There is one problem in StgCRun.c:StgRun()::
172-181 (similar for x86_64)
/*
* jump to it
*/
"jmp *%%eax\n\t"
STG_GLOBAL STG_RETURN "\n"
STG_RETURN ":\n\t"
"movl %%esi, %%eax\n\t" /* Return value in R1 */
I don't know how the label STG_RETURN (for x86 Windows, _StgReturn)
is used externally (why it requires .global). Do you return directly
to that label, so as to avoid a "call" instead of a "jmp"? It is not
possible to declare _StgReturn PUBLIC or EXTERNDEF it (the MASM
equivalent) with inline assembler in CL because inline assembler in
CL only allows a few MASM directives: EVEN and ALIGN. It is also not
possible to split the assembler block into two and make the label a C-
std label (as for goto) because those are not public, either. If
necessary, I will write StgCRun.c as a separate assembler module
(using AT&T or NASM syntax) so it may be compiled by Yasm but the
exact form of that assembler also depends on how _StgCRun is used,
which is why I need your help.
Thanks,
Pete
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc