From 489ef68925a178f6a21d102cbffe642e9c92a24c Mon Sep 17 00:00:00 2001 From: Evan Nemerson Date: Tue, 5 May 2020 19:01:43 -0700 Subject: [PATCH] power: limit 64-bit floating point support to POWER7+ Hopefully fixes #185. --- simde/simde-features.h | 6 +++--- simde/x86/avx.h | 12 +++++++++--- simde/x86/avx512f.h | 12 +++++++++--- simde/x86/sse.h | 4 +++- simde/x86/sse2.h | 8 ++++++-- 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/simde/simde-features.h b/simde/simde-features.h index 68c1c9c1c..3165bb804 100644 --- a/simde/simde-features.h +++ b/simde/simde-features.h @@ -257,11 +257,11 @@ #if !defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P7_NO_NATIVE) && !defined(SIMDE_NO_NATIVE) #if SIMDE_ARCH_POWER_ALTIVEC_CHECK(700) - #define SIMDE_POWER_ALTIVEC_P6_NATIVE + #define SIMDE_POWER_ALTIVEC_P7_NATIVE #endif #endif #if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P6) - #define SIMDE_POWER_ALTIVEC_P8_NATIVE + #define SIMDE_POWER_ALTIVEC_P6_NATIVE #endif #if !defined(SIMDE_POWER_ALTIVEC_P6_NATIVE) && !defined(SIMDE_POWER_ALTIVEC_P6_NO_NATIVE) && !defined(SIMDE_NO_NATIVE) @@ -278,7 +278,7 @@ #define SIMDE_POWER_ALTIVEC_P5_NATIVE #endif #endif -#if defined(SIMDE_POWER_ALTIVEC_P5) +#if defined(SIMDE_POWER_ALTIVEC_P5_NATIVE) #include #endif diff --git a/simde/x86/avx.h b/simde/x86/avx.h index d57f6e302..b2f1787e3 100644 --- a/simde/x86/avx.h +++ b/simde/x86/avx.h @@ -89,7 +89,9 @@ typedef union { SIMDE_ALIGN(16) vector signed int altivec_i32[2]; SIMDE_ALIGN(16) vector signed long long altivec_i64[2]; SIMDE_ALIGN(16) vector float altivec_f32[2]; - SIMDE_ALIGN(16) vector double altivec_f64[2]; + #if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) + SIMDE_ALIGN(16) vector double altivec_f64[2]; + #endif #endif } simde__m256_private; @@ -145,7 +147,9 @@ typedef union { SIMDE_ALIGN(16) vector signed int altivec_i32[2]; SIMDE_ALIGN(16) vector signed long long altivec_i64[2]; SIMDE_ALIGN(16) vector float altivec_f32[2]; - SIMDE_ALIGN(16) vector double altivec_f64[2]; + #if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) + SIMDE_ALIGN(16) vector double altivec_f64[2]; + #endif #endif } simde__m256d_private; @@ -201,7 +205,9 @@ typedef union { SIMDE_ALIGN(16) vector signed int altivec_i32[2]; SIMDE_ALIGN(16) vector signed long long altivec_i64[2]; SIMDE_ALIGN(16) vector float altivec_f32[2]; - SIMDE_ALIGN(16) vector double altivec_f64[2]; + #if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) + SIMDE_ALIGN(16) vector double altivec_f64[2]; + #endif #endif } simde__m256i_private; diff --git a/simde/x86/avx512f.h b/simde/x86/avx512f.h index c0e402152..8bb6f111b 100644 --- a/simde/x86/avx512f.h +++ b/simde/x86/avx512f.h @@ -117,7 +117,9 @@ typedef union { SIMDE_ALIGN(16) vector signed int altivec_i32[4]; SIMDE_ALIGN(16) vector signed long long altivec_i64[4]; SIMDE_ALIGN(16) vector float altivec_f32[4]; - SIMDE_ALIGN(16) vector double altivec_f64[4]; + #if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) + SIMDE_ALIGN(16) vector double altivec_f64[4]; + #endif #endif } simde__m512_private; @@ -175,7 +177,9 @@ typedef union { SIMDE_ALIGN(16) vector signed int altivec_i32[4]; SIMDE_ALIGN(16) vector signed long long altivec_i64[4]; SIMDE_ALIGN(16) vector float altivec_f32[4]; - SIMDE_ALIGN(16) vector double altivec_f64[4]; + #if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) + SIMDE_ALIGN(16) vector double altivec_f64[4]; + #endif #endif } simde__m512d_private; @@ -233,7 +237,9 @@ typedef union { SIMDE_ALIGN(16) vector signed int altivec_i32[4]; SIMDE_ALIGN(16) vector signed long long altivec_i64[4]; SIMDE_ALIGN(16) vector float altivec_f32[4]; - SIMDE_ALIGN(16) vector double altivec_f64[4]; + #if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) + SIMDE_ALIGN(16) vector double altivec_f64[4]; + #endif #endif } simde__m512i_private; diff --git a/simde/x86/sse.h b/simde/x86/sse.h index 07a501094..439af258a 100644 --- a/simde/x86/sse.h +++ b/simde/x86/sse.h @@ -109,7 +109,9 @@ typedef union { SIMDE_ALIGN(16) vector signed int altivec_i32; SIMDE_ALIGN(16) vector signed long long altivec_i64; SIMDE_ALIGN(16) vector float altivec_f32; - SIMDE_ALIGN(16) vector double altivec_f64; + #if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) + SIMDE_ALIGN(16) vector double altivec_f64; + #endif #endif } simde__m128_private; diff --git a/simde/x86/sse2.h b/simde/x86/sse2.h index db4ffdc3a..6fed5ff96 100644 --- a/simde/x86/sse2.h +++ b/simde/x86/sse2.h @@ -121,7 +121,9 @@ typedef union { #endif SIMDE_ALIGN(16) vector unsigned long long altivec_u64; SIMDE_ALIGN(16) vector float altivec_f32; - SIMDE_ALIGN(16) vector double altivec_f64; + #if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) + SIMDE_ALIGN(16) vector double altivec_f64; + #endif #endif } simde__m128i_private; @@ -194,7 +196,9 @@ typedef union { #endif SIMDE_ALIGN(16) vector unsigned long long altivec_u64; SIMDE_ALIGN(16) vector float altivec_f32; - SIMDE_ALIGN(16) vector double altivec_f64; + #if defined(SIMDE_POWER_ALTIVEC_P7_NATIVE) + SIMDE_ALIGN(16) vector double altivec_f64; + #endif #endif } simde__m128d_private;