aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/frv/lduhi.cgs
blob: b9896d62f58786560938c088f16a5e9a8cda98c2 (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
# frv testcase for lduhi @($GRi,$GRj),$GRk
# mach: all

	.include "testutils.inc"

	start

	.global lduhi
lduhi:
	set_mem_limmed	0xdead,0xbeef,sp
	set_gr_limmed	0xbeef,0xdead,gr8

	lduhi 		@(sp,0),gr8
	test_gr_limmed	0x0000,0xdead,gr8

	lduhi 		@(sp,2),gr8
	test_gr_limmed	0x0000,0xbeef,gr8

	set_mem_limmed	0xffff,0x0000,sp
	inc_gr_immed	4,sp
	lduhi 		@(sp,-2),gr8
	test_gr_limmed	0x0000,0x0000,gr8

	pass