summaryrefslogtreecommitdiff
path: root/sim/testsuite/sim/sh64/compact/cmphs.cgs
blob: 957f80c024540d688e76cb4d83da8ead31cfde51 (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
# sh testcase for cmp/hs $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32

	.include "compact/testutils.inc"

	start

zero:
	mov #0, r0
	mov #0, r0
	cmp/hs r0, r1

equal:
	mov #1, r0
	rotr r0
	add #3, r0

	mov #1, r1
	rotr r1
	add #3, r1

	cmp/hs r0, r1

gt:
	mov #10, r0
	mov #12, r1
	cmp/hs r0, r1

lt:
	mov #12, r0
	mov #10, r1
	cmp/hs r0, r1

gtneg:
	mov #1, r0
	rotr r0
	add #1, r0

	mov #1, r1
	rotr r1
	add #3, r1

	cmp/hs r0, r1

ltneg:
	mov #1, r0
	rotr r0
	add #3, r0
	
	mov #1, r1
	rotr r1
	add #1, r1

	cmp/hs r0, r1

okay:
	pass