xref: /linux/tools/perf/util/dwarf-regs-arch/dwarf-regs-loongarch.c (revision c7decec2f2d2ab0366567f9e30c0e1418cece43f)
1*1f10d82eSIan Rogers // SPDX-License-Identifier: GPL-2.0
2*1f10d82eSIan Rogers #include <errno.h>
3*1f10d82eSIan Rogers #include <dwarf-regs.h>
4*1f10d82eSIan Rogers #include "../../../arch/loongarch/include/uapi/asm/perf_regs.h"
5*1f10d82eSIan Rogers 
__get_dwarf_regnum_for_perf_regnum_loongarch(int perf_regnum)6*1f10d82eSIan Rogers int __get_dwarf_regnum_for_perf_regnum_loongarch(int perf_regnum)
7*1f10d82eSIan Rogers {
8*1f10d82eSIan Rogers 	if (perf_regnum < 0 || perf_regnum >= PERF_REG_LOONGARCH_MAX)
9*1f10d82eSIan Rogers 		return -ENOENT;
10*1f10d82eSIan Rogers 
11*1f10d82eSIan Rogers 	return perf_regnum;
12*1f10d82eSIan Rogers }
13