This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Ilya.Kulakov, alexei.romanov, amaury.forgeotdarc, belopolsky, eryksun, meador.inge, vinay.sajip, weeble
Date 2017-02-19.20:29:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1487536182.65.0.318871399505.issue22273@psf.upfronthosting.co.za>
In-reply-to
Content
Structs that are larger than 32 bytes get copied to the stack (see classify_argument in ffi64.c), so we don't have to worry about classifying their elements for register passing. Thus if a new field is added for this in StgDictObject, then PyCArrayType_new should only allocate it for array types that are 32 bytes or less. Using it for larger array types would serve no point.

> explain the working on Windows/failing on Linux.

In the Windows libffi we don't have examine_argument() and classify_argument(). The Win64 ABI is fairly simple [1]. A struct that's 8 bytes or less gets passed as an integer, so if it's in the first four arguments it gets passed in rcx, rdx, r8, or r9. Otherwise it gets copied and passed by reference. Unlike the 64-bit Unix ABI, we don't have to worry about packing struct elements across multiple registers or passing floating-point elements in vector registers.

[1]: https://msdn.microsoft.com/en-us/library/zthk2dkh.aspx
History
Date User Action Args
2017-02-19 20:29:42eryksunsetrecipients: + eryksun, vinay.sajip, amaury.forgeotdarc, belopolsky, weeble, meador.inge, Ilya.Kulakov, alexei.romanov
2017-02-19 20:29:42eryksunsetmessageid: <1487536182.65.0.318871399505.issue22273@psf.upfronthosting.co.za>
2017-02-19 20:29:42eryksunlinkissue22273 messages
2017-02-19 20:29:42eryksuncreate