[Vm-dev] Errored: OpenSmalltalk/opensmalltalk-vm#1930 (Cog - 5aede68)

Travis CI builds at travis-ci.org
Wed Jan 29 19:41:19 UTC 2020


Build Update for OpenSmalltalk/opensmalltalk-vm
-------------------------------------

Build: #1930
Status: Errored

Duration: 2 hrs, 10 mins, and 10 secs
Commit: 5aede68 (Cog)
Author: Eliot Miranda
Message: CogVM source as per VMMaker.oscog-nice.2680/VMMaker.oscog-eem.2685.

ThreradedFFIPlugin: solve passing/returning struct by value on X64

See https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/443

On X64/SysV struct up to 16 byte long can be passed by value (& returned) into
a pair of 8-byte registers.  The problem is to know whether these are integer
(RAX RDX) or float (XMM0 XMM1) registers or eventually a mix of...

For each 8-byte, we must know if it contains at least an int (in which case we
have to use an int register), or exclusively floating points (a pair of float
or a double).  Previous algorithm did check first two fields, or last two fields
which does not correctly cover all cases...  For example int-int-float has last
two fields int-float, though it will use RAX XMM0.

So we have to know about struct layout... Unfortunately, this information is
not included into the compiledSpec.
The idea here is to reconstruct the information.
See #registerTypeForStructSpecs:OfLength: &

It's also impossible to cover the exotic alignments like packed structure
cases... if we really want to pass that, this will mean passing the alignment
information, a more involved change of #compiledSpec (we need up to 16 bits by
field to handle that information since our FFI struct are limited to 65535
bytes anyway).

For returning a struct, that's the same problem.
We have four possible combinations of int-float registers.
Consequently, the idea is to analyze #registerType: and switch to appropriate
case. I found convenient to pass the ffiRetSpec compiledSpec object thru
CalloutState (it's the Smalltalk WordArray object, not a pointer to its
firstIndexableField) for performing this analysis... Not sure if this is the
best choice.

Since we have 4 different SixteenByte types, I have changed
value, since it's what will be used to memcpy to allocated ByteArray handle.

View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/300c492314f7...5aede6849b39

View the full build log and details: https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds/643487143?utm_medium=notification&utm_source=email

--

You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&utm_medium=notification&utm_source=email.
Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email.
Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20200129/f5b96876/attachment.html>


More information about the Vm-dev mailing list