xref: /openbmc/qemu/tests/tcg/cris/bare/check_xarith.s (revision b91a0fa7)
1
2.include "testutils.inc"
3
4	start
5
6	moveq	-1, $r0
7	moveq	0, $r1
8	addq	1, $r0
9	ax
10	addq	0, $r1
11
12	move.d	$r0, $r3
13	checkr3 0
14	move.d	$r1, $r3
15	checkr3 1
16
17	move.d  0, $r0
18	moveq	-1, $r1
19	subq	1, $r0
20	ax
21	subq	0, $r1
22
23	move.d	$r0, $r3
24	checkr3 ffffffff
25	move.d	$r1, $r3
26	checkr3 fffffffe
27
28
29	moveq	-1, $r0
30	moveq	-1, $r1
31	cmpq	-1, $r0
32	ax
33	cmpq	-1, $r1
34	beq	1f
35	nop
36	fail
371:
38	cmpq	0, $r0
39	ax
40	cmpq	-1, $r1
41	bne	1f
42	nop
43	fail
441:
45
46	;; test for broken X sequence, run it several times.
47	moveq	8, $r0
481:
49	moveq	0, $r3
50	move.d	$r0, $r1
51	andq	1, $r1
52	lslq	4, $r1
53	moveq	1, $r2
54	or.d	$r1, $r2
55	ba	2f
56	move	$r2, $ccs
572:
58	addq	0, $r3
59	move.d	$r0, $r4
60	move.d	$r1, $r5
61	move.d	$r2, $r6
62	move.d	$r3, $r7
63	lsrq	4, $r1
64	move.d	$r1, $r8
65	xor	$r1, $r3
66	checkr3	0
67	subq	1, $r0
68	bne	1b
69	nop
70
71	pass
72	quit
73