1# frv testcase for ldsb @($GRi,$GRj),$GRk
2# mach: all
3
4	.include "testutils.inc"
5
6	start
7
8	.global ldsb
9ldsb:
10	set_mem_limmed	0xdead,0xbeef,sp
11	set_gr_limmed	0xbeef,0xdead,gr8
12
13	set_gr_immed	0,gr7
14	ldsb 		@(sp,gr7),gr8
15	test_gr_limmed	0xffff,0xffde,gr8
16
17	set_gr_immed	1,gr7
18	ldsb 		@(sp,gr7),gr8
19	test_gr_limmed	0xffff,0xffad,gr8
20
21	set_mem_limmed	0xffff,0xff00,sp
22	inc_gr_immed	4,sp
23	set_gr_immed	-1,gr7
24	ldsb 		@(sp,gr7),gr8
25	test_gr_immed	0,gr8
26
27	pass
28