xref: /linux/tools/perf/arch/arm64/util/unwind-libunwind.c (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1 // SPDX-License-Identifier: GPL-2.0
2 #include <errno.h>
3 
4 #ifndef REMOTE_UNWIND_LIBUNWIND
5 #include <libunwind.h>
6 #include "perf_regs.h"
7 #include "../../../util/unwind.h"
8 #endif
9 #include "../../../util/debug.h"
10 
LIBUNWIND__ARCH_REG_ID(int regnum)11 int LIBUNWIND__ARCH_REG_ID(int regnum)
12 {
13 	if (regnum < 0 || regnum >= PERF_REG_ARM64_EXTENDED_MAX)
14 		return -EINVAL;
15 
16 	return regnum;
17 }
18