FW: darcs patch: New codegen: GC calling convention must use registers.

Edward Z. Yang ezyang at MIT.EDU
Fri Feb 18 10:43:16 CET 2011


Hello,

It's for the new codegen only (it touches CmmCallConv, whereas the old
codegen bypasses the issue entirely by piggy-backing off the return
convention for functions.)

Cheers,
Edward

Excerpts from Simon Peyton-Jones's message of Fri Feb 18 03:29:53 -0500 2011:
> Edward
> 
> Does this patch concern the new-codegen-path only?  If so I'll commit it.  
> 
> If it affects the old (ie currently-relied-on) path, I'd prefer to wait for Simon M to review, but he's away for until Monday 28th.
> 
> Thank you for all the work you are doing on the codegen.
> 
> Simon
> 
> -----Original Message-----
> From: cvs-ghc-bounces at haskell.org [mailto:cvs-ghc-bounces at haskell.org] On Behalf Of Edward Z. Yang
> Sent: 18 February 2011 01:22
> To: cvs-ghc at haskell.org
> Subject: darcs patch: New codegen: GC calling convention must use registers.
> 
> 1 patch for repository http://darcs.haskell.org/ghc:
> 
> Fri Feb 18 01:17:45 GMT 2011  Edward Z. Yang <ezyang at mit.edu>
>   * 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.



More information about the Cvs-ghc mailing list