ld: Move the .note.build-id section to near the start of the memory map.
[binutils-gdb.git] / sim / testsuite / bfin / stk3.s
blob131f8c5190c812a46700991573126b9ddddf2bc1
1 // load up some registers.
2 // setup up a global pointer table and load some state.
3 // save the machine state and clear some of the values.
4 // then restore and assert some of the values to ensure that
5 // we maintain consitent machine state.
7 # mach: bfin
9 .include "testutils.inc"
10 start
12 R0 = 1;
13 R1 = 2;
14 R2 = 3;
15 R3 = -7;
16 R4 = 4;
17 R5 = 5;
18 R6 = 6;
19 R7 = 7;
21 loadsym P0, a;
22 P1.L = 0x1000;
23 _DBG P0;
24 _DBG P1;
25 SP = P0;
26 FP = P0;
28 CALL try;
30 P1 = [ P0 ++ ];
31 P2 = [ P0 ++ ];
32 P0 += 4;
33 P4 = [ P0 ++ ];
34 P5 = [ P0 ++ ];
35 [ -- SP ] = ( R7:0, P5:0 );
36 _DBG SP;
37 _DBG FP;
38 R0 = R0 ^ R0;
39 R1 = R1 ^ R1;
40 R2 = R2 ^ R2;
41 R4 = R4 ^ R4;
42 R5 = R5 ^ R5;
43 R6 = R6 ^ R6;
44 R7 = R7 ^ R7;
45 ( R7:0, P5:0 ) = [ SP ++ ];
46 DBGA ( R0.L , 1 );
47 DBGA ( R1.L , 2 );
48 DBGA ( R2.L , 3 );
49 DBGA ( R3.L , 0xfff9);
50 DBGA ( R4.L , 4 );
51 DBGA ( R5.L , 5 );
52 DBGA ( R6.L , 6 );
53 DBGA ( R7.L , 7 );
54 R0 = SP;
55 loadsym R1, a;
56 CC = R0 == R1;
57 IF !CC JUMP abrt;
58 R0 = FP;
59 CC = R0 == R1;
60 CC = R0 == R1;
61 IF !CC JUMP abrt;
62 pass
63 abrt:
64 fail;
66 try:
67 LINK 0;
68 [ -- SP ] = ( R7:0, P5:0 );
69 R7 = 0x1234 (X);
70 [ -- SP ] = R7;
71 CALL bar;
72 SP += 4;
73 ( R7:0, P5:0 ) = [ SP ++ ];
74 UNLINK;
75 RTS;
77 bar:
78 LINK 0;
79 [ -- SP ] = ( R7:0, P5:0 );
80 R0 = [ FP + 8 ];
81 DBGA ( R0.L , 0x1234 );
82 ( R7:0, P5:0 ) = [ SP ++ ];
83 UNLINK;
84 RTS;
86 .data
87 _gptab:
88 .dw 0x200
89 .dw 0x000
90 .dw 0x300
91 .dw 0x400
92 .dw 0x500
93 .dw 0x600
95 .space (0x100)
97 .dw 1
98 .dw 2
99 .dw 3
100 .dw 4
101 .dw 5
102 .dw 6
103 .dw 7
104 .dw 8
105 .dw 9
106 .dw 0xa