1 /* SPDX-License-Identifier: GPL-2.0 */
2 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
4 #ifndef __ASM_CSKY_PERF_EVENT_H
5 #define __ASM_CSKY_PERF_EVENT_H
7 #include <abi/regdef.h>
9 #define perf_arch_fetch_caller_regs(regs, __ip) { \
10 (regs)->pc = (__ip); \
11 regs_fp(regs) = (unsigned long) __builtin_frame_address(0); \
12 asm volatile("mov %0, sp\n":"=r"((regs)->usp)); \
15 #endif /* __ASM_PERF_EVENT_ELF_H */