Lines Matching +full:sub +full:- +full:frame
1 /* SPDX-License-Identifier: GPL-2.0-only */
14 @ fp is 0 or stack frame
16 #define frame r4 macro
29 stmfd sp!, {r4 - r9, lr} @ Save an extra register so we have a location...
30 movs frame, r0 @ if frame pointer is zero
34 tst r1, #0x10 @ 26 or 32-bit mode?
38 movne mask, #0 @ mask for 32-bit
43 sub offset, r0, r1
46 * Stack frame layout:
47 * optionally saved caller registers (r4 - r10)
51 * frame => saved pc
52 * optionally saved arguments (r0 - r3)
57 * stmfd sp!, {r0 - r3} (optional)
60 for_each_frame: tst frame, mask @ Check for address exceptions
63 1001: ldr sv_pc, [frame, #0] @ get saved pc
64 1002: ldr sv_fp, [frame, #-12] @ get saved fp
66 sub sv_pc, sv_pc, offset @ Correct PC for prefetching
69 1003: ldr r2, [sv_pc, #-4] @ if stmfd sp!, {args} exists,
75 ldr r1, [frame, #-4] @ get saved lr
76 mov r2, frame
81 ldr r1, [sv_pc, #-4] @ if stmfd sp!, {args} exists,
84 ldreq r0, [frame, #-8] @ get sp
92 subeq r0, frame, #16
99 cmp sv_fp, frame @ next frame must be
100 mov frame, sv_fp @ above the current frame
104 @ frame is below the previous frame, accept it as long as it
113 mov r2, frame
115 no_frame: ldmfd sp!, {r4 - r9, pc}
126 .Lbad: .asciz "%sBacktrace aborted due to bad frame pointer <%p>\n"