diff --git a/rtengine/helpersse2.h b/rtengine/helpersse2.h index 3e4365e99..d4290bacc 100644 --- a/rtengine/helpersse2.h +++ b/rtengine/helpersse2.h @@ -21,12 +21,12 @@ typedef __m128i vint2; // #ifdef __GNUC__ -#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4 +#if ((__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4) && (!defined(WIN32) || defined( __x86_64__ )) #define LVF(x) _mm_load_ps(&x) #define LVFU(x) _mm_loadu_ps(&x) #define STVF(x,y) _mm_store_ps(&x,y) #define STVFU(x,y) _mm_storeu_ps(&x,y) -#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3 +#else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3, also need to map the aligned functions to unaligned functions for WIN32 builds #define LVF(x) _mm_loadu_ps(&x) #define LVFU(x) _mm_loadu_ps(&x) #define STVF(x,y) _mm_storeu_ps(&x,y) diff --git a/rtengine/opthelper.h b/rtengine/opthelper.h index fc49ad12e..555ea587c 100644 --- a/rtengine/opthelper.h +++ b/rtengine/opthelper.h @@ -55,10 +55,10 @@ #define RESTRICT __restrict__ #define LIKELY(x) __builtin_expect (!!(x), 1) #define UNLIKELY(x) __builtin_expect (!!(x), 0) - #if (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4 + #if ((__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4) && (!defined(WIN32) || defined( __x86_64__ )) #define ALIGNED64 __attribute__ ((aligned (64))) #define ALIGNED16 __attribute__ ((aligned (16))) - #else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3 + #else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3, also needed for WIN32 builds #define ALIGNED64 #define ALIGNED16 #endif