[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fftw3: Patch for powerpc build failure

On Mon, 5 Jan 2004, Benjamin Herrenschmidt wrote:
> > SIGILL and we use setjmp/longjmp to recover from the trap.  However,
> > last he checked, gcc -mabi=altivec caused setjmp/longjmp to try to save
> > altivec registers, failing on the G3.  There are several possible

(Reportedly, this is no longer the case with the latest Debian/testing,
although I'm not sure I would want to rely on this fact.)

> You can detect differently by using the ELF AUX tables passed by the
> kernel to any executable. The AT_HWCAP entry contains "feature" bits,
> one of them indicating the support of Altivec, see the kernel
> include/asm/cputable.h for the bit definitions.

Thanks!  We'll look into this.

The remaining issue is probably stack alignment; I'm told I was wrong, and
-mabi=altivec is required for 16-byte stack alignment.  Ideally, we would
like to avoid requiring FFTW-using programs to use this flag, and we may
be able to deal with it in a similar way to how we align the stack on x86:
use an assembly hack to align the stack at FFTW entry points, and compile
FFTW itself with -mabi=altivec to preserve 16-byte alignment internally
once it is established.

In any case, this will have to wait for the next release of FFTW; the
current version is Altivec-only if you compile with --enable-altivec.

Steven G. Johnson

Reply to: