createAdjustor for Alpha (and Sparc)

Lennart Augustsson [email protected]
Wed, 25 Jul 2001 09:51:09 +0200

Ken Shan wrote:

> 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.

And it's very complicated on the MIPS too where the argument passing
convention depends on the type of the arguments.  Perhaps the GHC
way is too simplistic?  I did these kinds of things for a number of platforms
many years (8?) ago and came to the conclusion that the most realiable
way was to create a fast array of functions for different argument combinations.
Once you get beyond a certain number of arguments all platforms start
using the stack and then you are safe again.
But it's a mess.

    -- Lennart