[MLton-user] MLRISC in MLton
Matthew Fluet
fluet@cs.cornell.edu
Mon, 27 Feb 2006 11:29:11 -0500 (EST)
>> A couple of years ago, I did most of the work to 'port' the MLRISC
>> sources to MLton; essentially, eliminating the SML/NJ extensions.
>> I reported a little on the experience at:
>> http://mlton.org/pipermail/mlton/2004-February/025040.html
>>
>> MLRISC has been mostly stable in the meantime, so it wouldn't be
>> difficult to update them and make them available. I started
>> porting MLRISC with the vague notion of attempting to use it for
>> MLton's backend, but I found that the documentation on MLRISC
>> leaves much to be desired in terms of actually using it. There is
>> also some complication using MLRISC with SML/NJ's compilation
>> manager (CM), which was never entirely clear how to resolve.
>>
>> So, while I could point you to some Standard ML sanitized code for
>> MLRISC, I'm afraid that I can't offer any advice on MLRISC itself.
>>
>
> Thanks Matthew for your answer. It would be nice if you pointed me to
> an SML environment which was stable at a time (even some time in the
> past, e.g. when you were working on the MLRISC porting) regarding
> MLRISC support. I have a done a few builds with latest cvs, 110.57,
> 110.0.7 on RH 7.3, 9.0 and cygwin and all these run on problems (the
> basic environment is set, sml -H reports mlrisc modules), but when
> compiling "make.sml" from the MLRISC source tree it eventually
> breaks). A stable even a little old MLRISC port, would allow me to
> work on using MLRISC as a retargetable backend for cross-compiling
> (SML or C via ckit).
Right, this is the complication with MLRISC and SML/NJ's compilation
manager. Essentially, MLRISC is not a program by itself; rather, it is a
library which doesn't have a distinguished single source file. Even then,
there are generic MLRISC libraries and also (target-)processor specific
libraries. Rather than using the "make.sml" file, you want to invoke the
CM manager on "cm/MLRISC.cm" and "cm/MLTREE.cm" and "cm/IA32.cm" files
from the MLRISC source tree.
But, that is about the extent of my knowledge. You'll need to bring up
other issues with using MLRISC with the SML/NJ developers (specifically,
Lal George and Allen Leung).
I'll try to put together a copy of MLton compatible sources, but it
probably won't be until late this week.