1*5000e7f6SLeo Yan // SPDX-License-Identifier: GPL-2.0 2*5000e7f6SLeo Yan 3*5000e7f6SLeo Yan #ifdef HAVE_PERF_REGS_SUPPORT 4*5000e7f6SLeo Yan 5*5000e7f6SLeo Yan #include "../perf_regs.h" 6*5000e7f6SLeo Yan #include "../../../arch/mips/include/uapi/asm/perf_regs.h" 7*5000e7f6SLeo Yan 8*5000e7f6SLeo Yan const char *__perf_reg_name_mips(int id) 9*5000e7f6SLeo Yan { 10*5000e7f6SLeo Yan switch (id) { 11*5000e7f6SLeo Yan case PERF_REG_MIPS_PC: 12*5000e7f6SLeo Yan return "PC"; 13*5000e7f6SLeo Yan case PERF_REG_MIPS_R1: 14*5000e7f6SLeo Yan return "$1"; 15*5000e7f6SLeo Yan case PERF_REG_MIPS_R2: 16*5000e7f6SLeo Yan return "$2"; 17*5000e7f6SLeo Yan case PERF_REG_MIPS_R3: 18*5000e7f6SLeo Yan return "$3"; 19*5000e7f6SLeo Yan case PERF_REG_MIPS_R4: 20*5000e7f6SLeo Yan return "$4"; 21*5000e7f6SLeo Yan case PERF_REG_MIPS_R5: 22*5000e7f6SLeo Yan return "$5"; 23*5000e7f6SLeo Yan case PERF_REG_MIPS_R6: 24*5000e7f6SLeo Yan return "$6"; 25*5000e7f6SLeo Yan case PERF_REG_MIPS_R7: 26*5000e7f6SLeo Yan return "$7"; 27*5000e7f6SLeo Yan case PERF_REG_MIPS_R8: 28*5000e7f6SLeo Yan return "$8"; 29*5000e7f6SLeo Yan case PERF_REG_MIPS_R9: 30*5000e7f6SLeo Yan return "$9"; 31*5000e7f6SLeo Yan case PERF_REG_MIPS_R10: 32*5000e7f6SLeo Yan return "$10"; 33*5000e7f6SLeo Yan case PERF_REG_MIPS_R11: 34*5000e7f6SLeo Yan return "$11"; 35*5000e7f6SLeo Yan case PERF_REG_MIPS_R12: 36*5000e7f6SLeo Yan return "$12"; 37*5000e7f6SLeo Yan case PERF_REG_MIPS_R13: 38*5000e7f6SLeo Yan return "$13"; 39*5000e7f6SLeo Yan case PERF_REG_MIPS_R14: 40*5000e7f6SLeo Yan return "$14"; 41*5000e7f6SLeo Yan case PERF_REG_MIPS_R15: 42*5000e7f6SLeo Yan return "$15"; 43*5000e7f6SLeo Yan case PERF_REG_MIPS_R16: 44*5000e7f6SLeo Yan return "$16"; 45*5000e7f6SLeo Yan case PERF_REG_MIPS_R17: 46*5000e7f6SLeo Yan return "$17"; 47*5000e7f6SLeo Yan case PERF_REG_MIPS_R18: 48*5000e7f6SLeo Yan return "$18"; 49*5000e7f6SLeo Yan case PERF_REG_MIPS_R19: 50*5000e7f6SLeo Yan return "$19"; 51*5000e7f6SLeo Yan case PERF_REG_MIPS_R20: 52*5000e7f6SLeo Yan return "$20"; 53*5000e7f6SLeo Yan case PERF_REG_MIPS_R21: 54*5000e7f6SLeo Yan return "$21"; 55*5000e7f6SLeo Yan case PERF_REG_MIPS_R22: 56*5000e7f6SLeo Yan return "$22"; 57*5000e7f6SLeo Yan case PERF_REG_MIPS_R23: 58*5000e7f6SLeo Yan return "$23"; 59*5000e7f6SLeo Yan case PERF_REG_MIPS_R24: 60*5000e7f6SLeo Yan return "$24"; 61*5000e7f6SLeo Yan case PERF_REG_MIPS_R25: 62*5000e7f6SLeo Yan return "$25"; 63*5000e7f6SLeo Yan case PERF_REG_MIPS_R28: 64*5000e7f6SLeo Yan return "$28"; 65*5000e7f6SLeo Yan case PERF_REG_MIPS_R29: 66*5000e7f6SLeo Yan return "$29"; 67*5000e7f6SLeo Yan case PERF_REG_MIPS_R30: 68*5000e7f6SLeo Yan return "$30"; 69*5000e7f6SLeo Yan case PERF_REG_MIPS_R31: 70*5000e7f6SLeo Yan return "$31"; 71*5000e7f6SLeo Yan default: 72*5000e7f6SLeo Yan break; 73*5000e7f6SLeo Yan } 74*5000e7f6SLeo Yan return NULL; 75*5000e7f6SLeo Yan } 76*5000e7f6SLeo Yan 77*5000e7f6SLeo Yan #endif 78