0001
0002 #ifndef ARCH_PERF_REGS_H
0003 #define ARCH_PERF_REGS_H
0004
0005 #include <stdlib.h>
0006 #include <linux/types.h>
0007 #include <asm/perf_regs.h>
0008
0009 void perf_regs_load(u64 *regs);
0010
0011 #define PERF_REGS_MAX PERF_REG_X86_XMM_MAX
0012 #ifndef HAVE_ARCH_X86_64_SUPPORT
0013 #define PERF_REGS_MASK ((1ULL << PERF_REG_X86_32_MAX) - 1)
0014 #define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_32
0015 #else
0016 #define REG_NOSUPPORT ((1ULL << PERF_REG_X86_DS) | \
0017 (1ULL << PERF_REG_X86_ES) | \
0018 (1ULL << PERF_REG_X86_FS) | \
0019 (1ULL << PERF_REG_X86_GS))
0020 #define PERF_REGS_MASK (((1ULL << PERF_REG_X86_64_MAX) - 1) & ~REG_NOSUPPORT)
0021 #define PERF_SAMPLE_REGS_ABI PERF_SAMPLE_REGS_ABI_64
0022 #endif
0023 #define PERF_REG_IP PERF_REG_X86_IP
0024 #define PERF_REG_SP PERF_REG_X86_SP
0025
0026 #endif