Update contrib.
1 ; Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
3 ; This component and the accompanying materials are made available
4 ; under the terms of the License "Eclipse Public License v1.0"
5 ; which accompanies this distribution, and is available
6 ; at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 ; Initial Contributors:
9 ; Nokia Corporation - initial contribution.
16 AREA |d-rmdebug-bkpt$$Code|, CODE, READONLY, ALIGN=6
25 EXPORT RMDebug_StepTest_Non_PC_Modifying
26 EXPORT RMDebug_StepTest_Non_PC_Modifying_OK
28 RMDebug_StepTest_Non_PC_Modifying
30 RMDebug_StepTest_Non_PC_Modifying_OK
31 bx lr ; should return to normal execution of the test thread
36 EXPORT RMDebug_StepTest_Branch
37 EXPORT RMDebug_StepTest_Branch_1
39 RMDebug_StepTest_Branch
40 b RMDebug_StepTest_Branch_1
41 mov r0, #2 ; if the pc ends up here, we know its gone wrong
42 RMDebug_StepTest_Branch_1
48 EXPORT RMDebug_StepTest_Branch_And_Link
49 EXPORT RMDebug_StepTest_Branch_And_Link_1
50 EXPORT RMDebug_StepTest_Branch_And_Link_2
52 RMDebug_StepTest_Branch_And_Link
53 mov r0, lr ; preserve lr for the moment
54 RMDebug_StepTest_Branch_And_Link_1
55 bl RMDebug_StepTest_Branch_And_Link_2
56 mov r1, #1 ; insert a gap in the instruction stream so we know we branched.
57 RMDebug_StepTest_Branch_And_Link_2
58 mov lr, r0 ; restore lr
59 bx lr ; should return to normal execution of the test thread
64 EXPORT RMDebug_StepTest_MOV_PC
65 EXPORT RMDebug_StepTest_MOV_PC_1
66 EXPORT RMDebug_StepTest_MOV_PC_2
68 RMDebug_StepTest_MOV_PC
70 RMDebug_StepTest_MOV_PC_1
71 add pc, pc, r0 ; should be a jump (bear in mind reading pc = current inst + 8bytes for arm)
72 mov r0, #1 ; Simple instructions which allow us to test where the PC really is
73 mov r0, #2 ; just by reading r0.
74 RMDebug_StepTest_MOV_PC_2
77 bx lr ; should return to normal execution of the test thread
82 EXPORT RMDebug_StepTest_LDR_PC
83 EXPORT RMDebug_StepTest_LDR_PC_1
85 RMDebug_StepTest_LDR_PC
86 ldr pc, =RMDebug_StepTest_LDR_PC_1
87 mov r0, #1 ; separate the branch target so we can prove it works
88 RMDebug_StepTest_LDR_PC_1
89 bx lr ; should return to normal execution of the test thread
92 ; ARM -> Thumb -> ARM interworking test
94 ; Note: We always start and finish this test
96 EXPORT RMDebug_StepTest_Interwork
97 EXPORT RMDebug_StepTest_Interwork_1
98 EXPORT RMDebug_StepTest_Interwork_2
99 EXPORT RMDebug_StepTest_Interwork_3
100 RMDebug_StepTest_Interwork
101 mov r0, lr ; preserve lr
102 RMDebug_StepTest_Interwork_1
103 blx RMDebug_StepTest_Interwork_2
106 RMDebug_StepTest_Interwork_2
107 blx RMDebug_StepTest_Interwork_3
111 RMDebug_StepTest_Interwork_3
115 ; Stepping performance tests
117 ; This counts down from 100000 to 0
118 ; This means that for all practical purposes
119 ; we can single-step as much as we like
120 ; in less than one second and have some likelyhood
121 ; that we will not step too far from our loop
123 EXPORT RMDebug_StepTest_Count
124 EXPORT RMDebug_StepTest_Count_1
125 EXPORT RMDebug_StepTest_Count_2
127 RMDebug_StepTest_Count
129 RMDebug_StepTest_Count_1
131 RMDebug_StepTest_Count_2
132 bne RMDebug_StepTest_Count_1
137 ; Thumb non-pc modifying
140 RMDebug_StepTest_Thumb_Non_PC_Modifying
141 mov r0, lr ; preserve lr
142 blx RMDebug_StepTest_Thumb_Non_PC_Modifying_1
148 RMDebug_StepTest_Thumb_Branch
149 mov r0, lr ; preserve lr
150 blx RMDebug_StepTest_Thumb_Branch_1
154 ; Thumb Branch and link
156 RMDebug_StepTest_Thumb_Branch_And_Link
157 mov r0, lr ; preserve lr
158 blx RMDebug_StepTest_Thumb_Branch_And_Link_1
162 ; Thumb Back Branch and link
164 RMDebug_StepTest_Thumb_Back_Branch_And_Link
165 mov r0, lr ; preserve lr
166 blx RMDebug_StepTest_Thumb_Back_Branch_And_Link_1
170 ; Thumb ADD PC,PC, #0
172 RMDebug_StepTest_Thumb_AddPC
173 mov r0, lr ; preserve lr
174 blx RMDebug_StepTest_Thumb_AddPC_1
180 EXPORT RMDebug_StepTest_Thumb_Non_PC_Modifying
181 EXPORT RMDebug_StepTest_Thumb_Non_PC_Modifying_1
182 EXPORT RMDebug_StepTest_Thumb_Non_PC_Modifying_2
184 EXPORT RMDebug_StepTest_Thumb_Branch
185 EXPORT RMDebug_StepTest_Thumb_Branch_1
186 EXPORT RMDebug_StepTest_Thumb_Branch_2
188 EXPORT RMDebug_StepTest_Thumb_Branch_And_Link
189 EXPORT RMDebug_StepTest_Thumb_Branch_And_Link_1
190 EXPORT RMDebug_StepTest_Thumb_Branch_And_Link_2
191 EXPORT RMDebug_StepTest_Thumb_Branch_And_Link_3
193 EXPORT RMDebug_StepTest_Thumb_Back_Branch_And_Link
194 EXPORT RMDebug_StepTest_Thumb_Back_Branch_And_Link_1
195 EXPORT RMDebug_StepTest_Thumb_Back_Branch_And_Link_2
196 EXPORT RMDebug_StepTest_Thumb_Back_Branch_And_Link_3
198 RMDebug_StepTest_Thumb_Non_PC_Modifying_1
200 RMDebug_StepTest_Thumb_Non_PC_Modifying_2
203 RMDebug_StepTest_Thumb_Branch_1
204 b RMDebug_StepTest_Thumb_Branch_2
206 RMDebug_StepTest_Thumb_Branch_2
209 RMDebug_StepTest_Thumb_Branch_And_Link_1
211 RMDebug_StepTest_Thumb_Branch_And_Link_2
212 bl RMDebug_StepTest_Thumb_Branch_And_Link_3
214 RMDebug_StepTest_Thumb_Branch_And_Link_3
217 RMDebug_StepTest_Thumb_Back_Branch_And_Link_3
220 RMDebug_StepTest_Thumb_Back_Branch_And_Link_1
222 RMDebug_StepTest_Thumb_Back_Branch_And_Link_2
223 bl RMDebug_StepTest_Thumb_Back_Branch_And_Link_3
229 EXPORT RMDebug_StepTest_Thumb_AddPC
230 EXPORT RMDebug_StepTest_Thumb_AddPC_1
231 EXPORT RMDebug_StepTest_Thumb_AddPC_2
232 EXPORT RMDebug_StepTest_Thumb_AddPC_3
234 RMDebug_StepTest_Thumb_AddPC_1
237 RMDebug_StepTest_Thumb_AddPC_2
238 add pc, pc, r2 ; should arrive at RMDebug_StepTest_Thumb_AddPC_3
242 RMDebug_StepTest_Thumb_AddPC_3
250 ; ARM multiple-step ( 5 steps )
252 EXPORT RMDebug_StepTest_ARM_Step_Multiple
253 EXPORT RMDebug_StepTest_ARM_Step_Multiple_1
255 RMDebug_StepTest_ARM_Step_Multiple
261 RMDebug_StepTest_ARM_Step_Multiple_1
266 ; End of file - d_rmdebug_bkpt.s