I’ve published an alpha version of an FFI for the ARM architecture. It is in the class ThreadedARMFFIPlugin in the VMMaker.oscog package on source.squeak.org. The generated sources are also available at http://squeakvm.org/svn/squeak/branches/Cog/src/plugins/SqueakFFIPrims/ARM32...
It passes all existing FFI tests and all tests I used for development. I plan to commit my development tests to the FFI-Tests package within the next few days. These extra tests are important because existing tests don’t exercise some of the trickier cases choosing between registers and stack when marshaling function parameters.
So far, the ARM FFI has only been tested with the Cog/Stack VM on a Raspberry Pi. I plan to also test it on the BeagleBone Black which has a slightly different ARM chip.
The overwhelming majority of the credit for this must go to Eliot Miranda because his FFI design works so well, and because he helped me immensely along the way. And many thanks to Tim Rowledge for showing me how to build a Cog/Stack VM on the RPi and answering numerous other questions. Any bugs in the ARM version of the FFI are my responsibility.
Enjoy! Doug
On 29-04-2014, at 1:50 PM, Douglas McPherson djm1329@san.rr.com wrote:
I’ve published an alpha version of an FFI for the ARM architecture. It is in the class ThreadedARMFFIPlugin in the VMMaker.oscog package on source.squeak.org. The generated sources are also available at http://squeakvm.org/svn/squeak/branches/Cog/src/plugins/SqueakFFIPrims/ARM32...
Congratulations Doug. This will be very helpful on the Pi!
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: WAF: Warn After the Fact
On Tue, Apr 29, 2014 at 01:50:47PM -0700, Douglas McPherson wrote:
I?ve published an alpha version of an FFI for the ARM architecture. It is in the class ThreadedARMFFIPlugin in the VMMaker.oscog package on source.squeak.org. The generated sources are also available at http://squeakvm.org/svn/squeak/branches/Cog/src/plugins/SqueakFFIPrims/ARM32...
It passes all existing FFI tests and all tests I used for development. I plan to commit my development tests to the FFI-Tests package within the next few days. These extra tests are important because existing tests don?t exercise some of the trickier cases choosing between registers and stack when marshaling function parameters.
So far, the ARM FFI has only been tested with the Cog/Stack VM on a Raspberry Pi. I plan to also test it on the BeagleBone Black which has a slightly different ARM chip.
The overwhelming majority of the credit for this must go to Eliot Miranda because his FFI design works so well, and because he helped me immensely along the way. And many thanks to Tim Rowledge for showing me how to build a Cog/Stack VM on the RPi and answering numerous other questions. Any bugs in the ARM version of the FFI are my responsibility.
Doug,
Excellent news. Thanks!
Dave
vm-dev@lists.squeakfoundation.org