[Vm-dev] FFI plugin 64 bit updates (not yet)
John M McIntosh
johnmci at smalltalkconsulting.com
Fri Mar 21 19:18:12 UTC 2008
Apple has a helpful document here
On Mar 21, 2008, at 11:54 AM, David T. Lewis wrote:
> On Fri, Mar 21, 2008 at 09:56:10AM -0700, John M McIntosh wrote:
>> On Mar 21, 2008, at 8:12 AM, David T. Lewis wrote:
>>> I have been working on updating FFI for 64 bit hosts (Linux).
>> Ah well maybe you can merge the two FFI assembler sets for os-x, the
>> one I created and the one from Ian's unix tree.
>> I note the one from the unix tree is incorrect, it does not properly
>> do the boundary alignments so then quicktime FFI calls later fail in
>> vector processing code on
>> a memory alignment exception.
>> This of course is only triggered if you invoke quicktime via FFI on
> Actually I am working with the cdecl implementation that Andreas
> in platforms/unix/plugins/SqueakFFIPrims/any-libffi.c. My plan has
> to get this working on 64 bits, then move all the changes back to a
> 32 bit
> Linux and get them working there with the apicall interface (x86-
> and then come back to the list to beg for help.
> Why that approach? Because I don't know how to write the assembler
> to set up a stack frame for 64 bit Linux. And that's only one of the
> that I warned you to expect some dumb questions ;)
> So here comes the first of the dumb questions: Do you have an
> implementation that sets up a call stack for a 64 bit system, and that
> would work on Linux as well as OS X? I had assumed that the
> would be completely different for 32 bit and 64 bit systems, but I did
> not even bother to google the topic to find out.
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
More information about the Vm-dev