Add testing of last SSE2 convert instructions.
This commit is contained in:
Родитель
79d83cfe40
Коммит
8ea6d43ad8
|
@ -128,9 +128,9 @@ int main()
|
|||
Ret_M128i(int, _mm_cvtsi128_si32);
|
||||
Ret_M128i(int64_t, _mm_cvtsi128_si64);
|
||||
// Ret_M128i(int64_t, _mm_cvtsi128_si64x);
|
||||
// M128d_M128d_int(_mm_cvtsi32_sd);
|
||||
Ret_M128d_int(__m128d, _mm_cvtsi32_sd);
|
||||
Ret_int(__m128i, _mm_cvtsi32_si128);
|
||||
// M128d_M128d_int64(_mm_cvtsi64_sd);
|
||||
Ret_M128d_int64(__m128d, _mm_cvtsi64_sd);
|
||||
Ret_int64(__m128i, _mm_cvtsi64_si128);
|
||||
// Ret_int64(__m128d, _mm_cvtsi64x_sd);
|
||||
// Ret_int64(__m128i, _mm_cvtsi64x_si128);
|
||||
|
|
|
@ -225,6 +225,35 @@ __m128 ExtractInRandomOrder(float *arr, int i, int n, int prime)
|
|||
printf("%s(%s, %s) = %s\n", #func, str, str2, str3); \
|
||||
}
|
||||
|
||||
#define Ret_M128d_int(Ret_type, func) \
|
||||
for(int i = 0; i < numInterestingDoubles / 2; ++i) \
|
||||
for(int k = 0; k < 2; ++k) \
|
||||
for(int j = 0; j < numInterestingInts; ++j) \
|
||||
{ \
|
||||
__m128d m1 = E1(interesting_doubles, i*2+k, numInterestingDoubles); \
|
||||
int m2 = interesting_ints[j]; \
|
||||
Ret_type ret = func(m1, m2); \
|
||||
char str[256]; tostr(&m1, str); \
|
||||
char str2[256]; tostr(&m2, str2); \
|
||||
char str3[256]; tostr(&ret, str3); \
|
||||
printf("%s(%s, %s) = %s\n", #func, str, str2, str3); \
|
||||
}
|
||||
|
||||
#define Ret_M128d_int64(Ret_type, func) \
|
||||
for(int i = 0; i < numInterestingDoubles / 2; ++i) \
|
||||
for(int k = 0; k < 2; ++k) \
|
||||
for(int j = 0; j < numInterestingInts; ++j) \
|
||||
for(int l = 0; l < numInterestingInts; ++l) \
|
||||
{ \
|
||||
__m128d m1 = E1(interesting_doubles, i*2+k, numInterestingDoubles); \
|
||||
int64_t m2 = (int64_t)(((uint64_t)interesting_ints[j]) << 32 | (uint64_t)interesting_ints[l]); \
|
||||
Ret_type ret = func(m1, m2); \
|
||||
char str[256]; tostr(&m1, str); \
|
||||
char str2[256]; tostr(&m2, str2); \
|
||||
char str3[256]; tostr(&ret, str3); \
|
||||
printf("%s(%s, %s) = %s\n", #func, str, str2, str3); \
|
||||
}
|
||||
|
||||
#define Ret_M128d(Ret_type, func) \
|
||||
for(int i = 0; i < numInterestingDoubles / 2; ++i) \
|
||||
for(int k = 0; k < 2; ++k) \
|
||||
|
|
Загрузка…
Ссылка в новой задаче