[Vm-dev] ABOUT ALLOCA_LIES_SO_USE_GETSP

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Fri Aug 12 16:16:41 UTC 2016


I've put notes on my understanding of extra bytes reserved by alloca when
using gcc on github comment below:

https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/ae8cb1011408487ddca50657241ea5ef3cc1e110

AFAICT, it seems that win64 x64 gcc alloca works the same (Don't remember
though if the difference was alloca return value=sp+8 or sp+16).

So x64 win64 FFI only works because we force sp before calling
externalFunction with:

    if ((0 + (cStackAlignment())) > 0) {
        setsp((calloutState->argVector));
    }

Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160812/7a6af6ba/attachment.htm


More information about the Vm-dev mailing list