ld: Move the .note.build-id section to near the start of the memory map.
[binutils-gdb.git] / sim / testsuite / bfin / c_linkage.s
blobd7d673ed27b1d8b7f201227db4670fba923ba24e
1 //Original:testcases/core/c_linkage/c_linkage.dsp
2 // Spec Reference: linkage (link & unlnk)
3 # mach: bfin
5 .include "testutils.inc"
6 start
8 INIT_R_REGS(0);
10 loadsym sp, DATA_ADDR_1, 0x24;
11 p0 = sp;
13 FP = 0x0064 (X);
14 R0 = 5;
15 RETS = R0;
17 LINK 4; // push rets, push fp, fp=sp, sp=sp-framesize (4)
19 R1 = 3;
20 RETS = R1; // initialize rets by a different value
22 loadsym p1, SUBR
23 CALL ( P1 );
25 SP = 0x3333 (X);
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;
40 CC = SP == P0;
41 if CC JUMP 1f;
42 fail;
44 pass
46 SUBR: // should jump here
47 R6.L = 0x1111;
48 RTS;
49 R7.L = 0x2222; // should not go here
50 RTS;
52 .data
53 DATA_ADDR_1:
54 DATA:
55 .space (0x0100);
57 // Stack Segments
59 .space (0x100);
60 KSTACK: