<p>Follow up: for returning struct by value, we use a fake SixteenByteReturn struct {sqInt a; sqInt b;}<br>
Unfortunately, this only works for fields returned via integer registers ($RAX ...) not via float registers ($XMM0 ...)</p>
<p>We would need 4 different return cases sqInt-sqInt sqInt-double double-sqInt  double-double</p>
<p>For passing struct by value, I just corrected a bug in VMMaker slang about floatType & doubleType check of struct members. But it ain't gonna work in all cases.<br>
<a href="https://source.squeak.org/VMMaker/VMMaker.oscog-nice.2677.diff" rel="nofollow">https://source.squeak.org/VMMaker/VMMaker.oscog-nice.2677.diff</a></p>
<p>I will also push more FFI tests for some tricky cases.</p>
<p>I have prototyped a method that enumerate the fields and re-compute the alignment, but it does not sound good, this job/information is already done at image side...</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you commented.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/443?email_source=notifications&email_token=AIJPEW4HLQO37WVMDKOP6ODQ7PW7LA5CNFSM4JJ3EAU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ4XUUQ#issuecomment-578386514">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW4SHIFKRZZNT3FBMHLQ7PW7LANCNFSM4JJ3EAUQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEWZHFPHHMXOVL6VH4FLQ7PW7LA5CNFSM4JJ3EAU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ4XUUQ.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=AIJPEW4HLQO37WVMDKOP6ODQ7PW7LA5CNFSM4JJ3EAU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ4XUUQ#issuecomment-578386514",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/443?email_source=notifications\u0026email_token=AIJPEW4HLQO37WVMDKOP6ODQ7PW7LA5CNFSM4JJ3EAU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ4XUUQ#issuecomment-578386514",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>