[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] passing struct by value does not respect x86_64 SysV ABI (#443)

Nicolas Cellier notifications at github.com
Sat Jan 25 08:04:05 UTC 2020

Follow up: for returning struct by value, we use a fake SixteenByteReturn struct {sqInt a; sqInt b;}
Unfortunately, this only works for fields returned via integer registers ($RAX ...) not via float registers ($XMM0 ...)

We would need 4 different return cases sqInt-sqInt sqInt-double double-sqInt  double-double

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.

I will also push more FFI tests for some tricky cases.

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...

You are receiving this because you commented.
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/20200125/22904a37/attachment.html>

More information about the Vm-dev mailing list