<p></p>
<p>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<br>
self structResultPointerFor: calloutState and: ...</p>
<p>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:</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/517">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW5M64AVKS4GK3W2OPLSDGNXTANCNFSM4QPJTFBA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEWZBURW4EQURDWXLB6LSDGNXTA5CNFSM4QPJTFBKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KILUQBA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/517",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/517",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>