Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
howjmay committed Mar 4, 2024
1 parent cdd0fff commit 63dba46
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] -MMD -MF [email protected] -v
# cat tests/*.s

EXEC = tests/main

Expand Down
26 changes: 16 additions & 10 deletions tests/impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 63dba46

Please sign in to comment.