4 typedef signed char sc
;
5 typedef unsigned char uc
;
6 typedef signed short ss
;
7 typedef unsigned short us
;
9 typedef unsigned int ui
;
10 typedef signed long long sll
;
11 typedef unsigned long long ull
;
13 #define FOR_EACH_TYPE(M) \
20 #define TEST_VALUE(I) ((I) * 5 / 2)
22 #define ADD_TEST(TYPE) \
23 void __attribute__((noinline, noclone)) \
24 test_##TYPE (TYPE *a, TYPE *b) \
26 for (int i = 0; i < N; i += 2) \
28 a[i + 0] = b[i + 0] + 2; \
29 a[i + 1] = b[i + 1] + 3; \
33 #define DO_TEST(TYPE) \
34 for (int j = 1; j < M; ++j) \
37 for (int i = 0; i < N + M; ++i) \
38 a[i] = TEST_VALUE (i); \
39 test_##TYPE (a + j, a); \
40 for (int i = 0; i < N; i += 2) \
41 if (a[i + j] != (TYPE) (a[i] + 2) \
42 || a[i + j + 1] != (TYPE) (a[i + 1] + 3)) \
46 FOR_EACH_TYPE (ADD_TEST
)
51 FOR_EACH_TYPE (DO_TEST
)