[squeak-dev] Re: Closure VM on XO
leves at elte.hu
Sun Mar 6 21:53:23 UTC 2011
On Sat, 5 Mar 2011, Levente Uzonyi wrote:
> On Fri, 4 Mar 2011, Eliot Miranda wrote:
>> 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
# 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.
More information about the Squeak-dev