1 // SPDX-License-Identifier: GPL-2.0
4 #include "../../util/debug.h"
5 #ifndef REMOTE_UNWIND_LIBUNWIND
8 #include "../../util/unwind.h"
11 #ifdef HAVE_ARCH_X86_64_SUPPORT
12 int LIBUNWIND__ARCH_REG_ID(int regnum
)
48 id
= PERF_REG_X86_R10
;
51 id
= PERF_REG_X86_R11
;
54 id
= PERF_REG_X86_R12
;
57 id
= PERF_REG_X86_R13
;
60 id
= PERF_REG_X86_R14
;
63 id
= PERF_REG_X86_R15
;
69 pr_err("unwind: invalid reg id %d\n", regnum
);
76 int LIBUNWIND__ARCH_REG_ID(int regnum
)
100 id
= PERF_REG_X86_BP
;
103 id
= PERF_REG_X86_SP
;
106 id
= PERF_REG_X86_IP
;
109 pr_err("unwind: invalid reg id %d\n", regnum
);
115 #endif /* HAVE_ARCH_X86_64_SUPPORT */