1 // SPDX-License-Identifier: GPL-2.0
3 #include "../perf_regs.h"
4 #include "../../../arch/loongarch/include/uapi/asm/perf_regs.h"
6 const char *__perf_reg_name_loongarch(int id
)
9 case PERF_REG_LOONGARCH_PC
:
11 case PERF_REG_LOONGARCH_R1
:
13 case PERF_REG_LOONGARCH_R2
:
15 case PERF_REG_LOONGARCH_R3
:
17 case PERF_REG_LOONGARCH_R4
:
19 case PERF_REG_LOONGARCH_R5
:
21 case PERF_REG_LOONGARCH_R6
:
23 case PERF_REG_LOONGARCH_R7
:
25 case PERF_REG_LOONGARCH_R8
:
27 case PERF_REG_LOONGARCH_R9
:
29 case PERF_REG_LOONGARCH_R10
:
31 case PERF_REG_LOONGARCH_R11
:
33 case PERF_REG_LOONGARCH_R12
:
35 case PERF_REG_LOONGARCH_R13
:
37 case PERF_REG_LOONGARCH_R14
:
39 case PERF_REG_LOONGARCH_R15
:
41 case PERF_REG_LOONGARCH_R16
:
43 case PERF_REG_LOONGARCH_R17
:
45 case PERF_REG_LOONGARCH_R18
:
47 case PERF_REG_LOONGARCH_R19
:
49 case PERF_REG_LOONGARCH_R20
:
51 case PERF_REG_LOONGARCH_R21
:
53 case PERF_REG_LOONGARCH_R22
:
55 case PERF_REG_LOONGARCH_R23
:
57 case PERF_REG_LOONGARCH_R24
:
59 case PERF_REG_LOONGARCH_R25
:
61 case PERF_REG_LOONGARCH_R26
:
63 case PERF_REG_LOONGARCH_R27
:
65 case PERF_REG_LOONGARCH_R28
:
67 case PERF_REG_LOONGARCH_R29
:
69 case PERF_REG_LOONGARCH_R30
:
71 case PERF_REG_LOONGARCH_R31
:
79 uint64_t __perf_reg_ip_loongarch(void)
81 return PERF_REG_LOONGARCH_PC
;
84 uint64_t __perf_reg_sp_loongarch(void)
86 return PERF_REG_LOONGARCH_R3
;