[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] ThreadedFFIPlugin ffiReturnStruct:ofType:in: can be refactored. (#517)

Eliot Miranda notifications at github.com
Sun Aug 30 00:40:25 UTC 2020

Currently some implementations of ffiReturnStruct:ofType:in: have knowledge about whether structs are returned in registers or not (a nice recent improvement by Nicolas Cellier).  However, it would be better if this information was pulled out into the caller.  Then there would be a single ffiReturnStruct:ofType:in: that would be passed a painter.  The pointer should be something like
    self structResultPointerFor: calloutState and: ...

In fixing the ARMv8 ThreadedFFIPlugin for the case of Homogenous Float Arrays it was necessary to have two separate invocations of ffiReturnStruct:ofType:in:, one for the float return and one for a normal struct return which may be returned in integer registers or through memory.  On ARMv8 a struct can be returned through memory, in integer registers or in floating-point registers.  So putting the logic in ffiReturnStruct:ofType:in: isn't as good as putting the logic in the caller ffiCalloutTo:SpecOnStack:in:

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20200829/8df4552e/attachment-0001.html>

More information about the Vm-dev mailing list