git subrepo pull --force deps/lightrec
[pcsx_rearmed.git] / deps / lightning / check / alu_rsh.tst
CommitLineData
4a71579b
PC
1#include "alu.inc"
2
3.code
4 prolog
5
6#define RSH(N, I0, I1, V) ALU(N, , rsh, I0, I1, V)
7#define URSH(N, I0, I1, V) ALU(N, _u, rsh, I0, I1, V)
8
9 RSH(0, 0xfe, 1, 0x7f)
10 RSH(1, 0x1fffc, 2, 0x7fff)
11 RSH(2, 0x40000000, 30, 1)
12 RSH(3, 0x20000000, 29, 1)
13 RSH(4, 0x10000000, 28, 1)
14 RSH(5, 0x810000, 16, 0x81)
15 RSH(6, 0x20000, 17, 1)
16 RSH(7, 0x40000, 18, 1)
17 RSH(8, 0x7f8000, 15, 0xff)
18 RSH(9, 0x1000000, 24, 1)
19 RSH(10, 0x7fffffff, 0, 0x7fffffff)
20 URSH(0, 0xfe, 1, 0x7f)
21 URSH(1, 0x1fffc, 2, 0x7fff)
22 URSH(2, 0x80000000, 31, 1)
23 URSH(3, 0x40000000, 30, 1)
24 URSH(4, 0x20000000, 29, 1)
25 URSH(5, 0x10000000, 28, 1)
26 URSH(6, 0x810000, 16, 0x81)
27 URSH(7, 0x20000, 17, 1)
28 URSH(8, 0x40000, 18, 1)
29 URSH(9,0x7f8000, 15, 0xff)
30 URSH(10,0x1000000, 24, 1)
31 URSH(11,0xffffff00, 8, 0xffffff)
32 URSH(12,0x7fffffff, 0, 0x7fffffff)
33#if __WORDSIZE == 32
34 RSH(11, 0xfffffff8, 3, 0xffffffff)
35 RSH(12, 0x80000000, 31, 0xffffffff)
36 RSH(13, 0xffffff00, 8, 0xffffffff)
37 URSH(13,0xfffffff8, 3, 0x1fffffff)
38#else
39 RSH(11, 0x3fffffff8, 3, 0x7fffffff)
40 RSH(12, 0xffffffc080000000, 31, 0xffffffffffffff81)
41 RSH(13, 0xffffff00, 8, 0xffffff)
42 RSH(14, 0xfe00000000, 33, 0x7f)
43 RSH(15, 0x1ffffc00000000, 34, 0x7ffff)
44 RSH(16, 0xfffffff800000000, 29, 0xffffffffffffffc0)
45 RSH(17, 0x8000000000000000, 63, 0xffffffffffffffff)
46 RSH(18, 0x4000000000000000, 62, 1)
47 RSH(19, 0x2000000000000000, 61, 1)
48 RSH(20, 0x1000000000000000, 60, 1)
49 RSH(21, 0x81000000000000, 48, 0x81)
50 RSH(22, 0x2000000000000, 49, 1)
51 RSH(23, 0x10000000000, 40, 1)
52 RSH(24, 0x7f800000000000, 47, 0xff)
53 RSH(25, 0x100000000000000, 56, 1)
54 RSH(26, 0xffffff0000000000, 40, 0xffffffffffffffff)
55 RSH(27, 0xfffffffe00000000, 33, 0xffffffffffffffff)
56 RSH(28, 0x8000000000000001, 63, 0xffffffffffffffff)
57 RSH(29, 0x1000000000000, 48, 1)
58 RSH(30, 0xffff800000000000, 47, 0xffffffffffffffff)
59 URSH(13,0x3fffffff8, 3, 0x7fffffff)
60 URSH(14,0xffffffc080000000, 31, 0x1ffffff81)
61 URSH(15,0xfe00000000, 33, 0x7f)
62 URSH(16,0x1ffffc00000000, 34, 0x7ffff)
63 URSH(17,0xfffffff800000000, 29, 0x7ffffffc0)
64 URSH(18,0x8000000000000000, 63, 1)
65 URSH(19,0x4000000000000000, 62, 1)
66 URSH(20,0x2000000000000000, 61, 1)
67 URSH(21,0x1000000000000000, 60, 1)
68 URSH(22,0x81000000000000, 48, 0x81)
69 URSH(23,0x2000000000000, 49, 1)
70 URSH(24,0x10000000000, 40, 1)
71 URSH(25,0x7f800000000000, 47, 0xff)
72 URSH(26,0x100000000000000, 56, 1)
73 URSH(27,0xffffff0000000000, 40, 0xffffff)
74 URSH(28,0xfffffffe00000000, 33, 0x7fffffff)
75 URSH(29,0x8000000000000001, 63, 1)
76 URSH(30,0x1000000000000, 48, 1)
77 URSH(31,0xffff800000000000, 47, 0x1ffff)
78#endif
79
80 prepare
81 pushargi ok
82 ellipsis
83 finishi @printf
84 ret
85 epilog