<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&#39;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">&lt;<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
&gt; On 21 Aug 2016, at 12:21, Nicolas Cellier &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@<wbr>gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi,<br>
&gt; here are my findings:<br>
&gt;<br>
&gt; FFI works on Win64 X64 squeak.stack.spur IF AND ONLY IF compiled with clang.<br>
&gt; 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>
&gt;<br>
&gt; Basic Alien tests work, but beware, use the unsplit Alien package from Eliot which contains essential changes for X64.<br>
&gt; 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>
&gt; Callback does not work yet. We got an incorrect thunkp passed back in the callbackContext...<br>
&gt; thunkEntry does not receive the correct value for thunkp.<br>
&gt; 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>
&gt; So we are going to need initializeX64Win64, and a CallbackX64Win64 abi ^ &#39;X64Win64&#39;...<br>
&gt;<br>
&gt; That&#39;s my understanding so far...<br>
&gt;<br>
&gt; This should not require VM changes, but only Alien image side changes.<br>
&gt; However:<br>
&gt; 1) I don&#39;t feel like generating the binary machine code for initializeX64Win64<br>
&gt; 2) I&#39;m not even sure that it&#39;s possible in 64 bytes.<br>
&gt;<br>
&gt; 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>
&gt;<br>
&gt; cheers<br>
<br>
</div></div></blockquote></div><br></div></div></div></div></div>