[Vm-dev] Re: [squeak-dev] Re: Closure VM on XO

Eliot Miranda eliot.miranda at gmail.com
Sun Mar 6 23:26:57 UTC 2011


On Sun, Mar 6, 2011 at 1:53 PM, Levente Uzonyi <leves at elte.hu> wrote:

> On Sat, 5 Mar 2011, Levente Uzonyi wrote:
>
>  On Fri, 4 Mar 2011, Eliot Miranda wrote:
>>
>> snip
>>
>>  Does the XO Geode support sse2?  Actually, what is the exact processor in
>>> the X0?  Right now the JIT won't use sse2 instructions if they aren;t
>>> available, which translates into no machine code floatng-point
>>> primitives.
>>> But I'm also using sse2 instructions to update the 64-bit microsecond
>>> clock, so without some rewrite teh current linux Cog does depend on sse2.
>>>
>>
>> Older XO's have Geode GX, newer have Geode LX CPUs. None of these support
>> SSE at all, just MMX and an extended version of 3DNow!. There's no MFENCE
>> (just SFENCE), so an alternative implementation is necessary for these CPUs.
>>
>
> According to http://www.linuxjournal.com/node/8212/print mfence is only
> necessary on x86_64 platforms, so I added the following two lines before the
> else branch in sqMemoryFence.h
>

I'm not sure a bout that.  It does state
    "Although many older x86 implementations accommodated self-modifying
code without the need for any special instructions, newer revisions of the
x86 architecture no longer require x86 CPUs to be so accommodating.
Interestingly enough, this relaxation comes just in time to inconvenience
JIT implementors."

I'd much rather you changed the define to be explicit about X0, than changed
for all x86.



> # elif !defined(__X86_64__)
> #       define sqLowLevelMFence() asm volatile ("lock; addl
> $0,0(%%esp)":::"memory")
>
> I compiled it with r2361 and it works fine on my 32-bit Ubuntu 10.04. So if
> the -msse compiler flag is removed from the Makefiles, then Cog should run
> on the XO-1 too.
>
> The article also mentions smp_mb() which should be used on linux, but I
> couldn't find which header file defines it.
>
>
> Levente
>
>
>>
>> Levente
>>
>>
>>> best
>>> Eliot
>>>
>>
>> snip
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20110306/372b479e/attachment.htm


More information about the Vm-dev mailing list