[Vm-dev] Re: FFI 64-bit updates - progress report

David T. Lewis lewis at mail.msen.com
Sat Apr 19 23:02:36 UTC 2008


This is an update on the status of changes for 32/64 bit clean FFI. I have
attached a snapshot of my current changes.

Overall changes involve:
 - Add FFIPlugin>>primitiveSizeOfPointer for runtime address size check
 - ExternalAddress is either 4 or 8 bytes wide, initialized at image startup
 - Remove all casts from pointer to int for FFI plugin and interpreter
   (VM minor version bump)
 - Recompile all methods with cdecl or apicall pragmas (must to done for an
   image to run properly on a 64 bit host)

Platform FFI testing as of Sat Apr 19 18:39:01 EDT 2008
"GREEN" means no compiler warnings, all SUnits pass, and the X window examples work.

======================================================================================================
VM     config.guess             FFI implementiation             host     image      status
--     ------------             -------------------             ----     -----      ------
unix   i686-pc-linux-gnu        x86-sysv.c+x86-sysv-asm.S       32 bit   32 bit     GREEN
unix   i686-pc-linux-gnu        x86-sysv.c+x86-sysv-asm.S       32 bit   64 bit     GREEN
unix   i686-pc-linux-gnu        any-libffi.c                    32 bit   32 bit     GREEN
unix   i686-pc-linux-gnu        any-libffi.c                    32 bit   64 bit     GREEN
unix   x86_64-unknown-linux-gnu any-libffi.c                    64 bit   32 bit     GREEN
unix   x86_64-unknown-linux-gnu any-libffi.c                    64 bit   64 bit     GREEN
unix   x86_64-unknown-linux-gnu x86_64-sysv.c+x86_64_sysv-asm.S 64 bit   32 bit     Not implemented(*)
unix   x86_64-unknown-linux-gnu x86_64-sysv.c+x86_64_sysv-asm.S 64 bit   64 bit     Not implemented(*)
unix                            ppc-darwin.c+ppc-darwin-asm.S   ?        32 bit     tbd
unix                            ppc-darwin.c+ppc-darwin-asm.S   ?        64 bit     tbd
unix                            ppc-sysv.c+ppc-sysv-asm.S       ?        32 bit     tbd
unix                            ppc-darwin.c+ppc-darwin-asm.S   ?        64 bit     tbd
win32  32 bit Windows on AMD64  sqWin32FFI.c                    32 bit   32 bit     tbd
win32  32 bit Windows on AMD64  sqWin32FFI.c                    32 bit   64 bit     tbd
Mac OS ... (should be easy update)
RiscOS ... (no FFI implementation?)

(*) Is anyone willing and/or able to write a x86_64_sysv-asm.S? I could do the
corresponding x86_64-sysv.c, but could use some help on how to set up a 64 bit 
call stack in assembler, never did that before.

- Dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffi-patches-4-dtl.zip
Type: application/zip
Size: 23613 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20080419/f8fa8f09/ffi-patches-4-dtl-0001.zip


More information about the Vm-dev mailing list