[Vm-dev] Lowcode and x64

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sun Nov 27 21:50:15 UTC 2016


Hi Ronie,
>From my understanding, following code cannot work in x64 because registers
are overwritten while marshalling arguments:

generateLowcodeObjectTrampolines
    ... snip ...
    ceInstantiateClassIndexableSizeTrampoline := cogit genTrampolineFor:
#instantiateClass:indexableSize:
                                                called:
'ceInstantiateClassIndexableSizeTrampoline'
                                                arg: ReceiverResultReg
                                                arg: Arg0Reg
                                                result: TempReg.

The first arg ReceiverResultReg (RDX) will overwrite Arg0Reg (RDI) before
Arg0Reg is copied to Arg1Reg (RSI)...
See genMarshallNArgs:arg:arg:arg:arg:
and carefully read the comment for the x64 flavour, it's scary ;)

Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20161127/400b18c3/attachment.html>


More information about the Vm-dev mailing list