[Haskell-cafe] Re: Haskell on ARM (was Re: ANN: Topkata)

Adrian Hey ahey at iee.org
Sat Jun 28 05:36:48 EDT 2008

Hello Jeremy,

Jeremy Apthorp wrote:
> Next year I'll be working on a project for my undergraduate computing
> course at UNSW that will involve getting GHC to target the Nintendo
> DS. It'll require cross-compilation, because the DS isn't powerful
> enough to actually run GHC (4M main ram and a 66MHz processor). It'll
> also require that I significantly strip down the runtime system, as
> the current RTS won't fit in 4M and leave any left over for the main
> application.

Maybe one of these would help (running Linux) ..


It'd be good too have a native code generator support for ARM (not via
C). Many years ago I tinkered with implementing a lazy FPL on ARM (on my
Acorn Risc PC). I never even started the compiler but got a basic single
threaded RTS and mark-sweep-compact garbage collector up and running
(written in ARM assembler).

It wasn't really useable for real programs though as I had to write my
function definitions as comments and actually implement the graph
reduction code by hand in assembler :-)

But I remember the ARM instruction set had some really useful features
that made things like checking for stack-heap collision cheap and if you
got the register allocation right (which is not hard on the ARM) you
could construct the overwhelming majority of heap records using a single
STMIA instruction. Almost seemed like it's instruction set was
designed for efficient FPL implementation :-)

Adrian Hey

More information about the Haskell-Cafe mailing list