<div dir="ltr"><div><div>Hi Esteban,<br></div><div>I wanted to load Alien in Squeak.<br></div>It was not obvious which version should be loaded because there's no instruction for squeak in the project page <a href="http://www.squeaksource.com/Alien.html">http://www.squeaksource.com/Alien.html</a> , nor in the wiki page, and the ConfigurationOfAlien is obsolete.<br></div>In such context, I was just reporting my guess here.<br><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-21 12:51 GMT+02:00 Esteban Lorenzano <span dir="ltr"><<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
> On 21 Aug 2016, at 12:21, Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@<wbr>gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
> here are my findings:<br>
><br>
> FFI works on Win64 X64 squeak.stack.spur IF AND ONLY IF compiled with clang.<br>
> 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>
> Basic Alien tests work, but beware, use the unsplit Alien package from Eliot which contains essential changes for X64.<br>
> The ConfigurationOfAlien for Pharo based on split packages does not have these important changes and will crash the VM.<br>
<br>
</span>but Pharo contains Alien in his latest version… no need to load it. Why are you trying?<br>
<br>
For older Pharos (4.0 and older), you can always use “ConfigurationOfOldAlien”, but this is not maintained anymore.<br>
<div class="HOEnZb"><div class="h5"><br>
> 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>
> So we are going to need initializeX64Win64, and a CallbackX64Win64 abi ^ 'X64Win64'...<br>
><br>
> That's my understanding so far...<br>
><br>
> This should not require VM changes, but only Alien image side changes.<br>
> However:<br>
> 1) I don't feel like generating the binary machine code for initializeX64Win64<br>
> 2) I'm not even sure that it's possible in 64 bytes.<br>
><br>
> 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>
> cheers<br>
<br>
</div></div></blockquote></div><br></div></div></div></div></div>