New codegen: GC calling convention must use registers.
authorEdward Z. Yang <ezyang@mit.edu>
Fri, 18 Feb 2011 01:17:45 +0000 (01:17 +0000)
committerEdward Z. Yang <ezyang@mit.edu>
Fri, 18 Feb 2011 01:17:45 +0000 (01:17 +0000)
commit4c53d93a7690b89b44f6d52380de867527800924
treec527757d76e929ec35d6323263d45b84a548a91f
parentf2aaae9757e7532485c97f6c9a9ed5437542d1dd
New codegen: GC calling convention must use registers.

Previously, on register-deficient architectures like x86-32,
the new code generator would emit code for calls to stg_gc_l1,
stg_gc_d1 and stg_gc_f1 that pushed their single argument on
to the stack, while the functions themselves expected the
argument to live in L1, D1 and F1 (respectively).  This was
because cmmCall with the GC calling convention allocated real
registers, not virtual registers.

This patch modifies the code for assigning registers/stack slots
to use the right calling convention for GC and adds an assertion
to ensure it did it properly.
compiler/cmm/CmmCallConv.hs