1 //Original:testcases/core/c_linkage/c_linkage.dsp
2 // Spec Reference: linkage (link & unlnk)
5 .include "testutils.inc"
10 loadsym sp, DATA_ADDR_1, 0x24;
17 LINK 4; // push rets, push fp, fp=sp, sp=sp-framesize (4)
20 RETS = R1; // initialize rets by a different value
27 UNLINK; // sp = fp, fp = pop (old fp), rets = pop(old rets),
29 R2 = RETS; // for checking
31 CHECKREG r0, 0x00000005;
32 CHECKREG r1, 0x00000003;
33 CHECKREG r2, 0x00000005;
34 CHECKREG r3, 0x00000000;
35 CHECKREG r4, 0x00000000;
36 CHECKREG r5, 0x00000000;
37 CHECKREG r6, 0x00001111;
38 CHECKREG r7, 0x00000000;
39 CHECKREG fp, 0x00000064;
46 SUBR: // should jump here
49 R7.L = 0x2222; // should not go here