summaryrefslogtreecommitdiff
path: root/sim/testsuite/sim/fr30/dmovb.cgs
blob: 96cfb9d3e089a3793878573aa431589a87a54f9d (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
# fr30 testcase for dmovb
# mach(): fr30

	.include "testutils.inc"
	START

	.text
	.global dmovb
dmovb:
	; Test dmovb @$dir8,$R13
	mvi_h_gr	0xdeadbeef,r1
	mvi_h_gr	0x80,r2
	mvr_h_mem	r1,r2
	set_cc          0x0f		; Condition codes shouldn't change
	dmovb		@0x80,r13
	test_cc		1 1 1 1
	test_h_gr	0xffffffde,r13

	; Test dmovb $R13,@$dir8
	mvi_h_gr	0xbeefdead,r13
	set_cc          0x0e		; Condition codes shouldn't change
	dmovb		r13,@0x80
	test_cc		1 1 1 0
	test_h_mem	0xadadbeef,r2

	; Test dmovb @$dir8,@R13+
	mvi_h_gr	0x7c,r13
	mvi_h_mem	0xdeadbeef,r13
	set_cc          0x0d		; Condition codes shouldn't change
	dmovb		@0x7f,@r13+
	test_cc		1 1 0 1
	mvi_h_gr	0x7c,r2
	test_h_mem	0xefadbeef,r2
	test_h_gr	0x7d,r13

	; Test dmovb @$R13+,@$dir8
	mvi_h_gr	0x7c,r13
	mvi_h_mem	0xbeefdead,r13
	set_cc          0x0c		; Condition codes shouldn't change
	dmovb		@r13+,@0x7f
	test_cc		1 1 0 0
	mvi_h_gr	0x7c,r2
	test_h_mem	0xbeefdebe,r2
	test_h_gr	0x7d,r13

	pass