- more -f combo tests
[libfirm] / ir / be / test / shiftconst.c
1 int printf(const char *str, ...);
2
3 #define T        unsigned
4 #define tname(x) u_##x
5 #include "shiftconst.h"
6 #undef tname
7 #undef T
8
9 #define T        int
10 #define tname(x) i_##x
11 #include "shiftconst.h"
12 #undef tname
13 #undef T
14
15 #define T        long long
16 #define tname(x) ll_##x
17 #include "shiftconst.h"
18 #undef tname
19 #undef T
20
21 #define T        signed char
22 #define tname(x) sc_##x
23 #include "shiftconst.h"
24 #undef tname
25 #undef T
26
27 int main(void)
28 {
29 #define TEST(x)    printf(#x "(0xAABBCCDD) = 0x%X\n", x(0xAABBCCDD))
30 #define ALLTESTS(pf)  \
31         TEST(pf##k1); \
32         TEST(pf##k2); \
33         TEST(pf##k3); \
34         TEST(pf##k4); \
35         TEST(pf##k5); \
36         TEST(pf##k6); \
37         TEST(pf##k7); \
38         TEST(pf##k8);
39
40         ALLTESTS(u_);
41         ALLTESTS(i_);
42         ALLTESTS(ll_);
43         ALLTESTS(sc_);
44         return 0;
45 }