summaryrefslogtreecommitdiffstats
path: root/qemu/tests/tcg/cris/check_scc.s
blob: 4a8674cc1a20d92c74fc0d96d718032ba484e054 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# mach: crisv0 crisv3 crisv8 crisv10 crisv32
# output: 1\n0\n1\n0\n1\n0\n1\n0\n0\n1\n1\n0\n1\n0\n1\n0\n1\n0\n0\n1\n0\n1\n1\n0\n1\n0\n0\n1\n1\n0\n1\n1\n0\n

 .include "testutils.inc"

 .macro lcheckr3 v
	move	 $ccs, $r9
	checkr3 \v
	move	$r9, $ccs
 .endm

 start
 clearf nzvc
 scc r3
 lcheckr3 1
 scs r3
 lcheckr3 0
 sne r3
 lcheckr3 1
 seq r3
 lcheckr3 0
 svc r3
 lcheckr3 1
 svs r3
 lcheckr3 0
 spl r3
 lcheckr3 1
 smi r3
 lcheckr3 0
 sls r3
 lcheckr3 0
 shi r3
 lcheckr3 1
 sge r3
 lcheckr3 1
 slt r3
 lcheckr3 0
 sgt r3
 lcheckr3 1
 sle r3
 lcheckr3 0
 sa r3
 lcheckr3 1
 setf nzvc
 scc r3
 lcheckr3 0
 scs r3
 lcheckr3 1
 sne r3
 lcheckr3 0
 svc r3
 lcheckr3 0
 svs r3
 lcheckr3 1
 spl r3
 lcheckr3 0
 smi r3
 lcheckr3 1
 sls r3
 lcheckr3 1
 shi r3
 lcheckr3 0
 sge r3
 lcheckr3 1
 slt r3
 lcheckr3 0
 sgt r3
 lcheckr3 0
 sle r3
 lcheckr3 1
 sa r3
 lcheckr3 1
 clearf n
 sge r3
 lcheckr3 0
 slt r3
 lcheckr3 1

 .if 1 ;..asm.arch.cris.v32
 setf p
 ssb r3
 .else
 moveq 1,r3
 .endif
 lcheckr3 1

 .if 1 ;..asm.arch.cris.v32
 clearf p
 ssb r3
 .else
 moveq 0,r3
 .endif
 lcheckr3 0

 quit