From 63dba4600ef0de8fbd8feb6db435c7987ae6d130 Mon Sep 17 00:00:00 2001 From: Yang Hau Date: Mon, 4 Mar 2024 18:53:58 +0900 Subject: [PATCH] wip --- Makefile | 5 +++-- tests/impl.cpp | 26 ++++++++++++++++---------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index c253daee..65ace9f2 100644 --- a/Makefile +++ b/Makefile @@ -68,8 +68,9 @@ deps := $(OBJS:%.o=%.o.d) .SUFFIXES: .o .cpp .cpp.o: - $(CXX) -S $(CXXFLAGS) -g $< -o $@.s -MMD -MF $@.d -v - cat tests/*.s + $(CXX) -o $@ $(CXXFLAGS) -c -MMD -MF $@.d $< + # $(CXX) -S $(CXXFLAGS) -g $< -o $@.s -MMD -MF $@.d -v + # cat tests/*.s EXEC = tests/main diff --git a/tests/impl.cpp b/tests/impl.cpp index 1f3b6bb3..6a9e6f1d 100644 --- a/tests/impl.cpp +++ b/tests/impl.cpp @@ -5859,23 +5859,29 @@ result_t test_mm_setzero_si128(const SSE2NEONTestImpl &impl, uint32_t iter) result_t test_mm_shuffle_epi32(const SSE2NEONTestImpl &impl, uint32_t iter) { +#if (__GNUC__ == 8 && __GNUC_MINOR__ == 3) || \ + (__GNUC__ == 9 && __GNUC_MINOR__ == 2) + // gcc-8.3 would cause operand mismatch error here + return TEST_UNIMPL; +#else const int32_t *_a = impl.mTestIntPointer1; __m128i a, c; + int32_t _d[4]; -#define TEST_IMPL(IDX) \ - int32_t d##IDX[4]; \ - d##IDX[0] = _a[((IDX) & 0x3)]; \ - d##IDX[1] = _a[((IDX >> 2) & 0x3)]; \ - d##IDX[2] = _a[((IDX >> 4) & 0x3)]; \ - d##IDX[3] = _a[((IDX >> 6) & 0x3)]; \ - \ - a = load_m128i(_a); \ - c = _mm_shuffle_epi32(a, IDX); \ - CHECK_RESULT(VALIDATE_INT32_M128(c, d##IDX)) +#define TEST_IMPL(IDX) \ + _d[0] = _a[((IDX) & 0x3)]; \ + _d[1] = _a[((IDX >> 2) & 0x3)]; \ + _d[2] = _a[((IDX >> 4) & 0x3)]; \ + _d[3] = _a[((IDX >> 6) & 0x3)]; \ + \ + a = load_m128i(_a); \ + c = _mm_shuffle_epi32(a, IDX); \ + CHECK_RESULT(VALIDATE_INT32_M128(c, _d)) IMM_256_ITER #undef TEST_IMPL return TEST_SUCCESS; +#endif } result_t test_mm_shuffle_pd(const SSE2NEONTestImpl &impl, uint32_t iter)