summaryrefslogtreecommitdiff
path: root/sim/testsuite/sim/fr30/sub.cgs
blob: eceaa79c5c6303eb8b0375b4ad7f50b6e69cb3ce (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
# fr30 testcase for sub $Rj,$Ri
# mach(): fr30

	.include "testutils.inc"

	START

	.text
	.global sub
sub:
	; Test sub $Rj,$Ri
	mvi_h_gr   	1,r7
	mvi_h_gr   	2,r8
	set_cc          0x0f		; Set mask opposite of expected
	sub      	r7,r8
	test_cc		0 0 0 0
	test_h_gr  	1,r8

	mvi_h_gr   	1,r7
	mvi_h_gr   	0x80000000,r8
	set_cc          0x0d		; Set mask opposite of expected
	sub		r7,r8
	test_cc		0 0 1 0
	test_h_gr  	0x7fffffff,r8

	set_cc          0x0b		; Set mask opposite of expected
	sub		r8,r8
	test_cc		0 1 0 0
	test_h_gr  	0,r8

	set_cc          0x06		; Set mask opposite of expected
	sub		r7,r8
	test_cc		1 0 0 1
	test_h_gr  	0xffffffff,r8

	pass