aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/frv/mqsrahi.cgs
blob: 1d30179c4983e5ad9a5ab96a574c5a6608ba4591 (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
# frv testcase for mqsrahi $FRi,#u6,$FRj
# mach: fr450

	.include "testutils.inc"

	start

	.global mqsrahi
mqsrahi:
	set_fr_iimmed	0x0001,0x0002,fr4
	set_fr_iimmed	0x0003,0x0004,fr5
	mqsrahi		fr4,#1,fr6
	test_fr_limmed	0x0000,0x0001,fr6
	test_fr_limmed	0x0001,0x0002,fr7

	set_fr_iimmed	0xffff,0xfffe,fr4
	set_fr_iimmed	0xfffc,0xfff8,fr5
	mqsrahi		fr4,#1,fr6
	test_fr_limmed	0xffff,0xffff,fr6
	test_fr_limmed	0xfffe,0xfffc,fr7

	set_fr_iimmed	0x8000,0xc000,fr4
	set_fr_iimmed	0xe000,0xf000,fr5
	mqsrahi		fr4,#12,fr6
	test_fr_limmed	0xfff8,0xfffc,fr6
	test_fr_limmed	0xfffe,0xffff,fr7

	set_fr_iimmed	0x1234,0x5678,fr4
	set_fr_iimmed	0x9abc,0xdef0,fr5
	mqsrahi		fr4,#12,fr6
	test_fr_limmed	0x0001,0x0005,fr6
	test_fr_limmed	0xfff9,0xfffd,fr7

	set_fr_iimmed	0x1234,0x5678,fr4
	set_fr_iimmed	0x9abc,0xdef0,fr5
	mqsrahi		fr4,#16,fr6
	test_fr_limmed	0x1234,0x5678,fr6
	test_fr_limmed	0x9abc,0xdef0,fr7

	pass