@@ -165,7 +165,6 @@ END(EV_Extension)
165165tracesys:
166166 ; save EFA in case tracer wants the PC of traced task
167167 ; using ERET won't work since next-PC has already committed
168- lr r12 , [ efa ]
169168 GET_CURR_TASK_FIELD_PTR TASK_THREAD , r11
170169 st r12 , [ r11 , THREAD_FAULT_ADDR ] ; thread.fault_address
171170
@@ -208,15 +207,9 @@ tracesys_exit:
208207; Breakpoint TRAP
209208; ---------------------------------------------
210209trap_with_param:
211-
212- ; stop_pc info by gdb needs this info
213- lr r0 , [ efa ]
210+ mov r0 , r12 ; EFA in case ptracer/gdb wants stop_pc
214211 mov r1 , sp
215212
216- ; Now that we have read EFA, it is safe to do "fake" rtie
217- ; and get out of CPU exception mode
218- FAKE_RET_FROM_EXCPN
219-
220213 ; Save callee regs in case gdb wants to have a look
221214 ; SP will grow up by size of CALLEE Reg-File
222215 ; NOTE: clobbers r12
@@ -243,16 +236,17 @@ ENTRY(EV_Trap)
243236
244237 EXCEPTION_PROLOGUE
245238
239+ lr r12 , [ efa ]
240+
241+ FAKE_RET_FROM_EXCPN
242+
246243 ;============ TRAP 1 :breakpoints
247244 ; Check ECR for trap with arg (PROLOGUE ensures r10 has ECR)
248245 bmsk.f 0 , r10 , 7
249246 bnz trap_with_param
250247
251248 ;============ TRAP (no param): syscall top level
252249
253- ; First return from Exception to pure K mode (Exception/IRQs renabled)
254- FAKE_RET_FROM_EXCPN
255-
256250 ; If syscall tracing ongoing, invoke pre-post-hooks
257251 GET_CURR_THR_INFO_FLAGS r10
258252 btst r10 , TIF_SYSCALL_TRACE
0 commit comments