add a thp-based huge page alloc fallback
[pcsx_rearmed.git] / deps / lightning / check / alu_mul.tst
CommitLineData
4a71579b
PC
1#include "alu.inc"
2
3.code
4 prolog
5
6#define MUL(N, I0, I1, V) ALU(N, , mul, I0, I1, V)
7
8 MUL(0, 0x7fffffff, 1, 0x7fffffff)
9 MUL(1, 1, 0x7fffffff, 0x7fffffff)
10 MUL(2, 0x80000000, 1, 0x80000000)
11 MUL(3, 1, 0x80000000, 0x80000000)
12 MUL(4, 0x7fffffff, 2, 0xfffffffe)
13 MUL(5, 2, 0x7fffffff, 0xfffffffe)
14 MUL(6, 0x7fffffff, 0, 0)
15 MUL(7, 0, 0x7fffffff, 0)
16#if __WORDSIZE == 32
17 MUL(8, 0x80000000, 2, 0)
18 MUL(9, 2, 0x80000000, 0)
19 MUL(10, 0x7fffffff, 0x80000000, 0x80000000)
20 MUL(11, 0x80000000, 0x7fffffff, 0x80000000)
21 MUL(12, 0x7fffffff, 0xffffffff, 0x80000001)
22 MUL(13, 0xffffffff, 0x7fffffff, 0x80000001)
23 MUL(14, 0xffffffff, 0xffffffff, 1)
24#else
25 MUL(8, 0x80000000, 2, 0x100000000)
26 MUL(9, 2, 0x80000000, 0x100000000)
27 MUL(10, 0x7fffffff, 0x80000000, 0x3fffffff80000000)
28 MUL(11, 0x80000000, 0x7fffffff, 0x3fffffff80000000)
29 MUL(12, 0x7fffffff, 0xffffffff, 0x7ffffffe80000001)
30 MUL(13, 0xffffffff, 0x7fffffff, 0x7ffffffe80000001)
31 MUL(14, 0xffffffff, 0xffffffff, 0xfffffffe00000001)
32 MUL(15, 0x7fffffffffffffff, 1, 0x7fffffffffffffff)
33 MUL(16, 1, 0x7fffffffffffffff, 0x7fffffffffffffff)
34 MUL(17, 0x8000000000000000, 1, 0x8000000000000000)
35 MUL(18, 1, 0x8000000000000000, 0x8000000000000000)
36 MUL(19, 0x7fffffffffffffff, 2, 0xfffffffffffffffe)
37 MUL(20, 2, 0x7fffffffffffffff, 0xfffffffffffffffe)
38 MUL(21, 0x8000000000000000, 2, 0)
39 MUL(22, 2, 0x8000000000000000, 0)
40 MUL(23, 0x7fffffffffffffff, 0x8000000000000000, 0x8000000000000000)
41 MUL(24, 0x8000000000000000, 0x7fffffffffffffff, 0x8000000000000000)
42 MUL(25, 0x7fffffffffffffff, 0xffffffffffffffff, 0x8000000000000001)
43 MUL(26, 0xffffffffffffffff, 0x7fffffffffffffff, 0x8000000000000001)
44 MUL(27, 0xffffffffffffffff, 0xffffffffffffffff, 1)
45#endif
46
47#undef MUL
48#define MUL(N, T, I0, I1, V) FOP(N, T, mul, I0, I1, V)
49 MUL(0, _f, -0.5, 0.5, -0.25)
50 MUL(1, _f, 0.25, 0.75, 0.1875)
51 MUL(0, _d, -0.5, 0.5, -0.25)
52 MUL(1, _d, 0.25, 0.75, 0.1875)
53
54 prepare
55 pushargi ok
56 ellipsis
57 finishi @printf
58 ret
59 epilog