summaryrefslogtreecommitdiffstats
path: root/qemu/tests/tcg/cris/check_addi.s
blob: a00dec02af819d444eb4c7ea4b8d7dface76f87a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# mach:  crisv0 crisv3 crisv8 crisv10 crisv32
# output: 0\n1\n2\n4\nbe02460f\n69d035a6\nc16c14d4\n

 .include "testutils.inc"
 start
 moveq 0,r3
 moveq 0,r4
 clearf zcvn
 addi r4.b,r3
 test_cc 0 0 0 0
 checkr3 0

 moveq 0,r3
 moveq 1,r4
 setf zcvn
 addi r4.b,r3
 test_cc 1 1 1 1
 checkr3 1

 moveq 0,r3
 moveq 1,r4
 setf cv
 clearf zn
 addi r4.w,r3
 test_cc 0 0 1 1
 checkr3 2

 moveq 0,r3
 moveq 1,r4
 clearf cv
 setf zn
 addi r4.d,r3
 test_cc 1 1 0 0
 checkr3 4

 move.d 0x12345678,r3
 move.d 0xabcdef97,r4
 clearf cn
 setf zv
 addi r4.b,r3
 test_cc 0 1 1 0
 checkr3 be02460f

 move.d 0x12345678,r3
 move.d 0xabcdef97,r4
 setf cn
 clearf zv
 addi r4.w,r3
 test_cc 1 0 0 1
 checkr3 69d035a6

 move.d 0x12345678,r3
 move.d 0xabcdef97,r4
 addi r4.d,r3
 checkr3 c16c14d4

 quit