Lines Matching full:lr
12 * lr), we need to get hold of the function's caller's address.
17 * push {lr}
24 * callee: the original lr needs to be restored when leaving mcount, and no
30 * When using dynamic ftrace, we patch out the mcount call by a "pop {lr}"
62 1: mcount_get_lr r1 @ lr of instrumented func
63 mcount_adjust_addr r0, lr @ instrumented function
64 badr lr, 2f
74 @ OLD_R0 will overwrite previous LR
77 @ before the push {lr} of the mcount mechanism
79 str lr, [sp, #0] @ store LR instead of PC
81 ldr lr, [sp, #8] @ get previous LR
83 str r0, [sp, #8] @ write r0 as OLD_R0 over previous LR
85 stmdb sp!, {ip, lr}
86 stmdb sp!, {r0-r11, lr}
90 @ R0 | R1 | ... | LR | SP + 4 | previous LR | LR | PSR | OLD_R0 |
98 ldr r1, [sp, #S_LR] @ lr of instrumented func
100 ldr lr, [sp, #S_PC] @ get LR
102 mcount_adjust_addr r0, lr @ instrumented function
117 ldr lr, [sp, #4] @ restore LR
125 sub r0, fp, #4 @ lr of instrumented routine (parent)
137 ldr lr, [sp, #4] @ restore LR
148 mcount_get_lr r1 @ lr of instrumented func
149 mcount_adjust_addr r0, lr @ instrumented function
172 sub r0, fp, #4 @ &lr of instrumented routine (&parent)
178 @ called from __mcount, untouched in lr
179 mcount_adjust_addr r1, lr @ instrumented routine (func)
192 * This pad compensates for the push {lr} at the call site. Note that we are
193 * unable to unwind through a function which does not otherwise save its lr.
196 stmdb sp!, {r0-r3, lr}
197 UNWIND(.save {r0-r3, lr})
205 ldmia sp!, {r0-r3, ip, lr}
212 mov ip, lr
213 ldmia sp!, {lr}
264 mov lr, r0 @ r0 has real ret addr
266 ret lr
271 ret lr