GHC API: Access to nativeCodeGen?

Simon Marlow simonmar at
Wed Jul 20 05:09:46 EDT 2005

On 19 July 2005 17:17, Peter A Jonsson wrote:

> Perl 5.6.0 seems to be released 2000-Mar-22, demanding that people who
> build ghc have a perl that is no older than 5 years might be a
> reasonable first step?

Ok, done.

>>> Needed a patch to build NCG. I tried to preserve as much of the
>>> previous structure in order to avoid introducing bugs, but I wasn't
>>> entirely successfull. I've attached the patch and would appreciate
>>> if someone could glance over it looking for obvious errors.
>> There are never any "obvious" errors in the NCG :-)  I did glance
>> over it, and it mostly looks like a straightforward change over to
>> Cmm. Since your patch only touches code inside #ifdef
>> sparc_TARGET_ARCH, which is currently broken anyway, I'm inclined to
>> just merge it as-is. 
> That sounds good to me, a smaller diff would hopefully make my life
> easier.
> About the lack of sparc-support - is the problem that no active
> developers have access to sparc-machines any longer or is there simply
> no interest in sparc? If it is the former, contact me off list and
> I'll try to help out.

I can get access to a machine, but I don't have a lot of time to
maintain the Sparc port (and it's always harder to fix things remotely).
We've been advertising for a Sparc guru for a while, but no takers so

> The stack-check sequence you are referring to, is that in Cmm
> represented by "if ((Sp + -12) < SpLim) goto <label>"? If that is the
> case, I can't find any errors in the asm produced.
> Any hints that would ease the burden of reading big chunks of
> assembler would be much appreciated!

Compiling programs with -debug is a good first step - that links in the
debugging version of the RTS, with lots of ASSERTs and support for the
debugging output flags (-Dxxx,  -Ds and -DS are my favourites).


More information about the Glasgow-haskell-users mailing list