[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
http://developer.apple.com/documentation/DeveloperTools/Conceptual/LowLevelABI/Introduction.html
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
>> OS-
>> X.
>>
>
> Actually I am working with the cdecl implementation that Andreas
> wrote,
> in platforms/unix/plugins/SqueakFFIPrims/any-libffi.c. My plan has
> been
> 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-
> sysv-asm.S),
> and then come back to the list to beg for help.
>
> Why that approach? Because I don't know how to write the assembler
> routine
> to set up a stack frame for 64 bit Linux. And that's only one of the
> reasons
> that I warned you to expect some dumb questions ;)
>
> So here comes the first of the dumb questions: Do you have an
> assembler
> 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
> conventions
> would be completely different for 32 bit and 64 bit systems, but I did
> not even bother to google the topic to find out.
>
> Dave
>
--
=
=
=
========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
=
=
=
========================================================================
More information about the Vm-dev
mailing list