[Ardour-Dev] 2.7 isn't using SSE

John Rigg arddev at sound-man.co.uk
Mon Dec 1 15:15:00 PST 2008

On Wed, Nov 26, 2008 at 11:07:49PM +0200, Sampo Savolainen wrote:
> It seems that our code which detects whether SSE is available on the
> computer Ardour is started on is failing. My guess is that it's the
> combination of x86_64 and gcc 4.3 which uncovers a bug in the code
> calling cpuid .
> Sadly I have neither gcc 4.3 or a 64 bit OS on my development box so I'm
> unable to debug this issue. For anyone willing to try, the relevant code
> is in libs/pbd/fpu.cc, see FPU::FPU()

Here's what I've found so far. The code fails when compiled with
gcc versions 4.3.2, 4.2.4 and 4.1.2. I have noticed that scons reports
cpuflags as an unused variable.

I tried isolating the cpuid functions in a standalone C file, and compiled
it from the command line using the three compiler versions. In all cases
it detected SSE and SSE2 with no compiler optimization, but any value of -O 
above zero produced a nonsensical result. It looks like the compiler is
optimizing out some of the assembly code.

My production system, which is still running Ardour 2.4.1
compiled with gcc 4.1.1 on Debian Etch, uses the SSE optimized routines
without a problem. On the multitrack session I was using for a test (20 tracks
with a couple of EQ plugins and a couple of compressor plugins running) DSP
load was around 30-35% lower on the old system compared with 2.7 without the
SSE optimized routines on the same hardware.

Unfortunately that's all I've had time for so far.


More information about the Ardour-Dev mailing list