createAdjustor for Alpha (and Sparc)  Ken Shan Tue, 24 Jul 2001
23:53:42 -0400  Content-Disposition: inline Content-Transfer-
Encoding: quoted-printable  Hello again,  It seems that I have a
registerised GHC mostly working on the Alpha. The main missing
piece is createAdjustor.  My understanding of (the _ccall rather
than _stdcall part of) createAdjustor is as follows: Given
"hptr" and "wptr" of types      void *hptr;     {return type}
(*wptr)(void *, void *, {more arguments});  createAdjustor
creates "adjustor" of the type      {return type}
(*adjustor)({more arguments});  such that calling
(*adjustor)({argument values})  is equivalent to calling
(*wptr)(hptr, {undefined/ignored pointer}, {argument values}).
This goal seems difficult to achieve on the Alpha, since its
complicated calling convention puts arguments in registers, and
we don't know how many arguments there are, let alone how to
adjust the stack if needed.  But wait!  There's a Sparc port of
createAdjustor already, and the Sparc passes