1 #ifndef ARCH_PERF_REGS_H
2 #define ARCH_PERF_REGS_H
5 #include <linux/types.h>
6 #include <asm/perf_regs.h>
8 void perf_regs_load(u64
*regs
);
10 #ifndef HAVE_ARCH_X86_64_SUPPORT
11 #define PERF_REGS_MASK ((1ULL << PERF_REG_X86_32_MAX) - 1)
12 #define PERF_REGS_MAX PERF_REG_X86_32_MAX
13 #define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_32
15 #define REG_NOSUPPORT ((1ULL << PERF_REG_X86_DS) | \
16 (1ULL << PERF_REG_X86_ES) | \
17 (1ULL << PERF_REG_X86_FS) | \
18 (1ULL << PERF_REG_X86_GS))
19 #define PERF_REGS_MASK (((1ULL << PERF_REG_X86_64_MAX) - 1) & ~REG_NOSUPPORT)
20 #define PERF_REGS_MAX PERF_REG_X86_64_MAX
21 #define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_64
23 #define PERF_REG_IP PERF_REG_X86_IP
24 #define PERF_REG_SP PERF_REG_X86_SP
26 static inline const char *perf_reg_name(int id
)
47 case PERF_REG_X86_FLAGS
:
61 #ifdef HAVE_ARCH_X86_64_SUPPORT
66 case PERF_REG_X86_R10
:
68 case PERF_REG_X86_R11
:
70 case PERF_REG_X86_R12
:
72 case PERF_REG_X86_R13
:
74 case PERF_REG_X86_R14
:
76 case PERF_REG_X86_R15
:
78 #endif /* HAVE_ARCH_X86_64_SUPPORT */
86 #endif /* ARCH_PERF_REGS_H */