Lines Matching +full:bl +full:- +full:code +full:- +full:offset
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/arm/lib/backtrace-clang.S
39 * If the call instruction was a bl we can look at the callers branch
45 * Unfortunately due to the stack frame layout we can't dump r0 - r3, but these
52 * optionally saved caller registers (r4 - r10)
53 * optionally saved arguments (r0 - r3)
57 * Functions start with the following code sequence:
60 * stmfd sp!, {r0 - r3} (optional)
69 * The frame for c_backtrace has pointers to the code of dump_stack. This is
82 * show_stack. It points at the instruction directly after the bl dump_stack.
83 * We can then read the offset from the bl opcode to determine where the branch
88 * {[FP] } =======| | bl c_backtrace
90 * {[R4-R10]} |
91 * {[R0-R3] } | show_stack:
93 * {[LR] } =============| bl dump_stack
95 * {[R4-R10]}
96 * {[R0-R3] }
99 stmfd sp!, {r4 - r9, fp, lr} @ Save an extra register
104 tst r1, #0x10 @ 26 or 32-bit mode?
106 movne mask, #0 @ mask for 32-bit
119 * sv_pc is the saved lr frame the frame above. This is a pointer to a code
132 * a pointer to a code address in the current function's caller. sv_lr-4 is
136 * called using a bl instruction. If the function start can be recovered sv_pc
147 1004: ldr r0, [sv_lr, #-4] @ get call instruction
149 and r2, r3, r0 @ is this a bl call
152 and r0, #0xffffff @ get call offset 24-bit int
153 lsl r0, r0, #8 @ sign extend offset
156 add sv_pc, sv_pc, #-4 @ get call instruction address
173 bl dump_backtrace_entry
213 bl _printk
214 no_frame: ldmfd sp!, {r4 - r9, fp, pc}
228 .word 0x0b000000 @ bl if these bits are set