Marcel Taeumel uploaded a new version of VMMaker to project VM Maker Inbox: http://source.squeak.org/VMMakerInbox/VMMaker.oscog-mt.3180.mcz
==================== Summary ====================
Name: VMMaker.oscog-mt.3180 Author: mt Time: 12 April 2022, 3:24:49.887509 pm UUID: adbe155e-2f5f-e643-a586-8da8ae54915c Ancestors: VMMaker.oscog-mt.3179
Quickfix to make at least int32_t and uint32_t ranges work when pushing with Large(Positive|Negative)Integer arguments in an int64_t or uint64_t interface.
Note that SmallInteger does not cover int32_t or uint32_t in 32-bit builds.
The bigger issue is that #ffiArgByValue:in: is not prepared for an #ffiIntegerValueOf: that answers more than sqInt, which is the current word size. This would also effect, for example, int128_t and uint128_t types in a 64-bit build. But we do not have such types yet.
Overall, there is no good support for LargeInteger at this point. :-(
=============== Diff against VMMaker.oscog-mt.3179 ===============
Item was changed: ----- Method: ThreadedIA32FFIPlugin>>ffiPushSigned64:in: (in category 'marshalling') ----- ffiPushSigned64: value in: calloutState + "<var: #value type: #sqLong> -- No support for reading more than 32-bits of a LargeInteger. See #ffiIntegerValueOf:." - <var: #value type: #usqLong> <var: #calloutState type: #'CalloutState *'> <inline: #always> calloutState currentArg + 8 > calloutState limit ifTrue: [^FFIErrorCallFrameTooBig]. interpreterProxy + "longAt: calloutState currentArg put: (self cCoerceSimple: value to: #usqInt);" + longAt: calloutState currentArg put: value; + "longAt: calloutState currentArg + 4 put: (self cCoerceSimple: value >> 32 to: #usqInt)." + longAt: calloutState currentArg + 4 put: (value < 0 ifTrue: [16rFFFFFFFF] ifFalse: [0]). - longAt: calloutState currentArg put: (self cCoerceSimple: value to: #usqInt); - longAt: calloutState currentArg + 4 put: (self cCoerceSimple: value >> 32 to: #usqInt). calloutState currentArg: calloutState currentArg + 8. ^0!
Item was changed: ----- Method: ThreadedIA32FFIPlugin>>ffiPushUnsigned64:in: (in category 'marshalling') ----- ffiPushUnsigned64: value in: calloutState + "<var: #value type: #usqLong> -- No support for reading more than 32-bits of a LargeInteger. See #ffiIntegerValueOf:." - <var: #value type: #usqLong> <var: #calloutState type: #'CalloutState *'> <inline: #always> calloutState currentArg + 8 > calloutState limit ifTrue: [^FFIErrorCallFrameTooBig]. interpreterProxy + "longAt: calloutState currentArg put: (self cCoerceSimple: value to: #usqInt);" + longAt: calloutState currentArg put: value; + "longAt: calloutState currentArg + 4 put: (self cCoerceSimple: value >> 32 to: #usqInt)." + longAt: calloutState currentArg + 4 put: 0. - longAt: calloutState currentArg put: (self cCoerceSimple: value to: #usqInt); - longAt: calloutState currentArg + 4 put: (self cCoerceSimple: value >> 32 to: #usqInt). calloutState currentArg: calloutState currentArg + 8. ^0!
vm-dev@lists.squeakfoundation.org