--- Status of updates for 32/64 bit clean FFI ---
I updated the Windows platform sources and verified that the Windows examples run and all unit tests are green. I also updated the unix platform sources for Mac and verified clean compiles, although I do not have have a machine on which to test these changes. I have not done anything for Mac OS platform sources, but I expect the changes to be straightforward (John, are you interested in looking at this?).
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 any image to run properly on 64 bit host)
Platform FFI testing as of Mon May 26 14:26:22 EDT 2008 "GREEN" means no compiler warnings, all SUnits pass, and the X11/Win32 examples work.
====================================================================================================== VM config.guess FFI implementiation host image status -- ------------ ------------------- ---- ----- ------ win32 32 bit Windows on AMD64 sqWin32FFI.c 32 bit 32 bit GREEN win32 32 bit Windows on AMD64 sqWin32FFI.c 32 bit 64 bit tbd 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 Needs testing(**) unix ppc-darwin.c+ppc-darwin-asm.S ? 64 bit Needs testing(**) unix ppc-sysv.c+ppc-sysv-asm.S ? 32 bit Needs testing(**) unix ppc-darwin.c+ppc-darwin-asm.S ? 64 bit Needs testing(**) 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.
(**) C code changes implemented. Compiles on Linux, but not tested on target platform. Need somebody with a PPC Mac to try this.
vm-dev@lists.squeakfoundation.org