xref: /qemu/tests/tcg/cris/bare/check_addcv17.s (revision d4f6e58f)
1# mach:  crisv17
2
3 .include "testutils.inc"
4
5 .macro addc Rs Rd inc=0
6# Create the instruction manually since there is no assembler support yet
7 .word (\Rd << 12) | \Rs | (\inc << 10) | 0x09a0
8 .endm
9
10 start
11
12 .data
13mem1:
14 .dword 0x0
15mem2:
16 .dword 0x12345678
17
18 .text
19 move.d mem1,r4
20 clearf nzvc
21 addc 4 3
22 test_cc 0 1 0 0
23 checkr3 0
24
25 move.d mem1,r4
26 clearf nzvc
27 ax
28 addc 4 3
29 test_cc 0 0 0 0
30 checkr3 0
31
32 move.d mem1,r4
33 clearf nzvc
34 setf c
35 addc 4 3
36 test_cc 0 0 0 0
37 checkr3 1
38
39 move.d mem2,r4
40 moveq 2, r3
41 clearf nzvc
42 setf c
43 addc 4 3
44 test_cc 0 0 0 0
45 checkr3 1234567b
46
47 move.d mem2,r5
48 clearf nzvc
49 cmp.d r4,r5
50 test_cc 0 1 0 0
51
52 move.d mem2,r4
53 moveq 2, r3
54 clearf nzvc
55 addc 4 3 inc=1
56 test_cc 0 0 0 0
57 checkr3 1234567a
58
59 move.d mem2,r5
60 clearf nzvc
61 addq 4,r5
62 cmp.d r4,r5
63 test_cc 0 1 0 0
64
65 quit
66