[squeak-dev] FFI Callback

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon Jun 22 13:56:29 UTC 2020

Hi all, Marcel,
I've just spent a few hours on fixing my own bug in HDF5 FFI callbacks.

That's expected, writing the callback is currently like writing assembler!
We must know:
- where we should pick argument depending on its type and rank
  is it serialized in the int registers array, float registers array or on
- in which order are those arrays passed in? (this may vary with arch)
  and how many arguments do I need to deserialize my specific signature?
  just intRegs, or stackp, or floatRegs?
- at which offset should we pick each parameter?
- what if it is a struct passed by value?
- how a signedLongLong is passed on 32bits ABIs?

Beside, we support 4 different ABI and several calling conventions! Ouch!

Since I'm normally bad like most of us for this task (supernatural powers
apart), we definitely need to assist the poor humans and have those wrapper

My 2ยข, thanks in advance for generously putting the missing 999,999.98$.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200622/7fcabd14/attachment.html>

More information about the Squeak-dev mailing list