try a new github issue template
[pcsx_rearmed.git] / deps / lightning / check / alu_neg.tst
1 #include "alu.inc"
2
3 .code
4         prolog
5
6 #define NEG(N, I, V)                    UN(N, neg, I, V)
7
8         NEG(0,  0,                      0)
9 #if __WORDSIZE == 32
10         NEG(1,  1,                      0xffffffff)
11         NEG(2,  0xffffffff,             1)
12         NEG(3,  0x80000000,             0x80000000)
13         NEG(4,  0x7fffffff,             0x80000001)
14         NEG(5,  0x80000001,             0x7fffffff)
15 #else
16         NEG(1,  1,                      0xffffffffffffffff)
17         NEG(2,  0xffffffff,             0xffffffff00000001)
18         NEG(3,  0x80000000,             0xffffffff80000000)
19         NEG(4,  0x7fffffff,             0xffffffff80000001)
20         NEG(5,  0x80000001,             0xffffffff7fffffff)
21         NEG(6,  0xffffffffffffffff,     1)
22         NEG(7,  0x8000000000000000,     0x8000000000000000)
23         NEG(8,  0x7fffffffffffffff,     0x8000000000000001)
24 #endif
25
26 #undef NEG
27 #define NEG(N, T, I, V)                 FUN(N, T, neg, I, V)
28         NEG(0, _f,      0.0,            -0.0)
29         NEG(1, _f,      0.5,            -0.5)
30         NEG(2, _f,      $(1 / 0.0),     $(-1.0 / 0))
31         NEG(3, _f,      -1.25,           1.25)
32         NEG(0, _d,       0.0,           -0.0)
33         NEG(1, _d,       0.5,           -0.5)
34         NEG(2, _d,       $(1.0 / 0),    $(-1 / 0.0))
35         NEG(3, _d,      -1.25,           1.25)
36
37         prepare
38                 pushargi ok
39                 ellipsis
40         finishi @printf
41         ret
42         epilog