diff --git a/test cases/common/152 simd/simd_sse2.c b/test cases/common/152 simd/simd_sse2.c index 5d412fd41..271022ed1 100644 --- a/test cases/common/152 simd/simd_sse2.c +++ b/test cases/common/152 simd/simd_sse2.c @@ -1,7 +1,6 @@ #include #include #include -#include #ifdef _MSC_VER int sse2_available() { @@ -22,7 +21,7 @@ int sse2_available() { #endif void increment_sse2(float arr[4]) { - alignas(16) double darr[4]; + ALIGN_16 double darr[4]; __m128d val1 = _mm_set_pd(arr[0], arr[1]); __m128d val2 = _mm_set_pd(arr[2], arr[3]); __m128d one = _mm_set_pd(1.0, 1.0); diff --git a/test cases/common/152 simd/simd_sse3.c b/test cases/common/152 simd/simd_sse3.c index 4aa47fd32..89c2f8b1f 100644 --- a/test cases/common/152 simd/simd_sse3.c +++ b/test cases/common/152 simd/simd_sse3.c @@ -1,6 +1,5 @@ #include #include -#include #ifdef _MSC_VER #include @@ -23,7 +22,7 @@ int sse3_available() { #endif void increment_sse3(float arr[4]) { - alignas(16) double darr[4]; + ALIGN_16 double darr[4]; __m128d val1 = _mm_set_pd(arr[0], arr[1]); __m128d val2 = _mm_set_pd(arr[2], arr[3]); __m128d one = _mm_set_pd(1.0, 1.0); diff --git a/test cases/common/152 simd/simd_sse41.c b/test cases/common/152 simd/simd_sse41.c index 466b30c5b..859fb4366 100644 --- a/test cases/common/152 simd/simd_sse41.c +++ b/test cases/common/152 simd/simd_sse41.c @@ -1,7 +1,6 @@ #include #include -#include #include #ifdef _MSC_VER @@ -25,7 +24,7 @@ int sse41_available() { #endif void increment_sse41(float arr[4]) { - alignas(16) double darr[4]; + ALIGN_16 double darr[4]; __m128d val1 = _mm_set_pd(arr[0], arr[1]); __m128d val2 = _mm_set_pd(arr[2], arr[3]); __m128d one = _mm_set_pd(1.0, 1.0); diff --git a/test cases/common/152 simd/simd_sse42.c b/test cases/common/152 simd/simd_sse42.c index 26d5ba814..edd6e5b44 100644 --- a/test cases/common/152 simd/simd_sse42.c +++ b/test cases/common/152 simd/simd_sse42.c @@ -1,7 +1,6 @@ #include #include #include -#include #ifdef _MSC_VER #include @@ -28,7 +27,7 @@ int sse42_available() { #endif void increment_sse42(float arr[4]) { - alignas(16) double darr[4]; + ALIGN_16 double darr[4]; __m128d val1 = _mm_set_pd(arr[0], arr[1]); __m128d val2 = _mm_set_pd(arr[2], arr[3]); __m128d one = _mm_set_pd(1.0, 1.0); diff --git a/test cases/common/152 simd/simd_ssse3.c b/test cases/common/152 simd/simd_ssse3.c index d09916522..0156f7720 100644 --- a/test cases/common/152 simd/simd_ssse3.c +++ b/test cases/common/152 simd/simd_ssse3.c @@ -1,6 +1,5 @@ #include #include -#include #include #include @@ -31,7 +30,7 @@ int ssse3_available() { #endif void increment_ssse3(float arr[4]) { - alignas(16) double darr[4]; + ALIGN_16 double darr[4]; __m128d val1 = _mm_set_pd(arr[0], arr[1]); __m128d val2 = _mm_set_pd(arr[2], arr[3]); __m128d one = _mm_set_pd(1.0, 1.0); diff --git a/test cases/common/152 simd/simdchecker.c b/test cases/common/152 simd/simdchecker.c index bc7c10abe..cd6fe4f59 100644 --- a/test cases/common/152 simd/simdchecker.c +++ b/test cases/common/152 simd/simdchecker.c @@ -1,5 +1,4 @@ #include -#include #include #include @@ -26,7 +25,7 @@ int check_simd_implementation(float *four, int main(int argc, char **argv) { static const float four_initial[4] = {2.0, 3.0, 4.0, 5.0}; - alignas(16) float four[4]; + ALIGN_16 float four[4]; const float expected[4] = {3.0, 4.0, 5.0, 6.0}; int r=0; const int blocksize = 4; diff --git a/test cases/common/152 simd/simdfuncs.h b/test cases/common/152 simd/simdfuncs.h index dfb056068..c5e16583d 100644 --- a/test cases/common/152 simd/simdfuncs.h +++ b/test cases/common/152 simd/simdfuncs.h @@ -2,6 +2,14 @@ #include +#ifdef _MSC_VER +#define ALIGN_16 __declspec(align(16)) +#else +#include +#define ALIGN_16 alignas(16) +#endif + + /* Yes, I do know that arr[4] decays into a pointer * as a function argument. Don't do this in real code * but for this test it is ok.