blob: 572093e110017156b7052cd2a5e6c80615f2b79b [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/* SPDX-License-Identifier: GPL-2.0 */
2// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd.
3
4#ifndef __ASM_CSKY_PERF_EVENT_H
5#define __ASM_CSKY_PERF_EVENT_H
6
7#include <abi/regdef.h>
8
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)); \
13}
14
15#endif /* __ASM_PERF_EVENT_ELF_H */