xref: /netbsd-src/external/gpl3/gdb/dist/sim/testsuite/bfin/hwloop-nested.s (revision 4b169a6ba595ae283ca507b26b15fdff40495b1c)
1*4b169a6bSchristos# Blackfin testcase for overlapping nested hwloops (LB)
2*4b169a6bSchristos# mach: bfin
3*4b169a6bSchristos
4*4b169a6bSchristos	.include "testutils.inc"
5*4b169a6bSchristos
6*4b169a6bSchristos	start
7*4b169a6bSchristos
8*4b169a6bSchristos	R0 = 0;
9*4b169a6bSchristos	R1 = 0;
10*4b169a6bSchristos	P0 = 2;
11*4b169a6bSchristos	P1 = 2;
12*4b169a6bSchristos	LSETUP (1f, 3f) LC0 = P0;
13*4b169a6bSchristos1:	R0 += 1;
14*4b169a6bSchristos
15*4b169a6bSchristos	LSETUP (2f, 3f) LC1 = P1;
16*4b169a6bSchristos2:	R1 += 1;
17*4b169a6bSchristos
18*4b169a6bSchristos	CC = R1 == 2;
19*4b169a6bSchristos	IF !CC JUMP 3f;
20*4b169a6bSchristos	CC = R0 == 1;
21*4b169a6bSchristos	IF !CC JUMP fail;
22*4b169a6bSchristos	R3 = LC0;
23*4b169a6bSchristos	CC = R3 == 2;
24*4b169a6bSchristos	IF !CC JUMP fail;
25*4b169a6bSchristos	R3 = LC1;
26*4b169a6bSchristos	CC = R3 == 1;
27*4b169a6bSchristos	IF !CC JUMP fail;
28*4b169a6bSchristos	pass
29*4b169a6bSchristos
30*4b169a6bSchristos3:	nop;
31*4b169a6bSchristos
32*4b169a6bSchristosfail:
33*4b169a6bSchristos	fail
34