<p>The case when a structure passed by value is passed via memory (thru a pointer), via registers, or just stack, same for structure return value is much more complex than what is programmed currently in both FFI and Alien (FFI and Alien currently do not even agree...).</p>
<p>This badly need more test cases and more attention.<br>
See squeak-dev thread <strong>[squeak-dev] Alien primFFICall returning struct with 64bit vm</strong><br>
<a href="http://lists.squeakfoundation.org/pipermail/squeak-dev/2019-November/204974.html" rel="nofollow">http://lists.squeakfoundation.org/pipermail/squeak-dev/2019-November/204974.html</a></p>
<p>See draft for ABI, near page 21 and 24 (not very clear)<br>
<a href="https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-1.0.pdf">https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-1.0.pdf</a></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/443?email_source=notifications&email_token=AIJPEW5DE7IGMT4IV7ZSR4DQSMJMHA5CNFSM4JJ3EAU2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HXKMSWQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW76YWK567HZN23LNNLQSMJMHANCNFSM4JJ3EAUQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEW4UAISSVULZHPMQ2ITQSMJMHA5CNFSM4JJ3EAU2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HXKMSWQ.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/443?email_source=notifications\u0026email_token=AIJPEW5DE7IGMT4IV7ZSR4DQSMJMHA5CNFSM4JJ3EAU2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HXKMSWQ",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/443?email_source=notifications\u0026email_token=AIJPEW5DE7IGMT4IV7ZSR4DQSMJMHA5CNFSM4JJ3EAU2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HXKMSWQ",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>