xref: /openbmc/qemu/tests/tcg/cris/bare/check_neg.s (revision ca693d1c)
1# mach:  crisv0 crisv3 crisv8 crisv10 crisv32
2# output: ffffffff\nffffffff\n0\n80000000\n1\nba987655\nffff\nffff\n0\n89ab8000\nffff0001\n45677655\nff\nff\n0\n89abae80\nffffff01\n45678955\n
3
4 .include "testutils.inc"
5 start
6 moveq 0,r3
7 moveq 1,r4
8 neg.d r4,r3
9 test_move_cc 1 0 0 0
10 checkr3 ffffffff
11
12 moveq 1,r3
13 moveq 0,r4
14 neg.d r3,r3
15 test_move_cc 1 0 0 0
16 checkr3 ffffffff
17
18;; FIXME: this was wrong.
19 moveq 0,r3
20 neg.d r3,r3
21 test_move_cc 0 1 0 0
22 checkr3 0
23
24 move.d 0x80000000,r3
25 neg.d r3,r3
26 test_move_cc 1 0 0 0
27 checkr3 80000000
28
29 moveq -1,r3
30 neg.d r3,r3
31 test_move_cc 0 0 0 0
32 checkr3 1
33
34 move.d 0x456789ab,r3
35 neg.d r3,r3
36 test_move_cc 1 0 0 0
37 checkr3 ba987655
38
39 moveq 0,r3
40 moveq 1,r4
41 neg.w r4,r3
42 test_move_cc 1 0 0 0
43 checkr3 ffff
44
45 moveq 1,r3
46 moveq 0,r4
47 neg.w r3,r3
48 test_move_cc 1 0 0 0
49 checkr3 ffff
50
51 moveq 0,r3
52 neg.w r3,r3
53 test_move_cc 0 1 0 0
54 checkr3 0
55
56 move.d 0x89ab8000,r3
57 neg.w r3,r3
58 test_move_cc 1 0 0 0
59 checkr3 89ab8000
60
61 moveq -1,r3
62 neg.w r3,r3
63 test_move_cc 0 0 0 0
64 checkr3 ffff0001
65
66 move.d 0x456789ab,r3
67 neg.w r3,r3
68 test_move_cc 0 0 0 0
69 checkr3 45677655
70
71 moveq 0,r3
72 moveq 1,r4
73 neg.b r4,r3
74 test_move_cc 1 0 0 0
75 checkr3 ff
76
77 moveq 1,r3
78 moveq 0,r4
79 neg.b r3,r3
80 test_move_cc 1 0 0 0
81 checkr3 ff
82
83 moveq 0,r3
84 neg.b r3,r3
85 test_move_cc 0 1 0 0
86 checkr3 0
87
88;; FIXME: was wrong.
89 move.d 0x89abae80,r3
90 neg.b r3,r3
91 test_move_cc 1 0 0 1
92 checkr3 89abae80
93
94 moveq -1,r3
95 neg.b r3,r3
96 test_move_cc 0 0 0 0
97 checkr3 ffffff01
98
99 move.d 0x456789ab,r3
100 neg.b r3,r3
101 test_move_cc 0 0 0 0
102 checkr3 45678955
103
104 quit
105