Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git] / tests / tcg / cris / bare / check_addcv17.s
blob52ef7a97169c2af39d32a5edcaa8f1b2dc3bca01
1 # mach: crisv17
3 .include "testutils.inc"
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
10 start
12 .data
13 mem1:
14 .dword 0x0
15 mem2:
16 .dword 0x12345678
18 .text
19 move.d mem1,r4
20 clearf nzvc
21 addc 4 3
22 test_cc 0 1 0 0
23 checkr3 0
25 move.d mem1,r4
26 clearf nzvc
28 addc 4 3
29 test_cc 0 0 0 0
30 checkr3 0
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
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
47 move.d mem2,r5
48 clearf nzvc
49 cmp.d r4,r5
50 test_cc 0 1 0 0
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
59 move.d mem2,r5
60 clearf nzvc
61 addq 4,r5
62 cmp.d r4,r5
63 test_cc 0 1 0 0
65 quit