[sldev] Linux non-x86 SSE build script

Paul TBBle Hampson Paul.Hampson at Pobox.com
Wed Aug 8 08:51:08 PDT 2007


On Mon, Aug 06, 2007 at 11:41:40AM -0700, Dzonatas wrote:
> The _sse and _sse2 files, as they are currently exposed, should
> compile fine with no problem on non-x86, as it is wrapped. If you want
> to use the SConstruct for non-x86, just make sure is does not define
> the -march or -fpmath for those platforms. The intention is to compile
> those files without error if they are included rather than complain
> that they were included even if the modules were not actually used.

I see that now. I'm not convinced that's a good solution (do I really
want to include two classes in my binary that simply forward to the
third class?) since it's also rather binary, using LL_VECTORIZE for
what is really LL_SSE/SSE2.

Then again, the SSE and SSE2 code appears identical.

Even so, it precludes for example an explicit Altivec implementation.
The Internet suggests Sparc offers a different-again SIMD instruction
set "VIS", and there's always VMX128 on the Xbox 360 (According to
Wikipedia. ^_^)

I'll have a look at how pervasive LL_VECTORIZE is, and if it can be
replaced with LL_SSE, LL_SSE2 etc. These'll have to be detected in
the SConstruct, since they'll control compiler flags and/or files.list.

Hmm. By 'detected' I mean 'looked up by ARCH', I guess.

Hmm... I wonder if I need a compiler flag to enable autovectorisation
for altivec? That might explain why performance is so awful on my
laptop...

Heh. [1] says I do. Well, there's something to look in to.

And while I'm looking at it, what version of gcc is being used to
compile for MacOS X? -faltivec is deprecated in gcc 4 on Mac OS X
in favour of -maltivec, Google tells me.

Hmm. I wonder if anyone'd want to run SLViewer on a G3... I'll prolly
just build G4-or-better packages, until someone asks.

> As for SConstruct, I've worked on rewrite for quite some time. It's
> been through lots of testing and redesign over the months to make it
> really easy to customize per platform and per compiler.

> The work can be found on the Open Second Life Community Code
> repository: The most recent work is in this branch:
> http://oslcc.svn.sourceforge.net/svnroot/oslcc/sandbox/branches/os/trunk

I had a brief look, I can't see where it adds -m flags for sse or sse2.

And it looks like it deviates a fair way from upstream, which I don't
have the time or brainspace to track just now.

[1] http://gcc.gnu.org/projects/tree-ssa/vectorization.html

-- 
-----------------------------------------------------------
Paul "TBBle" Hampson, B.Sc, LPI, MCSE
On-hiatus Asian Studies student, ANU
The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361)
Paul.Hampson at Pobox.com

Of course Pacman didn't influence us as kids. If it did,
we'd be running around in darkened rooms, popping pills and
listening to repetitive music.
 -- Kristian Wilson, Nintendo, Inc, 1989

License: http://creativecommons.org/licenses/by/2.1/au/
-----------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.secondlife.com/pipermail/sldev/attachments/20070809/72833a8b/attachment-0001.pgp


More information about the SLDev mailing list