[cmucl-imp] Unboxed float arguments

Helmut Eller heller at common-lisp.net
Sun Jun 10 21:00:42 UTC 2012


* Raymond Toy [2012-06-10 17:13] writes:

> On 6/9/12 12:46 AM, Helmut Eller wrote:
>> Here is an idea for a calling convention that supports unboxed floats:
>
> This is pretty cool.  I've often wanted to be able to do that.
>
> I haven't looked at your code yet, but I was wondering how this compares
> with block compilation.  I'm pretty sure block compilation allows
> functions to jump directly to the no-arg-parsing entry point, so unboxed
> objects can be passed directly from the caller to the callee.  Functions
> not in the block-compilation block can still call those functions, but
> those callers use the regular entry point.

Yes, calls inside a block-compilation unit and calls to labels/flets can
work with unboxed objects.  The new calling convention would us allow to
reach the "no-arg-parsing entry point" from outside without going
through the regular entry point.

The disassembler seems to know about the no-arg-parsing entry point from
the debug info.  Maybe the debug info is good enough for the calling
convention, but maybe not.  I guess the compiler is free to pass the
arguments to local functions where and in whatever format seems
appropriate, but for a calling convention we probably want some more
explicit rules.

There is also a bit of a problem a the return point.  The regular entry
point usually tail-calls the no-arg-parsing entry point.  That implies
that the two functions have the same representation for the return
values.  With the new convention we don't want that, or at least not all
the time.  The regular entry point should box the return values after
the the no-arg-parsing entry point returns, i.e. tail-calls can't be
used.

Helmut



More information about the cmucl-imp mailing list