Eliot , then i recommend to change
ReentrantFFIPlugin>>moduleName ^ 'ReentrantFFIPlugin'
and Interpreter>>primitiveCalloutToFFI accordingly to prevent any future confusion and mixture with legacy code in Cog.
If you want, i can upload the patch right away..
oh yeah.. this will require moving some cross-platform sources too.. mv platforms/Cross/plugins/SqueakFFIPrims platforms/Cross/plugins/ReentrantFFIPlugin
On 27 December 2010 20:46, Eliot Miranda eliot.miranda@gmail.com wrote:
Hi Igor, that's all legacy. The Cog sources require only ReentrantFFIPlugin (at least on x86). As far as other processors I've written ReentrantFFIPlugin to allow straight-forward porting to other platforms. I can consult if anyone is motivated to try and port to PowerPC, ARM etc. The essential idea is to use C's alloca to allocate the space for the outgoing arguments on the stack and hence do all the marshalling in C. Passing register arguments is done by explicitly passing the register args, leavign the rest to be passed on teh stack throguh the alloca'ed space. In short, all that assembler support code is obsolete.
best Eliot On Mon, Dec 27, 2010 at 7:20 AM, Igor Stasenko siguctua@gmail.com wrote: