1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/linkage.h>
22 * Implementation of void perf_regs_load(u64 *regs);
24 * This functions fills in the 'regs' buffer from the actual registers values,
25 * in the way the perf built-in unwinding test expects them:
26 * - the PC at the time at the call to this function. Since this function
27 * is called using a bl instruction, the PC value is taken from LR.
28 * The built-in unwinding test then unwinds the call stack from the dwarf
29 * information in unwind__get_entries.
32 * - the 8 bytes stride in the registers offsets comes from the fact
33 * that the registers are stored in an u64 array (u64 *regs),
34 * - the regs buffer needs to be zeroed before the call to this function,
35 * in this case using a calloc in dwarf-unwind.c.
39 .type perf_regs_load,%function
40 SYM_FUNC_START(perf_regs_load)
56 str lr, [r0, #PC] // store pc as lr in order to skip the call
59 SYM_FUNC_END(perf_regs_load)