1# Blackfin testcase for link/unlink instructions
2# mach: bfin
3
4	.include "testutils.inc"
5
6	start
7
8	/* Make sure size arg to LINK works */
9	R0 = SP;
10	LINK 0x20;
11	R1 = SP;
12	R1 += 0x8 + 0x20;
13	CC = R1 == R0;
14	IF !CC JUMP 1f;
15
16	/* Make sure UNLINK restores old SP */
17	UNLINK
18	R1 = SP;
19	CC = R1 == R0;
20	IF !CC JUMP 1f;
21
22	pass
231:
24	fail
25