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

	.include "compact/testutils.inc"

	start

init:
	mov #170, r0
	shll8 r0
	add #1, r0
	shll8 r0
	add #66, r0
	shll8 r0
	mov r0, r1

	mov #85, r0
	shll8 r0
	add #2, r0
	shll8 r0
	add #42, r0
	shll8 r0
	add #3, r0

copy:
	mov r0, r3
	mov r1, r4

xtrct:
	xtrct r0, r1

check:
	# Lower r3, upper r4.
	shll16 r3
	shlr16 r4
	or r3, r4
	cmp/eq r1, r4
	bf wrong
	
okay:
	pass
wrong:
	fail