[project @ 2000-01-24 18:33:34 by sewardj]
[ghc-hetmet.git] / ghc / compiler / nativeGen / NOTES
1
2 Known bugs in nativeGen, 000124 (JRS)
3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
5 All these bugs are for x86; I don't know about sparc/alpha.
6
7 -- argument marshalling for ccall is fundamentally flawed, since
8    it moves the C stack pointer %esp as it pushes each argument.
9    Alas, the register allocator spills relative to %esp and 
10    assumes that it doesn't move.  Result: if the marshalling code
11    for a ccall involves any spills, the resulting code will 
12    probably be wrong.
13
14    The Right Way to fix this is to copy stuff onto the stack
15    without moving %esp, then adjust it immediately prior to the
16    call insn and un-adjust it immediately following it.
17
18 -- nofib/spectral/cvh_unboxing exposes some kind of spilling bug
19    (I think), since there are many references to registers %M229
20    etc, which I believe are dynamic registers which didn't get assigned
21    to real ones.
22