From 46f645175aad96ae4a4898fc2205b39def538952 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Sikora?= Date: Wed, 25 May 2005 18:59:12 +0000 Subject: [PATCH] - fix altivec build (it should work with gcc-3.3.x too but not tested). Changed files: fftw-gcc4.patch -> 1.1 --- fftw-gcc4.patch | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 fftw-gcc4.patch diff --git a/fftw-gcc4.patch b/fftw-gcc4.patch new file mode 100644 index 0000000..d32e76d --- /dev/null +++ b/fftw-gcc4.patch @@ -0,0 +1,43 @@ +--- fftw-3.0.1/simd/altivec.c.orig 2003-03-15 21:29:43.000000000 +0100 ++++ fftw-3.0.1/simd/altivec.c 2005-05-25 20:55:26.000000000 +0200 +@@ -26,15 +26,14 @@ + #if HAVE_ALTIVEC + + const vector unsigned int X(altivec_ld_selmsk) = +- (vector unsigned int)VLIT(0, 0, 0xFFFFFFFF, 0xFFFFFFFF); ++ (const vector unsigned int)VLIT(0, 0, 0xFFFFFFFF, 0xFFFFFFFF); + + const vector unsigned int X(altivec_flipri_perm) = +- (vector unsigned int)VLIT(0x04050607, 0x00010203, +- 0x0c0d0e0f, 0x08090a0b); ++ (const vector unsigned int)VLIT(0x04050607, 0x00010203, 0x0c0d0e0f, 0x08090a0b); + + const vector float X(altivec_chsr_sgn) = +- (vector float)VLIT(-1.0, 1.0, -1.0, 1.0); ++ (const vector float)VLIT(-1.0, 1.0, -1.0, 1.0); + const vector float X(altivec_chsr_msk) = +- (vector float)VLIT(-0.0, 0.0, -0.0, 0.0); ++ (const vector float)VLIT(-0.0, 0.0, -0.0, 0.0); + + #endif +--- fftw-3.0.1/simd/simd-altivec.h.orig 2003-03-21 13:45:48.000000000 +0100 ++++ fftw-3.0.1/simd/simd-altivec.h 2005-05-25 20:57:22.000000000 +0200 +@@ -92,14 +92,15 @@ + return (vector float) __builtin_altivec_vxor ((vector signed int) a1, (vector signed int) a2); + } + +-#define VLIT(x0, x1, x2, x3) {x0, x1, x2, x3} +- + #else /* !__VEC__ */ + +-#define VLIT(x0, x1, x2, x3) (x0, x1, x2, x3) ++/* gcc provides altivec builtins */ ++#include + + #endif + ++#define VLIT(x0, x1, x2, x3) {x0, x1, x2, x3} ++ + typedef vector float V; + #define VADD(a, b) vec_add(a, b) + #define VSUB(a, b) vec_sub(a, b) -- 2.43.0