<div dir="ltr"><div><div><div><div><div><div><div>Hi,<br></div>here are my findings:<br><br></div>FFI works on Win64 X64 squeak.stack.spur IF AND ONLY IF compiled with clang.<br></div>gcc 4.9.3 omit to reserve 32-bytes space for saving the four parameters passed by register, this might be a gcc bug.<br><br></div>Basic Alien tests work, but beware, use the unsplit Alien package from Eliot which contains essential changes for X64.<br></div>The ConfigurationOfAlien for Pharo based on split packages does not have these important changes and will crash the VM.<br><br></div>Callback does not work yet. We got an incorrect thunkp passed back in the callbackContext...<br>thunkEntry does not receive the correct value for thunkp.<br>I
think the problem is located in FFICallbackThunk initializeX64. For
Win64 ABI, caller has to reserve the 32bytes on top of stack for saving
the registers parameters.<br></div><div>So we are going to need initializeX64Win64, and a CallbackX64Win64 abi ^ 'X64Win64'...<br><div><br></div>That's my understanding so far...<br><br></div><div>This should not require VM changes, but only Alien image side changes.<br></div><div>However:<br></div><div>1) I don't feel like generating the binary machine code for initializeX64Win64</div><div>2) I'm not even sure that it's possible in 64 bytes.<br></div><br><div>So,
I will send the X64 Win64 squeak.stack.spur VM to Marcel and commit a
LLP64_v2 branch on github containing all the necessary source to
generate it.<br><br></div>cheers</div>