xref: /openbmc/qemu/tests/tcg/xtensa/test_b.S (revision 438c78da)
1#include "macros.inc"
2
3test_suite b
4
5test bnone
6    movi    a2, 0xa5a5ff00
7    movi    a3, 0x5a5a00ff
8    bnone   a2, a3, 1f
9    test_fail
101:
11    movi    a2, 0xa5a5ff01
12    bnone   a2, a3, 1f
13    j       2f
141:
15    test_fail
162:
17test_end
18
19test beq
20    movi    a2, 0
21    movi    a3, 0
22    beq     a2, a3, 1f
23    test_fail
241:
25    movi    a2, 1
26    beq     a2, a3, 1f
27    j       2f
281:
29    test_fail
302:
31test_end
32
33test blt
34    movi    a2, 6
35    movi    a3, 7
36    blt     a2, a3, 1f
37    test_fail
381:
39    movi    a2, 0xffffffff
40    blt     a2, a3, 1f
41    test_fail
421:
43    movi    a2, 7
44    blt     a2, a3, 1f
45    j       2f
461:
47    test_fail
482:
49test_end
50
51test bltu
52    movi    a2, 6
53    movi    a3, 7
54    bltu    a2, a3, 1f
55    test_fail
561:
57    movi    a2, 7
58    bltu    a2, a3, 1f
59    j       2f
601:
61    test_fail
622:
63    movi    a2, 0xffffffff
64    bltu    a2, a3, 1f
65    j       2f
661:
67    test_fail
682:
69test_end
70
71test ball
72    movi    a2, 0xa5a5ffa5
73    movi    a3, 0xa5a5ff00
74    ball    a2, a3, 1f
75    test_fail
761:
77    movi    a2, 0xa5a5a5a5
78    ball    a2, a3, 1f
79    j       2f
801:
81    test_fail
822:
83test_end
84
85test bbc
86    movi    a2, 0xfffffffd
87    movi    a3, 0xffffff01
88    bbc     a2, a3, 1f
89    test_fail
901:
91    movi    a2, 8
92    movi    a3, 0xffffff03
93    bbc     a2, a3, 1f
94    j       2f
951:
96    test_fail
972:
98test_end
99
100test bbci
101    movi    a2, 0xfffdffff
102    bbci    a2, 17, 1f
103    test_fail
1041:
105    movi    a2, 0x00020000
106    bbci    a2, 17, 1f
107    j       2f
1081:
109    test_fail
1102:
111test_end
112
113test bany
114    movi    a2, 0xa5a5ff01
115    movi    a3, 0x5a5a00ff
116    bany    a2, a3, 1f
117    test_fail
1181:
119    movi    a2, 0xa5a5ff00
120    bany    a2, a3, 1f
121    j       2f
1221:
123    test_fail
1242:
125test_end
126
127test bne
128    movi    a2, 1
129    movi    a3, 0
130    bne     a2, a3, 1f
131    test_fail
1321:
133    movi    a2, 0
134    bne     a2, a3, 1f
135    j       2f
1361:
137    test_fail
1382:
139test_end
140
141test bge
142    movi    a2, 7
143    movi    a3, 7
144    bge     a2, a3, 1f
145    test_fail
1461:
147    movi    a2, 6
148    bge     a2, a3, 1f
149    j       2f
1501:
151    test_fail
1522:
153    movi    a2, 0xffffffff
154    bge     a2, a3, 1f
155    j       2f
1561:
157    test_fail
1582:
159test_end
160
161test bgeu
162    movi    a2, 7
163    movi    a3, 7
164    bgeu    a2, a3, 1f
165    test_fail
1661:
167    movi    a2, 0xffffffff
168    bgeu    a2, a3, 1f
169    test_fail
1701:
171    movi    a2, 6
172    bgeu    a2, a3, 1f
173    j       2f
1741:
175    test_fail
1762:
177test_end
178
179test bnall
180    movi    a2, 0xa5a5a5a5
181    movi    a3, 0xa5a5ff00
182    bnall   a2, a3, 1f
183    test_fail
1841:
185    movi    a2, 0xa5a5ffa5
186    bnall   a2, a3, 1f
187    j       2f
1881:
189    test_fail
1902:
191test_end
192
193test bbs
194    movi    a2, 8
195    movi    a3, 0xffffff03
196    bbs     a2, a3, 1f
197    test_fail
1981:
199    movi    a2, 0xfffffffd
200    movi    a3, 0xffffff01
201    bbs     a2, a3, 1f
202    j       2f
2031:
204    test_fail
2052:
206test_end
207
208test bbsi
209    movi    a2, 0x00020000
210    bbsi    a2, 17, 1f
211    test_fail
2121:
213    movi    a2, 0xfffdffff
214    bbsi    a2, 17, 1f
215    j       2f
2161:
217    test_fail
2182:
219test_end
220
221test_suite_end
222