<br><br><div class="gmail_quote">On Tue, Aug 28, 2012 at 3:05 PM, Igor Stasenko <span dir="ltr"><<a href="mailto:siguctua@gmail.com" target="_blank">siguctua@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks, Eliot.<br>
Guillermo started working on that thing, and i really hope with our<br>
help he will manage to do it.<br>
And then once we will have 64-bit stack VM working, it will open a<br>
straight road to 64-bit jit implementation.<br></blockquote><div><br></div><div>Right, cool. But remember one can (and should) develop the code generator in Smalltalk/VMMaker above a BochsIA64Plugin, which should be straight-forward to derive from Bochs by configuring it for IA64/x86-64. Good luck!</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
<br>
On 28 August 2012 20:44, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
><br>
><br>
><br>
> On Tue, Aug 28, 2012 at 8:47 AM, Guillermo Polito <<a href="mailto:guillermopolito@gmail.com">guillermopolito@gmail.com</a>> wrote:<br>
>><br>
>><br>
>> the rest is COMPILED<br>
>> this is the only thing which prevents from linking StackVM and getting a binary on Mac OSX.<br>
>> Since x86 are similar to x64. i expect this can be done without much changes in assembler code.<br>
>><br>
>> Please help/advice.<br>
>><br>
>> Undefined symbols for architecture x86_64:<br>
>> "_sqLowLevelMFence", referenced from:<br>
>> _forceInterruptCheck in gcc3x-interp.c.o<br>
>> _primitiveLongRunningPrimitiveSemaphore in gcc3x-interp.c.o<br>
>> _markAndTraceInterpreterOops in gcc3x-interp.c.o<br>
>> _primitiveDoPrimitiveWithArgs in gcc3x-interp.c.o<br>
>> _beRootIfOld in gcc3x-interp.c.o<br>
>> _updatePointersInRangeFromto in gcc3x-interp.c.o<br>
>> _setInterruptPending in gcc3x-interp.c.o<br>
>> ...<br>
>> "_sqCompareAndSwapRes", referenced from:<br>
>> _signalSemaphoreWithIndex in sqExternalSemaphores.c.o<br>
><br>
><br>
> this line in platforms/Cross/vm/sqMemoryFence.h should work fine:<br>
><br>
> # define sqLowLevelMFence() asm volatile ("mfence")<br>
><br>
>> ld: symbol(s) not found for architecture x86_64<br>
>> collect2: ld returned 1 exit status<br>
>> make[2]: *** [/Users/guillermopolito/Pharo/vm/self-compiled/blessed/results/StackVM.app/Contents/MacOS/StackVM] Error 1<br>
>> make[1]: *** [CMakeFiles/StackVM.dir/all] Error 2<br>
>> make: *** [all] Error 2<br>
>><br>
><br>
> again the macro definitions in platforms/Cross/vm/sqAtomicOps.h shoild be fine:<br>
><br>
> # define sqCompareAndSwap(var,old,new) \<br>
> asm volatile ("movl %1, %%eax; lock cmpxchg %2, %0" \<br>
> : "=m"(var) \<br>
> : "g"(old), "r"(new), "m"(var)\<br>
> : "memory", "%eax")<br>
><br>
> # define sqCompareAndSwapRes(var,old,new,res) \<br>
> asm volatile ("movl %2, %%eax; lock cmpxchg %3, %0; movl %%eax, %1" \<br>
> : "=m"(var), "=g"(res) \<br>
> : "g"(old), "r"(new), "m"(var) \<br>
> : "memory", "%eax")<br>
><br>
> All you have to do is take these definitions and add them in a separate arm for x86-64, e.g.<br>
><br>
> #if defined(__GNUC__) && (defined(i386) || defined(__i386) || defined(__i386__) || defined(_X86_))<br>
> ....existing definitions...<br>
> #else<br>
> ...<br>
><br>
> becomes<br>
><br>
> #if defined(__GNUC__)<br>
> # if defined(i386) || defined(__i386) || defined(__i386__) || defined(_X86_))<br>
> ....existing definitions...<br>
> # elif defined(x64) /* or whatever else x86-64 is called */<br>
> ....copy of x86 definitions that use assembler (i.e. *not* asm volatile (".byte 0x0f;.byte 0xae;.byte 0xf0")) ...<br>
> # endif<br>
> #else<br>
> ...<br>
><br>
><br>
> --<br>
> best,<br>
> Eliot<br>
><br>
><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Best regards,<br>
Igor Stasenko.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>